-
Notifications
You must be signed in to change notification settings - Fork 0
/
ibmcloudTemplates.yaml
343 lines (342 loc) · 8.89 KB
/
ibmcloudTemplates.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
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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: isamconfig
labels:
app: isamconfig
spec:
replicas: 1
template:
metadata:
labels:
app: isamconfig
spec:
volumes:
- name: isamconfigvol
emptyDir: {}
containers:
- name: isamconfig
image: au.icr.io/isamob/isam:latest
imagePullPolicy: Always
# This should be the default entry point
command: [ "/sbin/bootstrap.sh"]
ports:
- containerPort: 9443
volumeMounts:
- mountPath: /var/shared
name: isamconfigvol
securityContext:
capabilities:
add:
- SYS_PTRACE
- SYS_RESOURCE
env:
- name: SERVICE
value: config
- name: CONTAINER_TIMEZONE
value: Australia/Brisbane
- name: ADMIN_PWD
valueFrom:
secretKeyRef:
name: adminpwd
key: password
---
# for external service access, see https://console.bluemix.net/docs/containers/cs_apps.html#cs_apps_public_nodeport
apiVersion: v1
kind: Service
metadata:
name: isamconfig
spec:
ports:
- port: 9443
name: isamconfig
protocol: TCP
# make this one statically allocated
nodePort: 30442
selector:
app: isamconfig
type: NodePort
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: isamruntime
labels:
app: isamruntime
spec:
replicas: 1
template:
metadata:
labels:
app: isamruntime
spec:
volumes:
- name: isamconfigvol
emptyDir: {}
containers:
- name: isamruntime
image: au.icr.io/isamob/isam:latest
imagePullPolicy: Always
# This should be the default entry point
command: [ "/sbin/bootstrap.sh"]
ports:
- containerPort: 443
volumeMounts:
- mountPath: /var/shared
name: isamconfigvol
securityContext:
capabilities:
add:
- SYS_PTRACE
- SYS_RESOURCE
env:
- name: SERVICE
value: runtime
- name: CONTAINER_TIMEZONE
value: Australia/Brisbane
- name: CONFIG_SERVICE_URL
value: https://isamconfig:9443/shared_volume
- name: CONFIG_SERVICE_USER_NAME
valueFrom:
secretKeyRef:
name: configreader
key: username
- name: CONFIG_SERVICE_USER_PWD
valueFrom:
secretKeyRef:
name: configreader
key: password
- name: ADMIN_PWD
valueFrom:
secretKeyRef:
name: adminpwd
key: password
---
apiVersion: v1
kind: Service
metadata:
name: isamruntime
spec:
ports:
- port: 443
name: isamruntime
protocol: TCP
nodePort: 30445
selector:
app: isamruntime
type: NodePort
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: isamwebseal
labels:
app: isamwebseal
spec:
replicas: 1
template:
metadata:
labels:
app: isamwebseal
spec:
volumes:
- name: isamconfigvol
emptyDir: {}
containers:
- name: isamwebseal
image: au.icr.io/isamob/isam:latest
imagePullPolicy: Always
# This should be the default entry point
command: [ "/sbin/bootstrap.sh"]
ports:
- containerPort: 443
volumeMounts:
- mountPath: /var/shared
name: isamconfigvol
securityContext:
capabilities:
add:
- SYS_PTRACE
- SYS_RESOURCE
env:
- name: SERVICE
value: webseal
- name: INSTANCE
value: default
- name: CONTAINER_TIMEZONE
value: Australia/Brisbane
- name: CONFIG_SERVICE_URL
value: https://isamconfig:9443/shared_volume
- name: CONFIG_SERVICE_USER_NAME
valueFrom:
secretKeyRef:
name: configreader
key: username
- name: CONFIG_SERVICE_USER_PWD
valueFrom:
secretKeyRef:
name: configreader
key: password
- name: ADMIN_PWD
valueFrom:
secretKeyRef:
name: adminpwd
key: password
---
# for external service access, see https://console.bluemix.net/docs/containers/cs_apps.html#cs_apps_public_nodeport
apiVersion: v1
kind: Service
metadata:
name: isamwebseal
spec:
ports:
- port: 443
name: isamwebseal
protocol: TCP
nodePort: 30443
selector:
app: isamwebseal
type: NodePort
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: openldap
labels:
app: openldap
spec:
replicas: 1
template:
metadata:
labels:
app: openldap
spec:
volumes:
- name: ldaplib
emptyDir: {}
- name: ldapslapd
emptyDir: {}
- name: ldapsecauthority
emptyDir: {}
- name: keys
secret:
secretName: openldap-keys
containers:
- name: openldap
image: au.icr.io/isamob/isam-openldap:latest
imagePullPolicy: Always
ports:
- containerPort: 636
env:
- name: LDAP_DOMAIN
value: ibm.com
- name: LDAP_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: genericpwd
key: password
- name: LDAP_CONFIG_PASSWORD
valueFrom:
secretKeyRef:
name: genericpwd
key: password
volumeMounts:
- mountPath: /var/lib/ldap
name: ldaplib
- mountPath: /etc/ldap/slapd.d
name: ldapslapd
- mountPath: /var/lib/ldap.secAuthority
name: ldapsecauthority
- mountPath: /container/service/slapd/assets/certs
name: keys
# workaround to fix file permissions when using persistent volume in Kubernetes
command: [ "/bin/bash"]
args: [ "-c", "chown -R openldap:openldap /var/lib/ldap.secAuthority; /container/tool/run --copy-service" ]
# useful for debugging startup issues - can run bash, then exec to the container and poke around
# command: [ "/bin/bash"]
# args: [ "-c", "while /bin/true ; do sleep 5; done" ]
# Just this line to get debug output from openldap startup
# args: [ "--loglevel" , "trace","--copy-service"]
# This line is needed when running on Kubernetes 1.9.4 or above
# args: [ "--copy-service"]
---
# for external service access, see https://console.bluemix.net/docs/containers/cs_apps.html#cs_apps_public_nodeport
apiVersion: v1
kind: Service
metadata:
name: openldap
labels:
app: openldap
spec:
ports:
- port: 636
name: ldaps
protocol: TCP
# if we want internet-facing, make this one statically allocated and change type to NodePort
nodePort: 30636
selector:
app: openldap
type: NodePort
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: postgresql
labels:
app: postgresql
spec:
replicas: 1
template:
metadata:
labels:
app: postgresql
spec:
volumes:
- name: postgresqldata
emptyDir: {}
- name: keys
secret:
secretName: postgresql-keys
containers:
- name: postgresql
image: au.icr.io/isamob/isam-postgresql:latest
imagePullPolicy: Always
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: postgres
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: genericpwd
key: password
- name: POSTGRES_DB
value: isam
- name: POSTGRES_SSL_KEYDB
value: /var/local/db.key
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgresqldata
- mountPath: /var/local/
name: keys
# useful for debugging startup issues - can run bash, then exec to the container and poke around
# command: [ "/bin/bash"]
# args: [ "-c", "while /bin/true ; do sleep 5; done" ]
---
# for external service access, see https://console.bluemix.net/docs/containers/cs_apps.html#cs_apps_public_nodeport
apiVersion: v1
kind: Service
metadata:
name: postgresql
labels:
app: postresql
spec:
ports:
- port: 5432
name: postgresql
protocol: TCP
nodePort: 31432
selector:
app: postgresql
type: NodePort