fix(dataprotection): preserve backup namespace for cross-namespace restores - #10827
Merged
Conversation
Collaborator
|
Auto Cherry-pick Instructions CLA Recheck Instructions |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10827 +/- ##
==========================================
+ Coverage 65.67% 65.78% +0.11%
==========================================
Files 510 510
Lines 64639 64652 +13
==========================================
+ Hits 42451 42532 +81
+ Misses 18413 18366 -47
+ Partials 3775 3754 -21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…e-backup-restore-auth # Conflicts: # pkg/controller/plan/restore_test.go
Collaborator
Author
|
/approve |
apecloud-bot
approved these changes
Aug 31, 2026
This was referenced Aug 31, 2026
Collaborator
Author
|
/approve |
apecloud-bot
approved these changes
Aug 31, 2026
Collaborator
Author
|
/approve |
apecloud-bot
approved these changes
Sep 1, 2026
…e-backup-restore-auth
Collaborator
Author
|
/approve |
apecloud-bot
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10829.
Problem
Generated Restore objects used the target Cluster/RestoreManager namespace as
spec.backup.namespaceinstead of the referenced Backup namespace. For cross-namespace backups this could fail to find the source Backup or restore from a same-name Backup in the target namespace.VolumeSnapshot data sources are namespace-scoped, so cross-namespace VolumeSnapshot restores cannot be supported by the current restore flow. This boundary must be checked after resolving incremental, differential, and continuous backup dependencies because PITR may select a VolumeSnapshot base Backup even when the entry Backup is not snapshot-based.
What changed
backupObj.Namespacein generated prepare-data and post-ready Restore objects.PrepareDataBackupSetswith a fatal validation error before PVC restore processing.status.backupMethodwith a fatal error instead of panicking while readingsnapshotVolumes.NOT supportedand regenerate CRDs and API reference docs.main.Compatibility
This is intentionally a limited, backward-compatible change. Existing non-VolumeSnapshot cross-namespace Backup references continue to work without additional resources or API requirements. System-account Secrets are still restored before prepare-data or post-ready execution; only deterministic restore validation now runs first.
Backports
release-1.1: fix(dataprotection): preserve backup namespace for cross-namespace restores #10833release-1.0: fix(dataprotection): preserve backup namespace for cross-namespace restores #10834Both release branches are affected by the namespace and VolumeSnapshot validation issue and require independent backports because that diff does not cherry-pick cleanly onto their release-specific controller and test layouts. The system-account Secret ordering change is main-only because the release VolumePopulator does not contain the Backup-backed credential restoration path.
Validation
scripts/codex-go-test.sh ./controllers/dataprotection ./pkg/dataprotection/restore -count=1scripts/codex-go-test.sh ./pkg/dataprotection/restore ./pkg/controller/plan ./controllers/dataprotection -count=1make manifestsmake docgit diff --checkAll targeted tests pass on the pushed branch head.