# helm_charts_serviceaccount.yaml
{{- if .Values.rbac.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ template "external-dns.fullname" . }}
  labels: {{ include "external-dns.labels" . | nindent 4 }}
  {{- if .Values.rbac.serviceAccountAnnotations }}
  annotations: {{ toYaml .Values.rbac.serviceAccountAnnotations | nindent 4 }}
  {{- end }}
{{- end }}