{{- if .Values.serviceAccounts.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
{{- if .Values.serviceAccounts.annotations }}
  annotations:
{{ .Values.serviceAccounts.annotations | indent 4}}
{{- end }}
  labels:
    app: {{ template "wekan.name" . }}
    chart: {{ template "wekan.chart" . }}
    component: wekan
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
  name: {{ template "wekan.serviceAccountName" . }}
{{- end }}
