argocd-helm/charts/argo-events/templates/argo-events-sa.yaml
kostas-theo be7c6c5721
feat(argo-events): Add annotations to argo-events-sa. (#708)
* feat: sa annotations

Signed-off-by: kostas-theo <ktheo@oneconcern.com>

* fix: review recommendations

Signed-off-by: kostas-theo <ktheo@oneconcern.com>

* fix: Apply review changes

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>

Co-authored-by: Oliver Bähler <oliverbaehler@hotmail.com>
Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
2021-05-26 23:27:12 +02:00

25 lines
756 B
YAML

# All argo-events services are bound to the "argo-events" service account.
# In RBAC enabled setups, this SA is bound to specific roles.
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount }}
namespace: {{ .Release.Namespace }}
{{- with .Values.serviceAccountAnnotations }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.additionalSaNamespaces }}
{{ $annotations := .Values.serviceAccountAnnotations }}
{{ $sa := .Values.serviceAccount }}
{{- range $namespace := .Values.additionalSaNamespaces }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ $sa }}
namespace: {{ $namespace }}
{{- with $annotations }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}