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