vmware-tanzu / velero

Backup and migrate Kubernetes applications and their persistent volumes
https://velero.io
Apache License 2.0
8.79k stars 1.41k forks source link

Allow certain StorageClasses to be ignored for CSI snapshots #6051

Closed ctrox closed 1 year ago

ctrox commented 1 year ago

Describe the problem/challenge you have Currently the CSI plugin just creates a snapshot of all PVCs if their StorageClass has a matching SnapshotVolumeClass based on the provisioner field. This can be problematic for CSI drivers which support different kinds of volumes and not all of them support snapshots. One example for this is the Nutanix CSI driver which supports BlockStorage volumes with snapshot support and NFS volumes without snapshot support but they both use the same provisioner csi.nutanix.com. What happens now is that Velero will just try to snapshot these NFS PVCs and they just never get ready.

Describe the solution you'd like One idea would be to add a label to the StorageClass to tell the CSI plugin to ignore PVCs of this class.

Environment:

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

qiuming-best commented 1 year ago

hello @ctrox, I'm unsure about our new feature resource policies could meet your requirement?

we can define the NFS volume source for PV in the resource policies configmap to skip the backup of PV.

ctrox commented 1 year ago

Yeah that feature could work, is it also possible to have a resource policy configured in a schedule?

qiuming-best commented 1 year ago

Yeah that feature could work, is it also possible to have a resource policy configured in a schedule?

@ctrox Yes, also it works for schedule.

reasonerjt commented 1 year ago

Closing this one since it's already been delivered in v1.11.

Please open a new issue if you discover any problem