1
+ # #### Node Service Account, Roles, RoleBindings
2
+ apiVersion : v1
3
+ kind : ServiceAccount
4
+ metadata :
5
+ name : csi-node-sa
6
+
7
+ ---
8
+
1
9
kind : ClusterRole
2
10
apiVersion : rbac.authorization.k8s.io/v1
3
11
metadata :
4
12
name : driver-registrar-role
5
13
rules :
6
- - apiGroups : [""]
7
- resources : ["nodes"]
8
- verbs : ["get", "update"]
9
14
- apiGroups : [""]
10
15
resources : ["events"]
11
- verbs : ["list", "watch", "create", "update", "patch"]
16
+ verbs : ["get", " list", "watch", "create", "update", "patch"]
12
17
13
- ---
14
-
15
- apiVersion : v1
16
- kind : ServiceAccount
17
- metadata :
18
- name : csi-node-sa
19
18
20
19
---
21
20
22
21
kind : ClusterRoleBinding
23
22
apiVersion : rbac.authorization.k8s.io/v1
24
23
metadata :
25
- name : driver-reigstrar -binding
24
+ name : driver-registrar -binding
26
25
subjects :
27
26
- kind : ServiceAccount
28
27
name : csi-node-sa
@@ -33,48 +32,97 @@ roleRef:
33
32
apiGroup : rbac.authorization.k8s.io
34
33
35
34
---
36
-
35
+ # #### Controller Service Account, Roles, Rolebindings
37
36
apiVersion : v1
38
37
kind : ServiceAccount
39
38
metadata :
40
39
name : csi-controller-sa
41
40
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
+
42
70
---
43
71
44
72
kind : ClusterRoleBinding
45
73
apiVersion : rbac.authorization.k8s.io/v1
46
74
metadata :
47
- name : csi-controller-attacher -binding
75
+ name : csi-controller-provisioner -binding
48
76
subjects :
49
77
- kind : ServiceAccount
50
78
name : csi-controller-sa
51
79
namespace : default
52
80
roleRef :
53
81
kind : ClusterRole
54
- name : system:csi- external-attacher
82
+ name : external-provisioner-role
55
83
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"]
56
104
57
105
---
58
106
59
107
kind : ClusterRoleBinding
60
108
apiVersion : rbac.authorization.k8s.io/v1
61
109
metadata :
62
- name : csi-controller-provisioner -binding
110
+ name : csi-controller-attacher -binding
63
111
subjects :
64
112
- kind : ServiceAccount
65
113
name : csi-controller-sa
66
114
namespace : default
67
115
roleRef :
68
116
kind : ClusterRole
69
- name : system:csi- external-provisioner
117
+ name : external-attacher-role
70
118
apiGroup : rbac.authorization.k8s.io
71
119
72
120
---
73
-
121
+ # xref: https://github.com/kubernetes-csi/external-snapshotter/blob/master/deploy/kubernetes/rbac.yaml
74
122
apiVersion : rbac.authorization.k8s.io/v1
75
123
kind : ClusterRole
76
124
metadata :
77
- name : system:csi- external-snapshotter
125
+ name : external-snapshotter-role
78
126
rules :
79
127
- apiGroups : ["snapshot.storage.k8s.io"]
80
128
resources : ["volumesnapshotclasses"]
@@ -110,5 +158,5 @@ subjects:
110
158
namespace : default
111
159
roleRef :
112
160
kind : ClusterRole
113
- name : system:csi- external-snapshotter
161
+ name : external-snapshotter-role
114
162
apiGroup : rbac.authorization.k8s.io
0 commit comments