{{- if .Values.apmConfig }}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "apm.fullname" . }}-config
  labels:
    app: "{{ template "apm.fullname" . }}"
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    heritage: {{ .Release.Service | quote }}
    release: {{ .Release.Name | quote }}
data:
{{- range $path, $config := .Values.apmConfig }}
  {{ $path }}: |
{{ $config | indent 4 -}}
{{- end -}}
{{- end -}}
