1
+ # #### Controller Service Account, Roles, Rolebindings
1
2
apiVersion : v1
2
3
kind : ServiceAccount
3
4
metadata :
4
- name : csi-controller-sa
5
+ name : csi-gce-pd- controller-sa
5
6
6
7
---
8
+ # xref: https://github.com/kubernetes-csi/external-provisioner/blob/master/deploy/kubernetes/rbac.yaml
9
+ kind : ClusterRole
10
+ apiVersion : rbac.authorization.k8s.io/v1
11
+ metadata :
12
+ name : csi-gce-pd-provisioner-role
13
+ rules :
14
+ - apiGroups : [""]
15
+ resources : ["persistentvolumes"]
16
+ verbs : ["get", "list", "watch", "create", "delete"]
17
+ - apiGroups : [""]
18
+ resources : ["persistentvolumeclaims"]
19
+ verbs : ["get", "list", "watch", "update"]
20
+ - apiGroups : ["storage.k8s.io"]
21
+ resources : ["storageclasses"]
22
+ verbs : ["get", "list", "watch"]
23
+ - apiGroups : [""]
24
+ resources : ["events"]
25
+ verbs : ["list", "watch", "create", "update", "patch"]
26
+ - apiGroups : ["storage.k8s.io"]
27
+ resources : ["csinodes"]
28
+ verbs : ["get", "list", "watch"]
29
+ - apiGroups : [""]
30
+ resources : ["nodes"]
31
+ verbs : ["get", "list", "watch"]
32
+
33
+ ---
34
+
7
35
kind : ClusterRoleBinding
8
36
apiVersion : rbac.authorization.k8s.io/v1
9
37
metadata :
10
- name : csi-controller-attacher-role
38
+ name : csi-gce-pd- controller-provisioner-binding
11
39
subjects :
12
40
- kind : ServiceAccount
13
- name : csi-controller-sa
14
- namespace : default
41
+ name : csi-gce-pd-controller-sa
15
42
roleRef :
16
43
kind : ClusterRole
17
- name : external-attacher-runner
44
+ name : csi-gce-pd-provisioner-role
18
45
apiGroup : rbac.authorization.k8s.io
19
-
46
+
20
47
---
21
- kind : RoleBinding
48
+ # xref: https://github.com/kubernetes-csi/external-attacher/blob/master/deploy/kubernetes/rbac.yaml
49
+ kind : ClusterRole
22
50
apiVersion : rbac.authorization.k8s.io/v1
23
51
metadata :
24
- name : csi-controller-attacher-role-cfg
25
- namespace : default
26
- subjects :
27
- - kind : ServiceAccount
28
- name : csi-controller-sa
29
- namespace : default
30
- roleRef :
31
- kind : Role
32
- name : external-attacher-cfg
52
+ name : csi-gce-pd-attacher-role
53
+ rules :
54
+ - apiGroups : [""]
55
+ resources : ["persistentvolumes"]
56
+ verbs : ["get", "list", "watch", "update", "patch"]
57
+ - apiGroups : [""]
58
+ resources : ["nodes"]
59
+ verbs : ["get", "list", "watch"]
60
+ - apiGroups : ["storage.k8s.io"]
61
+ resources : ["csinodes"]
62
+ verbs : ["get", "list", "watch"]
63
+ - apiGroups : ["storage.k8s.io"]
64
+ resources : ["volumeattachments"]
65
+ verbs : ["get", "list", "watch", "update", "patch"]
33
66
34
67
---
68
+
35
69
kind : ClusterRoleBinding
36
70
apiVersion : rbac.authorization.k8s.io/v1
37
71
metadata :
38
- name : csi-controller-provisioner-role
72
+ name : csi-gce-pd- controller-attacher-binding
39
73
subjects :
40
74
- kind : ServiceAccount
41
- name : csi-controller-sa
42
- namespace : default
75
+ name : csi-gce-pd-controller-sa
43
76
roleRef :
44
77
kind : ClusterRole
45
- name : external-provisioner-runner
78
+ name : csi-gce-pd-attacher-role
46
79
apiGroup : rbac.authorization.k8s.io
47
80
48
81
---
49
- kind : RoleBinding
82
+
83
+ # Resizer must be able to work with PVCs, PVs, SCs.
84
+ kind : ClusterRole
50
85
apiVersion : rbac.authorization.k8s.io/v1
51
86
metadata :
52
- name : csi-controller-provisioner-role-cfg
53
- namespace : default
87
+ name : csi-gce-pd-resizer-role
88
+ rules :
89
+ - apiGroups : [""]
90
+ resources : ["persistentvolumes"]
91
+ verbs : ["get", "list", "watch", "update", "patch"]
92
+ - apiGroups : [""]
93
+ resources : ["persistentvolumeclaims"]
94
+ verbs : ["get", "list", "watch"]
95
+ - apiGroups : [""]
96
+ resources : ["persistentvolumeclaims/status"]
97
+ verbs : ["update", "patch"]
98
+ - apiGroups : [""]
99
+ resources : ["events"]
100
+ verbs : ["list", "watch", "create", "update", "patch"]
101
+
102
+ ---
103
+ kind : ClusterRoleBinding
104
+ apiVersion : rbac.authorization.k8s.io/v1
105
+ metadata :
106
+ name : csi-gce-pd-resizer-binding
54
107
subjects :
55
108
- kind : ServiceAccount
56
- name : csi-controller-sa
57
- namespace : default
109
+ name : csi-gce-pd-controller-sa
58
110
roleRef :
59
- kind : Role
60
- name : external-provisioner-cfg
111
+ kind : ClusterRole
112
+ name : csi-gce-pd-resizer-role
113
+ apiGroup : rbac.authorization.k8s.io
61
114
62
115
---
63
116
# priviledged Pod Security Policy, previously defined via PrivilegedTestPSPClusterRoleBinding()
@@ -67,7 +120,7 @@ metadata:
67
120
name : psp-csi-controller-driver-registrar-role
68
121
subjects :
69
122
- kind : ServiceAccount
70
- name : csi-controller-sa
123
+ name : csi-gce-pd- controller-sa
71
124
namespace : default
72
125
roleRef :
73
126
kind : ClusterRole
0 commit comments