argocd-helm/charts/argo-cd/templates/argocd-notifications/clusterrolebinding.yaml
Denis Kadyshev 4afebb25f6
fix(argo-cd): Create notifications clusterrole and clusterrolebinding when enabled (#2326)
* Create clusterrole for nitifications only when notifications enabled

Signed-off-by: Denis Kadyshev <metajiji@gmail.com>

* Create clusterrolebinding for nitifications only when notifications enbaled

Signed-off-by: Denis Kadyshev <metajiji@gmail.com>

* Bump version in Chart.yaml

Signed-off-by: Denis Kadyshev <metajiji@gmail.com>

* Update Chart.yaml

Signed-off-by: Denis Kadyshev <metajiji@gmail.com>

* Update Chart.yaml

Signed-off-by: Denis Kadyshev <metajiji@gmail.com>

---------

Signed-off-by: Denis Kadyshev <metajiji@gmail.com>
2023-11-02 18:43:50 +09:00

16 lines
626 B
YAML

{{- if and .Values.notifications.enabled .Values.createClusterRoles }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "argo-cd.notifications.fullname" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "argo-cd.notifications.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "argo-cd.notificationsServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}