{{- if eq .Values.configMap "" }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "chart.configname" .}}
  namespace: {{ .Release.Namespace }}
  labels: {{- include "chart.labels" . | nindent 4 }}
  {{- if .Values.extraLabels}}
  {{ toYaml .Values.extraLabels | nindent 4 }}
  {{- end}}
data:
  config.yaml: |
    {{- with .Values.config }}
    {{ . | toYaml | nindent 4 }}
    {{- end }}
{{- end }}
