{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ template "pgadmin4.serviceAccountName" . }}
  {{- with .Values.commonLabels }}
  labels: {{ . | toYaml | nindent 4 }}
  {{- end }}
  {{- with .Values.commonAnnotations }}
  annotations: {{ . | toYaml | nindent 4 }}
  {{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- end }}