Files
cozystack/examples
Aleksei Sviridkin faaa2b7f2c refactor(backups): stop annotating restored PVCs for CDI claim adoption
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>
2026-11-25 12:43:29 +03:00
..