From 4e0bf1e19d75f3efc9f48f422440455a11f5c95a Mon Sep 17 00:00:00 2001 From: Sergey <41047934+1Psy@users.noreply.github.com> Date: Mon, 26 Apr 2021 21:55:12 +0300 Subject: [PATCH] fix(argocd-notifications): Changes to rules RBAC role. (#697) add role resourceNames argoproj-labs/argocd-notifications#199 allow configmap/secret list verb argoproj-labs/argocd-notifications#244 Signed-off-by: 1Psy <41047934+1Psy@users.noreply.github.com> --- charts/argocd-notifications/Chart.yaml | 2 +- .../templates/bots/slack/role.yaml | 18 +++++++++--------- .../argocd-notifications/templates/role.yaml | 19 +++++++++++++++++-- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/charts/argocd-notifications/Chart.yaml b/charts/argocd-notifications/Chart.yaml index 881c18ae..04851ad0 100644 --- a/charts/argocd-notifications/Chart.yaml +++ b/charts/argocd-notifications/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 1.1.1 description: A Helm chart for ArgoCD notifications, an add-on to ArgoCD. name: argocd-notifications type: application -version: 1.1.2 +version: 1.1.3 home: https://github.com/argoproj/argo-helm icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png keywords: diff --git a/charts/argocd-notifications/templates/bots/slack/role.yaml b/charts/argocd-notifications/templates/bots/slack/role.yaml index b509f6d4..5193a109 100644 --- a/charts/argocd-notifications/templates/bots/slack/role.yaml +++ b/charts/argocd-notifications/templates/bots/slack/role.yaml @@ -4,6 +4,15 @@ kind: Role metadata: name: {{ include "argocd-notifications.name" . }}-bot rules: +- apiGroups: + - "" + resources: + - secrets + - configmaps + verbs: + - get + - list + - watch - apiGroups: - argoproj.io resources: @@ -15,13 +24,4 @@ rules: - watch - update - patch -- apiGroups: - - "" - resources: - - secrets - - configmaps - verbs: - - get - - list - - watch {{ end }} diff --git a/charts/argocd-notifications/templates/role.yaml b/charts/argocd-notifications/templates/role.yaml index fcd99ef6..0b07afd7 100644 --- a/charts/argocd-notifications/templates/role.yaml +++ b/charts/argocd-notifications/templates/role.yaml @@ -19,9 +19,24 @@ rules: - apiGroups: - "" resources: + - configmaps - secrets + verbs: + - list + - watch +- apiGroups: + - "" + resourceNames: + - {{ include "argocd-notifications.name" . }}-cm + resources: - configmaps verbs: - get - - list - - watch +- apiGroups: + - "" + resourceNames: + - {{ include "argocd-notifications.name" . }}-secret + resources: + - secrets + verbs: + - get \ No newline at end of file