apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "envoy.fullname" . }}
  labels:
    app: {{ template "envoy.name" . }}
    chart: {{ template "envoy.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
data:
{{- range $key, $value := .Values.files }}
  {{ $key }}: |-
{{ $value | default "" | indent 4 }}
{{- end -}}
{{- range $key, $value := .Values.templates }}
  {{ $key }}: |-
{{ $valueWithDefault := default "" $value -}}
{{ tpl $valueWithDefault $ | indent 4 }}
{{- end -}}
