update snapshotter rbac

This commit is contained in:
CALIN Cristian Andrei
2021-09-13 22:04:58 +03:00
parent a2421816c4
commit 4ac8cdf165

View File

@@ -13,6 +13,9 @@ rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotclasses"]
verbs: ["get", "list", "watch"]
@@ -22,6 +25,9 @@ rules:
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents/status"]
verbs: ["update"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list"]
---
kind: ClusterRoleBinding
@@ -38,6 +44,32 @@ roleRef:
name: synology-csi-snapshotter-role
apiGroup: rbac.authorization.k8s.io
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: synology-csi
name: synology-csi-snapshotter-cfg
rules:
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "list", "delete", "update", "create"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: synology-csi
name: synology-csi-snapshotter-role-cfg
subjects:
- kind: ServiceAccount
name: csi-snapshotter-sa
namespace: synology-csi
roleRef:
kind: Role
name: synology-csi-snapshotter-cfg
apiGroup: rbac.authorization.k8s.io
---
kind: StatefulSet
apiVersion: apps/v1