This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
mattermost.yaml
157 lines (154 loc) · 4.35 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
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: ${DATABASE_NAME}
Please see https://github.com/goern/mattermost-openshift/blob/master/README.md for detailed infomation.
Dont forget to export service ${APPLICATION_NAME} as a route!
metadata:
name: mattermost
annotations:
description: |-
This is Mattermost, have fun!
openshift.io/display-name: Mattermost
tags: mattermost
template.openshift.io/documentation-url: https://github.com/goern/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/goern/mattermost-openshift/issues
objects:
- kind: ImageStream
apiVersion: v1
metadata:
name: '${APPLICATION_NAME}'
spec:
tags:
- name: '${MATTERMOST_VERSION}'
annotations:
description: The Mattermost image from CentOS Registry
openshift.io/display-name: 'Mattermost ${MATTERMOST_VERSION}'
tags: mattermost
version: '${MATTERMOST_VERSION}'
from:
kind: DockerImage
name: 'registry.centos.org/mattermost/mattermost-team:${MATTERMOST_VERSION}'
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: '${APPLICATION_NAME}'
spec:
selector:
name: '${APPLICATION_NAME}'
replicas: 1
securityContext: {}
serviceAccount: mattermost
serviceAccountName: mattermost
template:
metadata:
labels:
name: '${APPLICATION_NAME}'
spec:
containers:
- image: '${APPLICATION_NAME}'
imagePullPolicy: Always
name: '${APPLICATION_NAME}'
env:
- name: MM_DB_USER
valueFrom:
secretKeyRef:
key: user
name: mattermost-database
- name: MM_DB_PASS
valueFrom:
secretKeyRef:
key: password
name: mattermost-database
- name: MM_DB_NAME
valueFrom:
configMapKeyRef:
key: db_database
name: mattermost
- name: MM_DB_HOST
valueFrom:
configMapKeyRef:
key: db_host
name: mattermost
- name: MM_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
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- '${APPLICATION_NAME}'
from:
kind: ImageStreamTag
name: '${APPLICATION_NAME}:latest'
- 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: ConfigMap
apiVersion: v1
metadata:
name: mattermost
data:
db_database: '${DATABASE_NAME}'
db_host: postgresql
db_port: '5432'
parameters:
- name: APPLICATION_NAME
required: true
value: mattermost
- name: MATTERMOST_VERSION
required: true
value: 5.2-PCP
- description: Name of the database to be accessed.
displayName: Database Name
name: DATABASE_NAME
required: true
value: mattermost_test