-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathexpected-common.yaml
455 lines (451 loc) · 12.8 KB
/
expected-common.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
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
---
# Source: examples-common/charts/rabbitmq/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: gs-cloud-common-rabbitmq
namespace: "default"
labels:
app.kubernetes.io/name: rabbitmq
helm.sh/chart: rabbitmq-11.3.0
app.kubernetes.io/instance: gs-cloud-common
app.kubernetes.io/managed-by: Helm
automountServiceAccountToken: true
secrets:
- name: gs-cloud-common-rabbitmq
---
# Source: examples-common/charts/rabbitmq/templates/config-secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: gs-cloud-common-rabbitmq-config
namespace: "default"
labels:
app.kubernetes.io/name: rabbitmq
helm.sh/chart: rabbitmq-11.3.0
app.kubernetes.io/instance: gs-cloud-common
app.kubernetes.io/managed-by: Helm
type: Opaque
data:
rabbitmq.conf: |-
IyMgVXNlcm5hbWUgYW5kIHBhc3N3b3JkCiMjCmRlZmF1bHRfdXNlciA9IGdlb3NlcnZlcgojIyBDbHVzdGVyaW5nCiMjCmNsdXN0ZXJfZm9ybWF0aW9uLnBlZXJfZGlzY292ZXJ5X2JhY2tlbmQgID0gcmFiYml0X3BlZXJfZGlzY292ZXJ5X2s4cwpjbHVzdGVyX2Zvcm1hdGlvbi5rOHMuaG9zdCA9IGt1YmVybmV0ZXMuZGVmYXVsdApjbHVzdGVyX2Zvcm1hdGlvbi5ub2RlX2NsZWFudXAuaW50ZXJ2YWwgPSAxMApjbHVzdGVyX2Zvcm1hdGlvbi5ub2RlX2NsZWFudXAub25seV9sb2dfd2FybmluZyA9IHRydWUKY2x1c3Rlcl9wYXJ0aXRpb25faGFuZGxpbmcgPSBhdXRvaGVhbAojIHF1ZXVlIG1hc3RlciBsb2NhdG9yCnF1ZXVlX21hc3Rlcl9sb2NhdG9yID0gbWluLW1hc3RlcnMKIyBlbmFibGUgZ3Vlc3QgdXNlcgpsb29wYmFja191c2Vycy5ndWVzdCA9IGZhbHNlCiNkZWZhdWx0X3Zob3N0ID0gZGVmYXVsdC12aG9zdAojZGlza19mcmVlX2xpbWl0LmFic29sdXRlID0gNTBNQg==
---
# Source: examples-common/charts/rabbitmq/templates/secrets.yaml
apiVersion: v1
kind: Secret
metadata:
name: gs-cloud-common-rabbitmq
namespace: "default"
labels:
app.kubernetes.io/name: rabbitmq
helm.sh/chart: rabbitmq-11.3.0
app.kubernetes.io/instance: gs-cloud-common
app.kubernetes.io/managed-by: Helm
type: Opaque
data:
rabbitmq-password: "cGFzc3dvcmQ="
rabbitmq-erlang-cookie: "Y29va2ll"
---
# Source: examples-common/templates/cm_db_jndi.yaml
# NB: this suppose that a docker postgis container
# is running on the host, and that its gateway
# is 172.17.0.1
apiVersion: v1
data:
jndi.yml: |+
jndi:
datasources:
geodata:
enabled: true
wait-for-it: true
wait-timeout: 10
url: jdbc:postgresql://172.17.0.1:5432/ogscloud
username: username
password: password
maximum-pool-size: 10
minimum-idle: 2
connection-timeout: 250
idle-timeout: 60000
kind: ConfigMap
metadata:
creationTimestamp: null
name: cm-jndi-geodata
---
# Source: examples-common/templates/pv_pvc.yaml
# PV cache
apiVersion: v1
kind: PersistentVolume
metadata:
name: gs-cloud-gwc-cache-nfs
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 10Gi
mountOptions:
- nfsvers=4.1
nfs:
path: /nfs/tiles
server: not-set
persistentVolumeReclaimPolicy: Retain
---
# Source: examples-common/templates/pv_pvc.yaml
# PV config
apiVersion: v1
kind: PersistentVolume
metadata:
name: gs-cloud-datadir-nfs
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 10Gi
mountOptions:
- nfsvers=4.1
nfs:
path: /nfs/datadir
server: not-set
persistentVolumeReclaimPolicy: Retain
---
# Source: examples-common/templates/pv_pvc.yaml
# PV raster
apiVersion: v1
kind: PersistentVolume
metadata:
name: gs-cloud-raster-nfs
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 10Gi
mountOptions:
- nfsvers=4.1
nfs:
path: /nfs/raster
server: not-set
persistentVolumeReclaimPolicy: Retain
---
# Source: examples-common/templates/pv_pvc.yaml
# PVC cache-claim
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gs-cloud-gwc-cache-nfs-claim
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
volumeName: gs-cloud-gwc-cache-nfs
storageClassName: ""
---
# Source: examples-common/templates/pv_pvc.yaml
# PVC config-claim
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gs-cloud-datadir-nfs-claim
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
volumeName: gs-cloud-datadir-nfs
storageClassName: ""
---
# Source: examples-common/templates/pv_pvc.yaml
# PVC raster-claim
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gs-cloud-raster-nfs-claim
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
volumeName: gs-cloud-raster-nfs
storageClassName: ""
---
# Source: examples-common/charts/rabbitmq/templates/role.yaml
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: gs-cloud-common-rabbitmq-endpoint-reader
namespace: "default"
labels:
app.kubernetes.io/name: rabbitmq
helm.sh/chart: rabbitmq-11.3.0
app.kubernetes.io/instance: gs-cloud-common
app.kubernetes.io/managed-by: Helm
rules:
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create"]
---
# Source: examples-common/charts/rabbitmq/templates/rolebinding.yaml
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: gs-cloud-common-rabbitmq-endpoint-reader
namespace: "default"
labels:
app.kubernetes.io/name: rabbitmq
helm.sh/chart: rabbitmq-11.3.0
app.kubernetes.io/instance: gs-cloud-common
app.kubernetes.io/managed-by: Helm
subjects:
- kind: ServiceAccount
name: gs-cloud-common-rabbitmq
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: gs-cloud-common-rabbitmq-endpoint-reader
---
# Source: examples-common/charts/rabbitmq/templates/svc-headless.yaml
apiVersion: v1
kind: Service
metadata:
name: gs-cloud-common-rabbitmq-headless
namespace: "default"
labels:
app.kubernetes.io/name: rabbitmq
helm.sh/chart: rabbitmq-11.3.0
app.kubernetes.io/instance: gs-cloud-common
app.kubernetes.io/managed-by: Helm
spec:
clusterIP: None
ports:
- name: epmd
port: 4369
targetPort: epmd
- name: amqp
port: 5672
targetPort: amqp
- name: dist
port: 25672
targetPort: dist
- name: http-stats
port: 15672
targetPort: stats
selector:
app.kubernetes.io/name: rabbitmq
app.kubernetes.io/instance: gs-cloud-common
publishNotReadyAddresses: true
---
# Source: examples-common/charts/rabbitmq/templates/svc.yaml
apiVersion: v1
kind: Service
metadata:
name: gs-cloud-common-rabbitmq
namespace: "default"
labels:
app.kubernetes.io/name: rabbitmq
helm.sh/chart: rabbitmq-11.3.0
app.kubernetes.io/instance: gs-cloud-common
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
sessionAffinity: None
ports:
- name: amqp
port: 5672
targetPort: amqp
nodePort: null
- name: epmd
port: 4369
targetPort: epmd
nodePort: null
- name: dist
port: 25672
targetPort: dist
nodePort: null
- name: http-stats
port: 15672
targetPort: stats
nodePort: null
selector:
app.kubernetes.io/name: rabbitmq
app.kubernetes.io/instance: gs-cloud-common
---
# Source: examples-common/charts/rabbitmq/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: gs-cloud-common-rabbitmq
namespace: "default"
labels:
app.kubernetes.io/name: rabbitmq
helm.sh/chart: rabbitmq-11.3.0
app.kubernetes.io/instance: gs-cloud-common
app.kubernetes.io/managed-by: Helm
spec:
serviceName: gs-cloud-common-rabbitmq-headless
podManagementPolicy: OrderedReady
replicas: 1
updateStrategy:
type: RollingUpdate
selector:
matchLabels:
app.kubernetes.io/name: rabbitmq
app.kubernetes.io/instance: gs-cloud-common
template:
metadata:
labels:
app.kubernetes.io/name: rabbitmq
helm.sh/chart: rabbitmq-11.3.0
app.kubernetes.io/instance: gs-cloud-common
app.kubernetes.io/managed-by: Helm
annotations:
checksum/config: fc0b91f081a2da0a894a7149dd689d8172b001c909cc4ddd69dc0756d5a23efe
checksum/secret: 64eee992842d0a7c32d44afabdfa8275b70fbe0dcb28383ae34828f40bca333b
spec:
serviceAccountName: gs-cloud-common-rabbitmq
affinity:
podAffinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/name: rabbitmq
app.kubernetes.io/instance: gs-cloud-common
topologyKey: kubernetes.io/hostname
weight: 1
nodeAffinity:
securityContext:
fsGroup: 1001
terminationGracePeriodSeconds: 120
initContainers:
containers:
- name: rabbitmq
image: docker.io/bitnami/rabbitmq:3.9.13-debian-10-r14
imagePullPolicy: "IfNotPresent"
securityContext:
runAsNonRoot: true
runAsUser: 1001
lifecycle:
preStop:
exec:
command:
- /bin/bash
- -ec
- |
if [[ -f /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh ]]; then
/opt/bitnami/scripts/rabbitmq/nodeshutdown.sh -t "120" -d "false"
else
rabbitmqctl stop_app
fi
env:
- name: BITNAMI_DEBUG
value: "false"
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: K8S_SERVICE_NAME
value: gs-cloud-common-rabbitmq-headless
- name: K8S_ADDRESS_TYPE
value: hostname
- name: RABBITMQ_FORCE_BOOT
value: "no"
- name: RABBITMQ_NODE_NAME
value: "rabbit@$(MY_POD_NAME).$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.cluster.local"
- name: K8S_HOSTNAME_SUFFIX
value: ".$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.cluster.local"
- name: RABBITMQ_MNESIA_DIR
value: "/bitnami/rabbitmq/mnesia/$(RABBITMQ_NODE_NAME)"
- name: RABBITMQ_LDAP_ENABLE
value: "no"
- name: RABBITMQ_LOGS
value: "-"
- name: RABBITMQ_ULIMIT_NOFILES
value: "65536"
- name: RABBITMQ_USE_LONGNAME
value: "true"
- name: RABBITMQ_ERL_COOKIE
valueFrom:
secretKeyRef:
name: gs-cloud-common-rabbitmq
key: rabbitmq-erlang-cookie
- name: RABBITMQ_LOAD_DEFINITIONS
value: "no"
- name: RABBITMQ_DEFINITIONS_FILE
value: "/app/load_definition.json"
- name: RABBITMQ_SECURE_PASSWORD
value: "yes"
- name: RABBITMQ_USERNAME
value: "geoserver"
- name: RABBITMQ_PASSWORD
valueFrom:
secretKeyRef:
name: gs-cloud-common-rabbitmq
key: rabbitmq-password
- name: RABBITMQ_PLUGINS
value: "rabbitmq_management, rabbitmq_peer_discovery_k8s, rabbitmq_auth_backend_ldap"
envFrom:
ports:
- name: amqp
containerPort: 5672
- name: dist
containerPort: 25672
- name: stats
containerPort: 15672
- name: epmd
containerPort: 4369
livenessProbe:
failureThreshold: 6
initialDelaySeconds: 120
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 20
exec:
command:
- /bin/bash
- -ec
- rabbitmq-diagnostics -q ping
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 20
exec:
command:
- /bin/bash
- -ec
- rabbitmq-diagnostics -q check_running && rabbitmq-diagnostics -q check_local_alarms
resources:
limits:
cpu: 2
memory: 2Gi
requests:
cpu: 0.1
memory: 512Mi
volumeMounts:
- name: configuration
mountPath: /bitnami/rabbitmq/conf
- name: data
mountPath: /bitnami/rabbitmq/mnesia
volumes:
- name: configuration
projected:
sources:
- secret:
name: gs-cloud-common-rabbitmq-config
- name: data
emptyDir: {}