Skip to content

Commit

Permalink
Finnaly get the correct syntax to yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgianaElena committed Sep 4, 2024
1 parent 0576c13 commit dc39917
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions helm-chart/templates/configmap-yamlconf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ kind: ConfigMap
metadata:
name: {{ include "unnamed.fullname" . }}-django-yamlconf
data:
comptest.yaml: |-
{{- range $key, $value := .Values.yamlSettings.overrides }}
{{- if kindIs "map" $value }}
{{ $key }}: |
{{ toYaml $value | indent 4 }}
{{- else if kindIs "array" $value }}
{{ $key }}: |
{{- else if or (kindIs "array" $value) (kindIs "slice" $value) }}
{{ $key }}:
{{- range $item := $value }}
- {{ $item | quote }}
- {{ $item }}
{{- end }}
{{- else }}
{{ $key }}: {{ $value | quote }}
{{ $key }}: {{ $value }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit dc39917

Please sign in to comment.