mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-03 19:54:17 -03:00
Create _scheduleList.tpl
This commit is contained in:
18
library/common/templates/values/lists/_scheduleList.tpl
Normal file
18
library/common/templates/values/lists/_scheduleList.tpl
Normal file
@@ -0,0 +1,18 @@
|
||||
{{- define "tc.v1.common.values.schedulesList" -}}
|
||||
{{- $rootCtx := . -}}
|
||||
|
||||
{{- range $idx, $scheduleValues := $rootCtx.Values.schedulesList -}}
|
||||
|
||||
{{- $name := (printf "schedules-list-%s" (toString $idx)) -}}
|
||||
|
||||
{{- with $scheduleValues.name -}}
|
||||
{{- $name = . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if not (hasKey $rootCtx.Values "schedules") -}}
|
||||
{{- $_ := set $rootCtx.Values "schedules" dict -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $_ := set $rootCtx.Values.schedules $name $scheduleValues -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user