Skip to content

Commit 4b0a66b

Browse files
committed
Allow overriding the defaults
Signed-off-by: Stephan Austermühle <au@hcsd.de>
1 parent 97f9875 commit 4b0a66b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

charts/nextcloud/templates/cronjobs.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ spec:
1919
{{/* Add the volumeMounts and environment variables to every container */}}
2020
{{- $containers := list -}}
2121
{{- range .jobTemplate.spec.template.spec.containers -}}
22-
{{- $vm := dict "volumeMounts" (concat (default list .volumeMounts) (include "nextcloud.backupCronJobVolumeMounts" $ | fromYamlArray)) -}}
23-
{{- $containers = append $containers (merge $vm .) -}}
24-
{{- $env := concat (default list .env) (include "nextcloud.backupCronJobEnv" $ | fromYamlArray) -}}
25-
{{- $containers = append $containers (merge (dict "env" $env) .) -}}
22+
{{- $vm := dict "volumeMounts" (concat (include "nextcloud.backupCronJobVolumeMounts" $ | fromYamlArray) (default list .volumeMounts)) -}}
23+
{{ $c := merge $vm . }}
24+
{{- $env := dict "env" (concat (include "nextcloud.backupCronJobEnv" $ | fromYamlArray) (default list .env)) -}}
25+
{{ $c = merge $env $c }}
26+
{{- $containers = append $containers $c -}}
2627
{{- end -}}
2728

2829
{{- $newContainers := dict "spec" (dict "template" (dict "spec" (dict "containers" $containers))) -}}

0 commit comments

Comments
 (0)