helm-charts/charts/library/common/templates/lib/container/fields/_args.tpl
2024-08-27 14:47:25 +02:00

24 lines
618 B
Smarty

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