{{ $currentScope := .}} {{- range $i, $ru := .Values.rus }} {{- $_ := set $ "ru" $ru }} --- apiVersion: v1 kind: ConfigMap metadata: name: {{ $ru.name }}-configmap labels: sim-name: {{ $ru.name }} release: {{ $.Release.Name }} chart: {{ $.Chart.Name }} data: {{ tpl ($.Files.Glob "resources/config/*.{json,xml}").AsConfig $ | indent 2 }} {{- end }}