Skip to content

Commit ada2662

Browse files
committed
fix invalid jobs
1 parent 63a4449 commit ada2662

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

templates/jobs.yaml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,6 @@ spec:
164164
volumeMounts:
165165
- name: st2client-config-vol
166166
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 }}
171167
# `st2 login` doesn't exit on failure correctly, use old methods instead. See bug: https://github.com/StackStorm/st2/issues/4338
172168
command:
173169
- 'sh'
@@ -294,10 +290,6 @@ spec:
294290
volumeMounts:
295291
- name: st2client-config-vol
296292
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 }}
301293
# `st2 login` doesn't exit on failure correctly, use old methods instead. See bug: https://github.com/StackStorm/st2/issues/4338
302294
command:
303295
- 'sh'
@@ -352,7 +344,7 @@ spec:
352344
secretName: {{ .Release.Name }}-st2-kv
353345
{{- range .Values.jobs.extra_volumes }}
354346
- 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 }}
347+
{{- tpl (required "Each volume must have a 'volume' definition in jobs.extra_volumes" .volume | toYaml) $ | nindent 10 }}
356348
{{- end }}
357349
restartPolicy: OnFailure
358350
{{- if .Values.dnsPolicy }}
@@ -428,10 +420,6 @@ spec:
428420
{{- include "stackstorm-ha.st2-config-volume-mounts" . | nindent 8 }}
429421
{{- include "stackstorm-ha.pack-configs-volume-mount" . | nindent 8 }}
430422
{{- 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 }}
435423
{{ end }}
436424
containers:
437425
- name: st2-register-content
@@ -473,7 +461,7 @@ spec:
473461
{{- include "stackstorm-ha.pack-configs-volume" . | nindent 8 }}
474462
{{- range .Values.jobs.extra_volumes }}
475463
- 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 }}
464+
{{- tpl (required "Each volume must have a 'volume' definition in jobs.extra_volumes" .volume | toYaml) $ | nindent 10 }}
477465
{{- end }}
478466
restartPolicy: OnFailure
479467
{{- if .Values.dnsPolicy }}
@@ -555,10 +543,6 @@ spec:
555543
volumeMounts:
556544
- name: st2client-config-vol
557545
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 }}
562546
# `st2 login` doesn't exit on failure correctly, use old methods instead. See bug: https://github.com/StackStorm/st2/issues/4338
563547
command:
564548
- 'sh'
@@ -613,7 +597,7 @@ spec:
613597
{{- include "stackstorm-ha.pack-configs-volume" $ | nindent 8 }}
614598
{{- range .Values.jobs.extra_volumes }}
615599
- 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 }}
600+
{{- tpl (required "Each volume must have a 'volume' definition in jobs.extra_volumes" .volume | toYaml) $ | nindent 10 }}
617601
{{- end }}
618602
restartPolicy: OnFailure
619603
{{- if $.Values.dnsPolicy }}

0 commit comments

Comments
 (0)