This repository has been archived by the owner on Mar 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.openshift.yml
294 lines (294 loc) · 8.19 KB
/
.openshift.yml
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
apiVersion: v1
kind: Template
metadata:
name: adminbot-dev-build-template
parameters:
- name: BOT_NAME
description: The Bot name
displayName: Bot Name
required: true
value: "adminbot-dev"
- name: SEND_EMAIL
description: Whether the bot should send emails or not; defaults to false
displayName: Send Email?
required: true
value: "true"
- name: SYMPHONY_API_HOST
description: The Symphony API host
displayName: Symphony API host
required: true
# value: "foundation-dev-api.symphony.com"
- name: SYMPHONY_POD_HOST
description: The Symphony Pod host
displayName: Symphony Pod host
required: true
# value: "foundation-dev.symphony.com"
objects:
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: ${BOT_NAME}
name: s2i-java-binary
spec:
dockerImageRepository: "docker.io/maoo/s2i-java-binary"
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: ${BOT_NAME}
name: ${BOT_NAME}
spec: {}
status:
dockerImageRepository: ""
- apiVersion: v1
kind: BuildConfig
metadata:
name: ${BOT_NAME}
labels:
app: ${BOT_NAME}
spec:
output:
to:
kind: ImageStreamTag
name: ${BOT_NAME}:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
type: Binary
binary:
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
name: s2i-java-binary:latest
triggers: {}
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: ${BOT_NAME}
name: ${BOT_NAME}
spec:
replicas: 1
selector:
app: ${BOT_NAME}
deploymentconfig: ${BOT_NAME}
strategy:
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
app: ${BOT_NAME}
deploymentconfig: ${BOT_NAME}
spec:
containers:
- image: ${BOT_NAME}:latest
imagePullPolicy: Always
name: ${BOT_NAME}
ports:
- containerPort: 8080
protocol: TCP
readinessProbe:
httpGet:
path: "/symphony/votebot/v1/proposal/1"
port: 8080
initialDelaySeconds: 15
timeoutSeconds: 1
resources: {}
terminationMessagePath: /dev/termination-log
env:
- name: LOG4J_FILE
value: "/opt/openshift/log4j.properties"
- name: SESSION_AUTH
value: https://${SYMPHONY_API_HOST}/sessionauth
- name: KEY_AUTH
value: https://${SYMPHONY_API_HOST}/keyauth
- name: SYMPHONY_POD
value: https://${SYMPHONY_POD_HOST}/pod
- name: SYMPHONY_AGENT
value: https://${SYMPHONY_POD_HOST}/agent
- name: DOWNLOAD_HOST
valueFrom:
secretKeyRef:
name: symphony.foundation
key: download.host
- name: DOWNLOAD_PATH
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: certs.download.path
- name: DOWNLOAD_ITEMS
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: certs.download.items
- name: AUTH_TRUSTSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: auth.truststore.password
- name: AUTH_KEYSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: auth.keystore.password
- name: BOT_KEYSTORE_FILE_NAME
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: bot.keystore.file.name
- name: BOT_KEYSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: bot.keystore.password
- name: KEYS_PASSWORD_FILE
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: keys.password.file
- name: CERTS
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: certs.dir
- name: AUTH_KEYSTORE_FILE
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: auth.keystore.file
- name: AUTH_TRUSTSTORE_FILE
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: auth.truststore.file
- name: GOOGLE_CRED
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: google.cred.file
- name: GOOGLE_SERVICE_ID
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: google.service.id
- name: GMAIL_ADDRESS
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: adminbot.gmail.address
- name: DEVELOPER_JSON_DIR
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: adminbot.developer.json.dir
- name: USER_JSON_DIR
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: adminbot.user.json.dir
- name: DEVELOPER_P12_DIR
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: adminbot.developer.p12.dir
- name: BOOTSTRAP_EMAIL_SUBJECT_TEMPLATE
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: adminbot.bootstrap.email.subject.template
- name: BOOTSTRAP_EMAIL_MESSAGE_TEMPLATE
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: adminbot.bootstrap.message.subject.template
- name: BOOTSTRAP_MESSAGE_DIRECTIONAL_TEMPLATE
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: adminbot.bootstrap.message.directional.template
- name: BOOTSTRAP_MESSAGE_WELCOME_TEMPLATE
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: adminbot.bootstrap.message.welcome.template
- name: BOOTSTRAP_ICON_URL_TEMPLATE_ENV
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: adminbot.bootstrap.icon.url.template
- name: BOOTSTRAP_BOT_ID_ENV
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: adminbot.bootstrap.bot.id
- name: AUTH_PORT_ENV
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: adminbot.auth.port
- name: SWAGGER_PORT
valueFrom:
secretKeyRef:
name: ${BOT_NAME}.certs
key: adminbot.swagger.port
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- ${BOT_NAME}
from:
kind: ImageStreamTag
name: ${BOT_NAME}:latest
type: ImageChange
status: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
openshift.io/generated-by: OpenShiftNewApp
labels:
app: ${BOT_NAME}
name: ${BOT_NAME}
spec:
ports:
- name: healthcheck-tcp
port: ${SWAGGER_PORT}
protocol: TCP
targetPort: ${SWAGGER_PORT}
selector:
app: ${BOT_NAME}
deploymentconfig: ${BOT_NAME}
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
- apiVersion: v1
kind: Route
metadata:
name: ${BOT_NAME}
labels:
app: ${BOT_NAME}
spec:
to:
kind: Service
name: ${BOT_NAME}
weight: 100
port:
targetPort: healthcheck-tcp
wildcardPolicy: None