This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
mattermost.yaml
191 lines (186 loc) · 5.14 KB
/
mattermost.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
apiVersion: v1
kind: Template
message: |-
The following service(s) have been created in your project: ${APPLICATION_NAME}.
Mattermost Version: ${MATTERMOST_VERSION}
Database User: from secret `mattermost`
Password: from secret `mattermost`
Database Name: ${POSTGRESQL_DATABASE}
metadata:
name: mattermost
annotations:
description: |-
Community template for running Mattermost Team Edition on Openshift (Origin)
https://about.mattermost.com
You need a running PostgreSQL server running and a secret with username/password configured.
openshift.io/display-name: Mattermost
tags: mattermost
iconClass: fa fa-comments
template.openshift.io/documentation-url: https://github.com/tschwaerzl/mattermost-openshift/blob/master/README.md
template.openshift.io/long-description: This template provides a Mattermost service, it depends on a Secret and PostgreSQL.
template.openshift.io/provider-display-name: Mattermost Community
template.openshift.io/support-url: https://github.com/tschwaerzl/mattermost-openshift/issues
objects:
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: "mattermost-data"
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "${VOLUME_CAPACITY}"
- kind: ImageStream
apiVersion: v1
metadata:
name: '${APPLICATION_NAME}'
spec:
tags:
- name: '${MATTERMOST_VERSION}'
annotations:
description: The Mattermost image from docker.io/tschwaerzl/mattermost-openshift
openshift.io/display-name: 'Mattermost ${MATTERMOST_VERSION}'
tags: mattermost
version: '${MATTERMOST_VERSION}'
from:
kind: DockerImage
name: 'docker.io/tschwaerzl/mattermost-openshift:${MATTERMOST_VERSION}'
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: '${APPLICATION_NAME}'
spec:
selector:
name: '${APPLICATION_NAME}'
replicas: 2
securityContext: {}
serviceAccount: mattermost
serviceAccountName: mattermost
template:
metadata:
labels:
name: '${APPLICATION_NAME}'
spec:
containers:
- image: '${APPLICATION_NAME}'
imagePullPolicy: Always
name: '${APPLICATION_NAME}'
volumeMounts:
- mountPath: /opt/mattermost/data
name: mattermost-data
env:
- name: DB_USERNAME
valueFrom:
secretKeyRef:
key: user
name: mattermost-database
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: mattermost-database
- name: DB_DATABASE
valueFrom:
configMapKeyRef:
key: db_database
name: mattermost
- name: DB_HOST
valueFrom:
configMapKeyRef:
key: db_host
name: mattermost
- name: DB_PORT
valueFrom:
configMapKeyRef:
key: db_port
name: mattermost
livenessProbe:
failureThreshold: 3
httpGet:
path: /
port: 8065
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
ports:
- containerPort: 8065
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: 8065
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 250m
memory: 128Mi
volumes:
- name: mattermost-data
persistentVolumeClaim:
claimName: mattermost-data
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- '${APPLICATION_NAME}'
from:
kind: ImageStreamTag
name: '${APPLICATION_NAME}:${MATTERMOST_VERSION}'
- type: ConfigChange
- kind: Service
apiVersion: v1
metadata:
name: '${APPLICATION_NAME}'
spec:
ports:
- name: 8065-tcp
port: 8065
protocol: TCP
targetPort: 8065
selector:
deploymentconfig: '${APPLICATION_NAME}'
- kind: Route
apiVersion: v1
metadata:
name: '${APPLICATION_NAME}'
spec:
host:
to:
kind: Service
name: '${APPLICATION_NAME}'
port:
targetPort: 8065-tcp
- kind: ConfigMap
apiVersion: v1
metadata:
name: mattermost
data:
db_database: '${POSTGRESQL_DATABASE}'
db_host: postgresql.mattermost.svc
db_port: '5432'
parameters:
- name: APPLICATION_NAME
required: true
value: mattermost
- name: MATTERMOST_VERSION
required: true
value: '5.29.0'
- name: VOLUME_CAPACITY
required: true
value: 10G
- description: Name of the PostgreSQL database accessed.
displayName: PostgreSQL Database Name
name: POSTGRESQL_DATABASE
required: true
value: mattermost