mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
18 lines
548 B
Smarty
18 lines
548 B
Smarty
{{/*
|
|
Convert Cronjob values to an object
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.cronjob.valuesToObject" -}}
|
|
{{- $rootContext := .rootContext -}}
|
|
{{- $identifier := .id -}}
|
|
{{- $objectValues := .values -}}
|
|
|
|
{{- if not (hasKey $objectValues "pod") -}}
|
|
{{- $_ := set $objectValues "pod" dict -}}
|
|
{{- end -}}
|
|
|
|
{{- $restartPolicy := default "Never" $objectValues.pod.restartPolicy -}}
|
|
{{- $_ := set $objectValues.pod "restartPolicy" $restartPolicy -}}
|
|
|
|
{{- /* Return the CronJob object */ -}}
|
|
{{- $objectValues | toYaml -}}
|
|
{{- end -}}
|