Skip to content

Commit 6bda2f6

Browse files
committed
make RBAC changes only when role-sync-controller is enabled
1 parent c8b3679 commit 6bda2f6

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

cluster/manifests/roles/collaborator-roles.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ rules:
1414
- update
1515
- patch
1616
- delete
17+
{{ if eq .Cluster.ConfigItems.role_sync_controller_enabled "true" }}
1718
- apiGroups:
1819
- ""
1920
resources:
@@ -22,6 +23,7 @@ rules:
2223
- get
2324
- list
2425
- watch
26+
{{ end }}
2527
---
2628
kind: RoleBinding
2729
apiVersion: rbac.authorization.k8s.io/v1

cluster/manifests/roles/poweruser-role.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,21 @@ rules:
5858
- services/proxy
5959
verbs:
6060
- get
61+
{{ if ne .Cluster.ConfigItems.role_sync_controller_enabled "true" }}
62+
- apiGroups:
63+
- ''
64+
resources:
65+
- secrets
66+
verbs:
67+
- create
68+
- delete
69+
- deletecollection
70+
- get
71+
- list
72+
- patch
73+
- update
74+
- watch
75+
{{ end }}
6176
- apiGroups:
6277
- ''
6378
- extensions

0 commit comments

Comments
 (0)