Merge pull request #10319 from blackpiglet/jxun/1.18_remove_pvc_pv_check_for_pvr_creation
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
e2e-test-kind.yaml / extract (push) Successful in 18s
Run the E2E test on kind / get-go-version (push) Successful in 21s
push.yml / extract (push) Successful in 12s
Main CI / get-go-version (push) Successful in 13s
Run the E2E test on kind / build (push) Failing after 25s
Run the E2E test on kind / run-e2e-test (push) Skipped
Main CI / Build (push) Failing after 33s

[cherry-pick][1.18] Remove PVC and PV inclusion check during creating PVR.
This commit is contained in:
Xun Jiang/Bruce Jiang
2026-08-18 15:40:00 +08:00
committed by GitHub
2 changed files with 2 additions and 4 deletions
+1
View File
@@ -0,0 +1 @@
Remove PVC and PV inclusion check during creating PVR.
+1 -4
View File
@@ -2050,10 +2050,7 @@ func (ctx *restoreContext) restoreItem(obj *unstructured.Unstructured, groupReso
return warnings, errs, itemExists
}
// Do not create podvolumerestore when current restore excludes pv/pvc
if ctx.resourceIncludesExcludes.ShouldInclude(kuberesource.PersistentVolumeClaims.String()) &&
ctx.resourceIncludesExcludes.ShouldInclude(kuberesource.PersistentVolumes.String()) &&
len(podvolume.GetVolumeBackupsForPod(ctx.podVolumeBackups, pod, originalNamespace)) > 0 {
if len(podvolume.GetVolumeBackupsForPod(ctx.podVolumeBackups, pod, originalNamespace)) > 0 {
restorePodVolumeBackups(ctx, createdObj, originalNamespace)
}
}