58
58
mountPath : /opt/stackstorm/rbac/assignments/
59
59
- name : st2-rbac-mappings-vol
60
60
mountPath : /opt/stackstorm/rbac/mappings/
61
+ {{- range .Values.jobs.extra_volumes }}
62
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
63
+ {{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
64
+ {{- end }}
61
65
# TODO: Find out default resource limits for this specific service (#5)
62
66
# resources:
63
67
volumes :
71
75
- name : st2-rbac-mappings-vol
72
76
configMap :
73
77
name : {{ .Release.Name }}-st2-rbac-mappings
78
+ {{- range .Values.jobs.extra_volumes }}
79
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
80
+ {{- tpl (required "Each volume must have a 'volume' definition in jobs.extra_volumes" .volume | toYaml) $ | nindent 10 }}
81
+ {{- end }}
74
82
restartPolicy : OnFailure
75
83
{{- if .Values.dnsPolicy }}
76
84
dnsPolicy : {{ .Values.dnsPolicy }}
@@ -156,6 +164,10 @@ spec:
156
164
volumeMounts :
157
165
- name : st2client-config-vol
158
166
mountPath : /root/.st2/
167
+ {{- range .Values.jobs.extra_volumes }}
168
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
169
+ {{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
170
+ {{- end }}
159
171
# `st2 login` doesn't exit on failure correctly, use old methods instead. See bug: https://github.com/StackStorm/st2/issues/4338
160
172
command :
161
173
- ' sh'
@@ -192,6 +204,10 @@ spec:
192
204
- name : st2-apikeys-vol
193
205
mountPath : /etc/st2/apikeys.yaml
194
206
subPath : apikeys.yaml
207
+ {{- range .Values.jobs.extra_volumes }}
208
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
209
+ {{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
210
+ {{- end }}
195
211
# TODO: Find out default resource limits for this specific service (#5)
196
212
# resources:
197
213
volumes :
@@ -201,6 +217,10 @@ spec:
201
217
- name : st2-apikeys-vol
202
218
secret :
203
219
secretName : {{ .Release.Name }}-st2-apikeys
220
+ {{- range .Values.jobs.extra_volumes }}
221
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
222
+ {{- tpl (required "Each volume must have a 'volume' definition in jobs.extra_volumes" .volume | toYaml) $ | nindent 10 }}
223
+ {{- end }}
204
224
restartPolicy : OnFailure
205
225
{{- if .Values.dnsPolicy }}
206
226
dnsPolicy : {{ .Values.dnsPolicy }}
@@ -274,6 +294,10 @@ spec:
274
294
volumeMounts :
275
295
- name : st2client-config-vol
276
296
mountPath : /root/.st2/
297
+ {{- range .Values.jobs.extra_volumes }}
298
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
299
+ {{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
300
+ {{- end }}
277
301
# `st2 login` doesn't exit on failure correctly, use old methods instead. See bug: https://github.com/StackStorm/st2/issues/4338
278
302
command :
279
303
- ' sh'
@@ -312,6 +336,10 @@ spec:
312
336
- name : st2-kv-vol
313
337
mountPath : /etc/st2/st2kv.yaml
314
338
subPath : st2kv.yaml
339
+ {{- range .Values.jobs.extra_volumes }}
340
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
341
+ {{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
342
+ {{- end }}
315
343
# TODO: Find out default resource limits for this specific service (#5)
316
344
# resources:
317
345
volumes :
@@ -322,6 +350,10 @@ spec:
322
350
- name : st2-kv-vol
323
351
secret :
324
352
secretName : {{ .Release.Name }}-st2-kv
353
+ {{- range .Values.jobs.extra_volumes }}
354
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
355
+ {{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
356
+ {{- end }}
325
357
restartPolicy : OnFailure
326
358
{{- if .Values.dnsPolicy }}
327
359
dnsPolicy : {{ .Values.dnsPolicy }}
@@ -396,6 +428,10 @@ spec:
396
428
{{- include "stackstorm-ha.st2-config-volume-mounts" . | nindent 8 }}
397
429
{{- include "stackstorm-ha.pack-configs-volume-mount" . | nindent 8 }}
398
430
{{- include "stackstorm-ha.packs-volume-mounts-for-register-job" . | nindent 8 }}
431
+ {{- range .Values.jobs.extra_volumes }}
432
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
433
+ {{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
434
+ {{- end }}
399
435
{{ end }}
400
436
containers :
401
437
- name : st2-register-content
@@ -424,13 +460,21 @@ spec:
424
460
{{- include "stackstorm-ha.st2-config-volume-mounts" . | nindent 8 }}
425
461
{{- include "stackstorm-ha.packs-volume-mounts-for-register-job" . | nindent 8 }}
426
462
{{- include "stackstorm-ha.pack-configs-volume-mount" . | nindent 8 }}
463
+ {{- range .Values.jobs.extra_volumes }}
464
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
465
+ {{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
466
+ {{- end }}
427
467
# TODO: Find out default resource limits for this specific service (#5)
428
468
# resources:
429
469
volumes :
430
470
{{- include "stackstorm-ha.overrides-configs" . | nindent 8 }}
431
471
{{- include "stackstorm-ha.st2-config-volume" . | nindent 8 }}
432
472
{{- include "stackstorm-ha.packs-volumes" . | nindent 8 }}
433
473
{{- include "stackstorm-ha.pack-configs-volume" . | nindent 8 }}
474
+ {{- range .Values.jobs.extra_volumes }}
475
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
476
+ {{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
477
+ {{- end }}
434
478
restartPolicy : OnFailure
435
479
{{- if .Values.dnsPolicy }}
436
480
dnsPolicy : {{ .Values.dnsPolicy }}
@@ -511,6 +555,10 @@ spec:
511
555
volumeMounts :
512
556
- name : st2client-config-vol
513
557
mountPath : /root/.st2/
558
+ {{- range .Values.jobs.extra_volumes }}
559
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
560
+ {{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
561
+ {{- end }}
514
562
# `st2 login` doesn't exit on failure correctly, use old methods instead. See bug: https://github.com/StackStorm/st2/issues/4338
515
563
command :
516
564
- ' sh'
@@ -548,6 +596,10 @@ spec:
548
596
{{- include "stackstorm-ha.st2-config-volume-mounts" $ | nindent 8 }}
549
597
{{- include "stackstorm-ha.packs-volume-mounts-for-register-job" $ | nindent 8 }}
550
598
{{- include "stackstorm-ha.pack-configs-volume-mount" $ | nindent 8 }}
599
+ {{- range .Values.jobs.extra_volumes }}
600
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
601
+ {{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
602
+ {{- end }}
551
603
{{- if .resources }}
552
604
resources : {{- toYaml .resources | nindent 10 }}
553
605
{{- end }}
@@ -559,6 +611,10 @@ spec:
559
611
{{- include "stackstorm-ha.st2-config-volume" $ | nindent 8 }}
560
612
{{- include "stackstorm-ha.packs-volumes" $ | nindent 8 }}
561
613
{{- include "stackstorm-ha.pack-configs-volume" $ | nindent 8 }}
614
+ {{- range .Values.jobs.extra_volumes }}
615
+ - name : {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
616
+ {{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
617
+ {{- end }}
562
618
restartPolicy : OnFailure
563
619
{{- if $.Values.dnsPolicy }}
564
620
dnsPolicy : {{ $.Values.dnsPolicy }}
0 commit comments