Sprig list
Jump to navigation
Jump to search
External
Internal
Helm Patterns
Creating a list:
{{- $ExampleList := list -}}
{{- $ExampleList := list "element1" "element2" $OtherVar -}}
Appending an element:
{{- $_0 := append $ExampleList "element3" -}}
Use Cases
A sprig list can be used directly in a Helm manifest as value for a path that expects a list:
apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
containers:
- name: example
args: {{ .Args.CommandArgList }}
...
Functions
join
{{ .Values.aList | join ',' }}