Skip to content

Commit

Permalink
feat: add cluster role and binding for snapshotter
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 committed Nov 26, 2024
1 parent 4088a4d commit 4742af8
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion deploy/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,46 @@ roleRef:
name: external-resizer-runner
apiGroup: rbac.authorization.k8s.io
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: external-snapshotter-runner
rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents/status"]
verbs: ["update", "patch"]
- apiGroups: ["groupsnapshot.storage.k8s.io"]
resources: ["volumegroupsnapshotclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["groupsnapshot.storage.k8s.io"]
resources: ["volumegroupsnapshotcontents"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["groupsnapshot.storage.k8s.io"]
resources: ["volumegroupsnapshotcontents/status"]
verbs: ["update", "patch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-snapshotter-role
subjects:
- kind: ServiceAccount
name: civo-csi-controller-sa
namespace: kube-system
roleRef:
kind: ClusterRole
name: external-snapshotter-runner
apiGroup: rbac.authorization.k8s.io
---
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
Expand Down Expand Up @@ -243,7 +283,6 @@ spec:
- "--v=5"
- "--csi-address=$(ADDRESS)"
- "--timeout=30s"
- "--retry-interval-max=10"
env:
- name: ADDRESS
value: /var/lib/kubelet/plugins/csi.civo.com/csi.sock
Expand Down

0 comments on commit 4742af8

Please sign in to comment.