argocd-helm/charts/argo-cd/templates/argocd-server/serviceaccount.yaml
Mattias Ängehov 197526a40b
feat(argo-cd): Add support for labels on Service Accounts (#1513)
* Allow configuring labels on service accounts

Signed-off-by: Mattias Ängehov <mattias.angehov@castoredc.com>

* Update documentation

Signed-off-by: Mattias Ängehov <mattias.angehov@castoredc.com>

* Update version and changes

Signed-off-by: Mattias Ängehov <mattias.angehov@castoredc.com>

Signed-off-by: Mattias Ängehov <mattias.angehov@castoredc.com>
2022-10-06 15:31:51 +01:00

18 lines
714 B
YAML

{{- if .Values.server.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: {{ .Values.server.serviceAccount.automountServiceAccountToken }}
metadata:
name: {{ template "argo-cd.serverServiceAccountName" . }}
{{- if .Values.server.serviceAccount.annotations }}
annotations:
{{- range $key, $value := .Values.server.serviceAccount.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
{{- range $key, $value := .Values.server.serviceAccount.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}