argocd-helm/charts/argo-cd/templates/argocd-notifications/clusterrole.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

22 lines
609 B
YAML

{{- if and .Values.notifications.enabled .Values.createClusterRoles }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "argo-cd.notifications.fullname" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
rules:
{{- with .Values.notifications.clusterRoleRules.rules }}
{{- toYaml . | nindent 2 }}
{{- end }}
- apiGroups:
- "argoproj.io"
resources:
- "applications"
verbs:
- get
- list
- watch
- update
- patch
{{- end }}