{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    {{- include "grafana.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
  annotations:
{{ toYaml . | indent 4 }}
{{- end }}
  name: {{ template "grafana.serviceAccountName" . }}
  namespace: {{ template "grafana.namespace" . }}
{{- end }}
