feat(argo-cd): add notification cluster role (#2315)

* Add notification cluster role

Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>

* Add notification cluster role

Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>

* Add notification cluster role

Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>

* Add notification cluster role

Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>

---------

Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
This commit is contained in:
Ilia Lazebnik 2023-10-30 16:42:32 +02:00 committed by GitHub
parent 0cc1796530
commit 94c0a0a246
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 48 additions and 3 deletions

View file

@ -0,0 +1,22 @@
{{- if .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 }}

View file

@ -0,0 +1,16 @@
{{- if .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 }}