Skip to content

lentil1016/helm-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

helm-examples

helm template examples.

Numeric loop

Create a numeric looping from 0 to n by set a integer value in values.yaml

$ cat values.yaml
count: 3

$ cat templates/loop.yaml
{{ $count := .Values.count | int  }}
{{- range until $count }}
count to {{.}}
{{- end }}

It will produce

count to 0
count to 1
count to 2

further more, you can change the pipeline function from until to untilStep to custom the range and step of loop variable.

{{- range until 0 10 2 }}
count to {{.}}
{{- end }}

It will produce

count to 0
count to 2
count to 4
count to 6
count to 8

About

helm template examples.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published