diff --git a/library/common/1.0.0/templates/lib/job/_jobPod.tpl b/library/common/1.0.0/templates/lib/job/_jobPod.tpl index fade957678..9119aa6dcc 100644 --- a/library/common/1.0.0/templates/lib/job/_jobPod.tpl +++ b/library/common/1.0.0/templates/lib/job/_jobPod.tpl @@ -4,8 +4,6 @@ {{- $values := .values -}} {{- $inherit := "inherit" -}} -{{- $values = fromYaml (tpl ($values | toYaml) $root) -}} - {{/* Prepare values */}} {{- $saName := "" -}} {{- with $values.serviceAccountName -}} diff --git a/library/common/1.0.0/templates/spawner/_jobAndCronJob.tpl b/library/common/1.0.0/templates/spawner/_jobAndCronJob.tpl index f82e10a0b9..cb07d7623f 100644 --- a/library/common/1.0.0/templates/spawner/_jobAndCronJob.tpl +++ b/library/common/1.0.0/templates/spawner/_jobAndCronJob.tpl @@ -9,7 +9,7 @@ {{/* If it's CronJob prepare the cron dict with enabled forced */}} {{- if eq $.Values.controller.type "CronJob" -}} - {{- $_ := set $jobValues "cron" $.Values.controller -}} + {{- $_ := set $jobValues "cron" (mustDeepCopy $.Values.controller) -}} {{- $_ := set $jobValues.cron "enabled" true -}} {{- end -}} @@ -62,6 +62,8 @@ {{- $_ := set $jobValues "nameOverride" $jobName -}} {{- end -}} + {{- $jobValues = fromYaml (tpl ($jobValues | toYaml) $) -}} + {{- if hasKey $job "cron" -}} {{- if $job.cron.enabled -}} {{- include "ix.v1.common.class.cronJob" (dict "root" $ "job" $jobValues) -}}