helm-charts/charts/library/common/templates/lib/container/fields/_args.tpl
2023-09-13 11:24:23 +02:00

26 lines
688 B
Smarty

{{/*
Args used by the container.
*/}}
{{- define "bjw-s.common.lib.container.field.args" -}}
{{- $ctx := .ctx -}}
{{- $containerObject := $ctx.containerObject -}}
{{- /* Default to empty list */ -}}
{{- $args := list -}}
{{- /* See if an override is desired */ -}}
{{- if not (empty (get $containerObject "args")) -}}
{{- $option := get $containerObject "args" -}}
{{- if not (empty $option) -}}
{{- if kindIs "string" $option -}}
{{- $args = append $args $option -}}
{{- else -}}
{{- $args = $option -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if not (empty $args) -}}
{{- $args | toYaml -}}
{{- end -}}
{{- end -}}