diff --git a/library/common/templates/values/lists/_scheduleList.tpl b/library/common/templates/values/lists/_scheduleList.tpl new file mode 100644 index 00000000..651f998d --- /dev/null +++ b/library/common/templates/values/lists/_scheduleList.tpl @@ -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 -}}