feat: Add annotations to argo-events-sa

Signed-off-by: kostas-theo <ktheo@oneconcern.com>
This commit is contained in:
kostas-theo 2021-04-20 18:15:17 +02:00
parent 913a623dfb
commit 7c06060a93
3 changed files with 11 additions and 1 deletions

View file

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

View file

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

View file

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