mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 17:07:04 +02:00
Co-authored-by: Maurits <75321636+maurits-funda@users.noreply.github.com> Co-authored-by: Noam Lerner <bugok@users.noreply.github.com>
14 lines
428 B
Smarty
14 lines
428 B
Smarty
{{/*
|
|
Convert job values to an object
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.job.valuesToObject" -}}
|
|
{{- $rootContext := .rootContext -}}
|
|
{{- $identifier := .id -}}
|
|
{{- $objectValues := .values -}}
|
|
|
|
{{- $restartPolicy := default "Never" $objectValues.pod.restartPolicy -}}
|
|
{{- $_ := set $objectValues.pod "restartPolicy" $restartPolicy -}}
|
|
|
|
{{- /* Return the Job object */ -}}
|
|
{{- $objectValues | toYaml -}}
|
|
{{- end -}}
|