{{- if .Values.createConfigmap }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "grafana.fullname" . }}
  namespace: {{ include "grafana.namespace" . }}
  labels:
    {{- include "grafana.labels" . | nindent 4 }}
  {{- with .Values.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
data:
  {{- include "grafana.configData" . | nindent 2 }}
{{- end }}
