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>
This commit is contained in:
kostas-theo 2021-05-26 23:27:12 +02:00 committed by GitHub
parent 6acfdc62ef
commit be7c6c5721
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View file

@ -1,7 +1,7 @@
apiVersion: v2 apiVersion: v2
description: A Helm chart to install Argo-Events in k8s Cluster description: A Helm chart to install Argo-Events in k8s Cluster
name: argo-events name: argo-events
version: 1.4.3 version: 1.5.0
keywords: keywords:
- argo-events - argo-events
- sensor-controller - sensor-controller

View file

@ -5,7 +5,11 @@ kind: ServiceAccount
metadata: metadata:
name: {{ .Values.serviceAccount }} name: {{ .Values.serviceAccount }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- with .Values.serviceAccountAnnotations }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.additionalSaNamespaces }} {{- if .Values.additionalSaNamespaces }}
{{ $annotations := .Values.serviceAccountAnnotations }}
{{ $sa := .Values.serviceAccount }} {{ $sa := .Values.serviceAccount }}
{{- range $namespace := .Values.additionalSaNamespaces }} {{- range $namespace := .Values.additionalSaNamespaces }}
--- ---
@ -14,5 +18,8 @@ kind: ServiceAccount
metadata: metadata:
name: {{ $sa }} name: {{ $sa }}
namespace: {{ $namespace }} namespace: {{ $namespace }}
{{- with $annotations }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View file

@ -14,6 +14,9 @@ installCRD: true
# ServiceAccount to use for running controller. # ServiceAccount to use for running controller.
serviceAccount: argo-events-sa serviceAccount: argo-events-sa
# serviceAccountAnnotations can be used to enable GKE workload identity, or other use-cases
serviceAccountAnnotations: {}
# Create service accounts in additional namespaces specified # Create service accounts in additional namespaces specified
# The SA will always be created in the release namespaces # The SA will always be created in the release namespaces
additionalSaNamespaces: [] additionalSaNamespaces: []