From 74abfee5e5f4e22278fd0c50b6cbf3410f056103 Mon Sep 17 00:00:00 2001 From: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:18:04 +0200 Subject: [PATCH] fix(Traefik Hub): RBAC for distributedAcme --- traefik/templates/rbac/clusterrole.yaml | 2 +- traefik/tests/rbac-config_test.yaml | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/traefik/templates/rbac/clusterrole.yaml b/traefik/templates/rbac/clusterrole.yaml index 60f70acbb..9e52d535d 100644 --- a/traefik/templates/rbac/clusterrole.yaml +++ b/traefik/templates/rbac/clusterrole.yaml @@ -69,7 +69,7 @@ rules: - get - list - watch - {{- if and .Values.hub.token .Values.hub.apimanagement.enabled }} + {{- if and .Values.hub.token }} - update - create - delete diff --git a/traefik/tests/rbac-config_test.yaml b/traefik/tests/rbac-config_test.yaml index e4431974d..201968841 100644 --- a/traefik/tests/rbac-config_test.yaml +++ b/traefik/tests/rbac-config_test.yaml @@ -793,6 +793,22 @@ tests: verbs: - get - list + - template: rbac/clusterrole.yaml + contains: + path: rules + content: + apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch + - update + - create + - delete + - deletecollection - template: rbac/clusterrole.yaml contains: path: rules