argocd-helm/charts/argo-events/templates/argo-events-webhook/serviceaccount.yaml
Aikawa 076cf82ddd
fix(argo-events): add namespace field for namespace scoped resources (#1959)
* fix(argo-events): add namespace field for namespace scoped resources
Signed-off-by: yu-croco <yu.croco@gmail.com>

* Apply suggestion from code review

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

---------

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
2023-04-13 20:38:04 +02:00

16 lines
671 B
YAML

{{- if and .Values.webhook.serviceAccount.create (not .Values.controller.rbac.namespaced) }}
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: {{ .Values.webhook.serviceAccount.automountServiceAccountToken }}
metadata:
name: {{ include "argo-events.webhook.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
{{- with .Values.webhook.serviceAccount.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
{{- include "argo-events.labels" (dict "context" . "component" .Values.webhook.name "name" .Values.webhook.name) | nindent 4 }}
{{- end }}