mirror of https://github.com/grafana/loki
feat(helm): allow extraObjects as dict (#13252)
Signed-off-by: TheRealNoob <mike1118@live.com> Signed-off-by: Jay Clifford <45856600+Jayclifford345@users.noreply.github.com> Co-authored-by: Jay Clifford <45856600+Jayclifford345@users.noreply.github.com> Co-authored-by: J Stickler <julie.stickler@grafana.com>pull/18951/head^2
parent
1cda92572a
commit
6a953bb492
@ -1,8 +1,15 @@ |
||||
{{- range .Values.extraObjects }} |
||||
{{- /* Normalize extraObjects to a list, easier to loop over */ -}} |
||||
{{- $extraObjects := .Values.extraObjects | default (list) -}} |
||||
|
||||
{{- if kindIs "map" $extraObjects -}} |
||||
{{- $extraObjects = values $extraObjects -}} |
||||
{{- end -}} |
||||
|
||||
{{- range $extraObjects }} |
||||
--- |
||||
{{ if kindIs "map" . }} |
||||
{{ tpl (toYaml .) $ }} |
||||
{{ else }} |
||||
{{ tpl . $ }} |
||||
{{ end }} |
||||
{{- if kindIs "map" . }} |
||||
{{- tpl (toYaml .) $ | nindent 0 }} |
||||
{{- else if kindIs "string" . }} |
||||
{{- tpl . $ | nindent 0 }} |
||||
{{- end }} |
||||
{{- end }} |
||||
|
||||
Loading…
Reference in new issue