@@ -49,3 +49,46 @@ roleRef:
4949 kind : ClusterRole
5050 name : cloudstack-csi-controller-role
5151 apiGroup : rbac.authorization.k8s.io
52+
53+ ---
54+ # external snapshotter
55+ kind : ClusterRole
56+ apiVersion : rbac.authorization.k8s.io/v1
57+ metadata :
58+ name : csi-snapshotter-role
59+ rules :
60+ - apiGroups : [""]
61+ resources : ["events"]
62+ verbs : ["list", "watch", "create", "update", "patch"]
63+ # Secret permission is optional.
64+ # Enable it if your driver needs secret.
65+ # For example, `csi.storage.k8s.io/snapshotter-secret-name` is set in VolumeSnapshotClass.
66+ # See https://kubernetes-csi.github.io/docs/secrets-and-credentials.html for more details.
67+ # - apiGroups: [""]
68+ # resources: ["secrets"]
69+ # verbs: ["get", "list"]
70+ - apiGroups : ["snapshot.storage.k8s.io"]
71+ resources : ["volumesnapshotclasses"]
72+ verbs : ["get", "list", "watch"]
73+ - apiGroups : ["snapshot.storage.k8s.io"]
74+ resources : ["volumesnapshotcontents"]
75+ verbs : ["create", "get", "list", "watch", "update", "delete", "patch"]
76+ - apiGroups : ["snapshot.storage.k8s.io"]
77+ resources : ["volumesnapshotcontents/status"]
78+ verbs : ["update", "patch"]
79+ - apiGroups : ["coordination.k8s.io"]
80+ resources : ["leases"]
81+ verbs : ["get", "watch", "list", "delete", "update", "create"]
82+ ---
83+ kind : ClusterRoleBinding
84+ apiVersion : rbac.authorization.k8s.io/v1
85+ metadata :
86+ name : csi-snapshotter-binding
87+ subjects :
88+ - kind : ServiceAccount
89+ name : cloudstack-csi-controller
90+ namespace : kube-system
91+ roleRef :
92+ kind : ClusterRole
93+ name : csi-snapshotter-role
94+ apiGroup : rbac.authorization.k8s.io
0 commit comments