diff --git a/charts/ix-chart/2009.0.1/templates/_helpers.tpl b/charts/ix-chart/2009.0.1/templates/_helpers.tpl index cc466748a1..3d22e96fac 100644 --- a/charts/ix-chart/2009.0.1/templates/_helpers.tpl +++ b/charts/ix-chart/2009.0.1/templates/_helpers.tpl @@ -61,3 +61,11 @@ Create the name of the service account to use {{- default "default" .Values.serviceAccount.name }} {{- end }} {{- end }} + + +{{/* +Convert cron schema object to cron format +*/}} +{{- define "cronExpression" }} +{{- printf "%s %s %s %s %s " .minute .hour .dom .month .dow }} +{{- end }} diff --git a/charts/ix-chart/2009.0.1/templates/_workload.tpl b/charts/ix-chart/2009.0.1/templates/_workload.tpl index 5e420ad542..e28eb5a9f5 100644 --- a/charts/ix-chart/2009.0.1/templates/_workload.tpl +++ b/charts/ix-chart/2009.0.1/templates/_workload.tpl @@ -127,7 +127,7 @@ template: CronJob Spec */}} {{- define "cronJobSpec" }} -schedule: {{ .Values.cronSchedule | quote }} +schedule: {{ include "cronExpression" .Values.cronSchedule | quote }} jobTemplate: spec: {{ include "jobSpec" . | nindent 4 }} diff --git a/charts/ix-chart/2009.0.1/templates/workload.yaml b/charts/ix-chart/2009.0.1/templates/workload.yaml index 05e23802cc..98df32b18a 100644 --- a/charts/ix-chart/2009.0.1/templates/workload.yaml +++ b/charts/ix-chart/2009.0.1/templates/workload.yaml @@ -9,6 +9,6 @@ spec: {{ include "deploymentSpec" . | nindent 2 }} {{- else if eq (include "workloadIsCronJob" .) "true" }} {{ include "cronJobSpec" . | nindent 2 }} - {{- else }}} + {{- else }} {{ include "jobSpec" . | nindent 2 }} {{- end }}