argocd-helm/charts/argo-events/templates/argo-events-webhook/clusterrolebinding.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
569 B
YAML

{{- if and .Values.webhook.enabled (not .Values.controller.rbac.namespaced) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "argo-events.webhook.fullname" . }}
labels:
{{- include "argo-events.labels" (dict "context" . "name" .Values.webhook.name) | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: argo-events-webhook
subjects:
- kind: ServiceAccount
name: {{ include "argo-events.webhook.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}