File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,8 @@ post_apply:
313
313
- name : role-sync-controller
314
314
kind : CronJob
315
315
namespace : kube-system
316
+ - name : role-sync-controller
317
+ kind : ClusterRole
316
318
- name : role-sync-controller
317
319
kind : ClusterRoleBinding
318
320
- name : role-sync-controller
Original file line number Diff line number Diff line change 1
1
{{ if eq .Cluster.ConfigItems.role_sync_controller_enabled "true" }}
2
2
apiVersion : rbac.authorization.k8s.io/v1
3
+ kind : ClusterRole
4
+ metadata :
5
+ name : role-sync-controller
6
+ labels :
7
+ application : kubernetes
8
+ component : role-sync-controller
9
+ rules :
10
+ # Allow the controller to list namespaces
11
+ - apiGroups :
12
+ - " "
13
+ resources :
14
+ - " namespaces"
15
+ verbs :
16
+ - " list"
17
+ # Allow the controller to manage Roles and Rolebindings
18
+ - apiGroups :
19
+ - rbac.authorization.k8s.io
20
+ resources :
21
+ - roles
22
+ - rolebindings
23
+ verbs :
24
+ - " get"
25
+ - " create"
26
+ - " update"
27
+ # Allow the controller to manage roles based on reading Secrets
28
+ - apiGroups :
29
+ - " "
30
+ resources :
31
+ - secrets
32
+ verbs :
33
+ - " get"
34
+ - " list"
35
+ - " watch"
36
+ ---
37
+ apiVersion : rbac.authorization.k8s.io/v1
3
38
kind : ClusterRoleBinding
4
39
metadata :
5
40
name : role-sync-controller
@@ -9,7 +44,7 @@ metadata:
9
44
roleRef :
10
45
apiGroup : rbac.authorization.k8s.io
11
46
kind : ClusterRole
12
- name : poweruser
47
+ name : role-sync-controller
13
48
subjects :
14
49
- kind : ServiceAccount
15
50
name : role-sync-controller
You can’t perform that action at this time.
0 commit comments