Skip to content

Commit d02286d

Browse files
committed
template jobs.extra_hooks[].command
use range over command
1 parent 591064b commit d02286d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

templates/jobs.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,10 @@ spec:
595595
- secretRef:
596596
name: {{ . }}
597597
{{- end }}
598-
command: {{- required "Each entry in jobs.extra_hooks must include the 'command' to run." .command | toYaml | nindent 10 }}
598+
command:
599+
{{- range (required "Each entry in jobs.extra_hooks must include the 'command' to run." .command) }}
600+
{{- tpl . $ | list | toYaml | nindent 10 }}
601+
{{- end }}
599602
volumeMounts:
600603
- name: st2client-config-vol
601604
mountPath: /root/.st2/

values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,7 @@ jobs:
902902
# See available hooks list: https://helm.sh/docs/topics/charts_hooks/#the-available-hooks
903903
extra_hooks: []
904904
# Each item in extra_hooks must define a 'name' and the "helm.sh/hook" value in 'hook'.
905+
# Note that Helm templating is supported in the 'command' block!
905906
#
906907
# - name: init-workflow # required name
907908
# hook: post-install # required "helm.sh/hook"

0 commit comments

Comments
 (0)