mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
CDI decides whether a DataVolume may adopt an existing claim from the cdi.kubevirt.io/allowClaimAdoption annotation on the DataVolume, or from the DataVolumeClaimAdoption feature gate. It never reads the annotation on the PVC. The Velero modifier rule that stamped it on every restored PVC in both the VM and the Kubernetes restore strategy therefore changed nothing, while the Kubernetes strategy comment and the VM restore example described it as part of what lets CDI adopt. Drop the PVC rule from both strategies. Adoption still rests on the annotation the vm-disk chart puts on its DataVolume and, for tenant clusters, on the rule that sets it on restored DataVolumes, which a test now pins as the only rule of the volumes phase. Without that rule an in-place VM strategy restore of a VMDisk, or of a VMInstance with no recorded IP and MAC to keep, has no modifier rule left. Velero fails validation of a Restore whose modifier ConfigMap has an empty rule list, so in that case no ConfigMap is created and the Restore carries no resource modifier. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>