move tpl higher

This commit is contained in:
Stavros kois
2023-01-25 18:31:37 +02:00
parent e315fa72da
commit 2bd5c11df0
2 changed files with 3 additions and 3 deletions
@@ -4,8 +4,6 @@
{{- $values := .values -}}
{{- $inherit := "inherit" -}}
{{- $values = fromYaml (tpl ($values | toYaml) $root) -}}
{{/* Prepare values */}}
{{- $saName := "" -}}
{{- with $values.serviceAccountName -}}
@@ -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) -}}