{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  namespace: {{ .Release.Namespace }}
  labels:
    app: {{ template "newrelic.name" . }}
    chart: {{ template "newrelic.chart" . }}
    heritage: "{{ .Release.Service }}"
    release: "{{ .Release.Name }}"
  name: {{ template "newrelic.serviceAccountName" . }}
{{- end -}}
