mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 17:07:04 +02:00
26 lines
688 B
Smarty
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 -}}
|