zebernst / synology-csi-talos

CSI driver for Synology NAS with support for Talos Linux
Apache License 2.0
24 stars 16 forks source link

fix: snapshotter role need `patch` permission on VSC too #6

Closed hxhieu closed 2 months ago

hxhieu commented 5 months ago

It is not be able to update the VSC with this error

Failed to create snapshot: failed to add VolumeSnapshotBeingCreated annotation on the content snapcontent-96a3ac4a-a593-494c-9684-f747af62353f: "snapshot controller failed to update snapcontent-96a3ac4a-a593-494c-9684-f747af62353f on API server: volumesnapshotcontents.snapshot.storage.k8s.io \"snapcontent-96a3ac4a-a593-494c-9684-f747af62353f\" is forbidden: User \"system:serviceaccount:kube-system:synology-csi-snapshotter\" cannot patch resource \"volumesnapshotcontents\" in API group \"snapshot.storage.k8s.io\" at the cluster scope"

Also correct the default annotation for snapshot class https://kubernetes.io/docs/concepts/storage/volume-snapshot-classes/#the-volumesnapshotclass-resource