mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
13 lines
359 B
Smarty
13 lines
359 B
Smarty
{{/*
|
|
Return the value or the specified default if the given value is null.
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.defaultKeepNonNullValue" -}}
|
|
{{- $value := .value -}}
|
|
{{- $default := required "default value is required" .default -}}
|
|
|
|
{{- if eq nil $value -}}
|
|
{{- $default | toYaml -}}
|
|
{{- else -}}
|
|
{{- $value | toYaml -}}
|
|
{{- end -}}
|
|
{{- end }}
|