Skip to content

Commit 74a388c

Browse files
authored
Merge pull request #156 from jingxu97/snapshotdeploy
Add the cluster role for snapshotter
2 parents f41c06d + 44f439d commit 74a388c

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

deploy/kubernetes/base/setup-cluster.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,48 @@ subjects:
6767
roleRef:
6868
kind: ClusterRole
6969
name: system:csi-external-provisioner
70+
apiGroup: rbac.authorization.k8s.io
71+
72+
---
73+
74+
apiVersion: rbac.authorization.k8s.io/v1
75+
kind: ClusterRole
76+
metadata:
77+
name: system:csi-external-snapshotter
78+
rules:
79+
- apiGroups: ["snapshot.storage.k8s.io"]
80+
resources: ["volumesnapshotclasses"]
81+
verbs: ["get", "list", "watch"]
82+
- apiGroups: ["snapshot.storage.k8s.io"]
83+
resources: ["volumesnapshotcontents"]
84+
verbs: ["create", "get", "list", "watch", "update", "delete"]
85+
- apiGroups: ["snapshot.storage.k8s.io"]
86+
resources: ["volumesnapshots"]
87+
verbs: ["get", "list", "watch", "update"]
88+
- apiGroups: ["apiextensions.k8s.io"]
89+
resources: ["customresourcedefinitions"]
90+
verbs: ["create", "list", "watch", "delete"]
91+
- apiGroups: [""]
92+
resources: ["events"]
93+
verbs: ["list", "watch", "create", "update", "patch"]
94+
- apiGroups: ["storage.k8s.io"]
95+
resources: ["storageclasses"]
96+
verbs: ["watch", "get", "list"]
97+
- apiGroups: ["admissionregistration.k8s.io"]
98+
resources: ["mutatingwebhookconfigurations"]
99+
verbs: ["create"]
100+
101+
---
102+
103+
kind: ClusterRoleBinding
104+
apiVersion: rbac.authorization.k8s.io/v1
105+
metadata:
106+
name: csi-controller-snapshotter-binding
107+
subjects:
108+
- kind: ServiceAccount
109+
name: csi-controller-sa
110+
namespace: default
111+
roleRef:
112+
kind: ClusterRole
113+
name: system:csi-external-snapshotter
70114
apiGroup: rbac.authorization.k8s.io

0 commit comments

Comments
 (0)