# helm_charts_serviceaccount-patroni.yaml
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ template "patroni.serviceAccountName" . }}
  labels:
    app: {{ template "patroni.fullname" . }}
    chart: {{ template "patroni.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
{{- end }}