csi-driver icon indicating copy to clipboard operation
csi-driver copied to clipboard

Add DataVolume Finalizer

Open kellydx opened this issue 3 weeks ago • 2 comments

Add a finalizer to the DataVolume to prevent it from being accidentally deleted manually or by external workloads.

What this PR does / why we need it: I encountered a scenario where some DataVolumes were accidentally deleted, leading to data loss and VMs being unable to boot. As a precaution, a DataVolume created by KVCSI should have a finalizer to prevent it from being accidentally deleted, ensuring resources are cleaned up properly.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #

Special notes for your reviewer:

Release note:

Added finalizer "cdi.kubevirt.io/user-volume-protection" to DataVolume.

kellydx avatar Nov 17 '25 16:11 kellydx

Hi @kellydx. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

kubevirt-bot avatar Nov 17 '25 16:11 kubevirt-bot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign mhenriks for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

kubevirt-bot avatar Nov 17 '25 16:11 kubevirt-bot