1+ # #### Node Service Account, Roles, RoleBindings
2+ apiVersion : v1
3+ kind : ServiceAccount
4+ metadata :
5+ name : csi-node-sa
6+
7+ ---
8+
19kind : ClusterRole
210apiVersion : rbac.authorization.k8s.io/v1
311metadata :
412 name : driver-registrar-role
513rules :
6- - apiGroups : [""]
7- resources : ["nodes"]
8- verbs : ["get", "update"]
914 - apiGroups : [""]
1015 resources : ["events"]
11- verbs : ["list", "watch", "create", "update", "patch"]
16+ verbs : ["get", " list", "watch", "create", "update", "patch"]
1217
13- ---
14-
15- apiVersion : v1
16- kind : ServiceAccount
17- metadata :
18- name : csi-node-sa
1918
2019---
2120
2221kind : ClusterRoleBinding
2322apiVersion : rbac.authorization.k8s.io/v1
2423metadata :
25- name : driver-reigstrar -binding
24+ name : driver-registrar -binding
2625subjects :
2726 - kind : ServiceAccount
2827 name : csi-node-sa
@@ -33,48 +32,97 @@ roleRef:
3332 apiGroup : rbac.authorization.k8s.io
3433
3534---
36-
35+ # #### Controller Service Account, Roles, Rolebindings
3736apiVersion : v1
3837kind : ServiceAccount
3938metadata :
4039 name : csi-controller-sa
4140
41+ ---
42+ # xref: https://github.com/kubernetes-csi/external-provisioner/blob/master/deploy/kubernetes/rbac.yaml
43+ kind : ClusterRole
44+ apiVersion : rbac.authorization.k8s.io/v1
45+ metadata :
46+ name : external-provisioner-role
47+ rules :
48+ - apiGroups : [""]
49+ resources : ["secrets"]
50+ verbs : ["get", "list"]
51+ - apiGroups : [""]
52+ resources : ["persistentvolumes"]
53+ verbs : ["get", "list", "watch", "create", "delete"]
54+ - apiGroups : [""]
55+ resources : ["persistentvolumeclaims"]
56+ verbs : ["get", "list", "watch", "update"]
57+ - apiGroups : ["storage.k8s.io"]
58+ resources : ["storageclasses"]
59+ verbs : ["get", "list", "watch"]
60+ - apiGroups : [""]
61+ resources : ["events"]
62+ verbs : ["list", "watch", "create", "update", "patch"]
63+ - apiGroups : ["snapshot.storage.k8s.io"]
64+ resources : ["volumesnapshots"]
65+ verbs : ["get", "list"]
66+ - apiGroups : ["snapshot.storage.k8s.io"]
67+ resources : ["volumesnapshotcontents"]
68+ verbs : ["get", "list"]
69+
4270---
4371
4472kind : ClusterRoleBinding
4573apiVersion : rbac.authorization.k8s.io/v1
4674metadata :
47- name : csi-controller-attacher -binding
75+ name : csi-controller-provisioner -binding
4876subjects :
4977 - kind : ServiceAccount
5078 name : csi-controller-sa
5179 namespace : default
5280roleRef :
5381 kind : ClusterRole
54- name : system:csi- external-attacher
82+ name : external-provisioner-role
5583 apiGroup : rbac.authorization.k8s.io
84+
85+ ---
86+ # xref: https://github.com/kubernetes-csi/external-attacher/blob/master/deploy/kubernetes/rbac.yaml
87+ kind : ClusterRole
88+ apiVersion : rbac.authorization.k8s.io/v1
89+ metadata :
90+ name : external-attacher-role
91+ rules :
92+ - apiGroups : [""]
93+ resources : ["persistentvolumes"]
94+ verbs : ["get", "list", "watch", "update"]
95+ - apiGroups : [""]
96+ resources : ["nodes"]
97+ verbs : ["get", "list", "watch"]
98+ - apiGroups : ["csi.storage.k8s.io"]
99+ resources : ["csinodeinfos"]
100+ verbs : ["get", "list", "watch"]
101+ - apiGroups : ["storage.k8s.io"]
102+ resources : ["volumeattachments"]
103+ verbs : ["get", "list", "watch", "update"]
56104
57105---
58106
59107kind : ClusterRoleBinding
60108apiVersion : rbac.authorization.k8s.io/v1
61109metadata :
62- name : csi-controller-provisioner -binding
110+ name : csi-controller-attacher -binding
63111subjects :
64112 - kind : ServiceAccount
65113 name : csi-controller-sa
66114 namespace : default
67115roleRef :
68116 kind : ClusterRole
69- name : system:csi- external-provisioner
117+ name : external-attacher-role
70118 apiGroup : rbac.authorization.k8s.io
71119
72120---
73-
121+ # xref: https://github.com/kubernetes-csi/external-snapshotter/blob/master/deploy/kubernetes/rbac.yaml
74122apiVersion : rbac.authorization.k8s.io/v1
75123kind : ClusterRole
76124metadata :
77- name : system:csi- external-snapshotter
125+ name : external-snapshotter-role
78126rules :
79127- apiGroups : ["snapshot.storage.k8s.io"]
80128 resources : ["volumesnapshotclasses"]
@@ -110,5 +158,5 @@ subjects:
110158 namespace : default
111159roleRef :
112160 kind : ClusterRole
113- name : system:csi- external-snapshotter
161+ name : external-snapshotter-role
114162 apiGroup : rbac.authorization.k8s.io
0 commit comments