{{- if .Values.enabled }}
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ template "teleport-cluster.operator.serviceAccountName" . }}
  namespace: {{ .Release.Namespace }}
  {{- if .Values.annotations.serviceAccount }}
  annotations: {{- toYaml .Values.annotations.serviceAccount | nindent 4 }}
  {{- end }}
{{- end }}
{{- end }}
