Remove backup source-switch; resolve cross-cluster restore credentials directly - #441
Merged
Merged
Conversation
…ctly sbcli PR #1249 (backup rework) removes the cluster-wide backup source-switch mechanism (POST /backups/source-switch, GET /backups/sources, and Cluster.backup_source) since every Backup now records its own bucket location. Restore reads directly from wherever a backup says it lives, and POST /backups/restore takes an optional s3_credentials field for the cross-cluster case instead. Update BackupRestoreReconciler to match: drop the switch-before/switch-back phases entirely, and for cross-cluster restores resolve the source StorageCluster's backup credentials secret and forward it as s3_credentials on the restore call. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
noctarius
reviewed
Aug 21, 2026
| // UUID matches uuid. Used to go from a cross-cluster reference (which only | ||
| // carries the backend UUID) back to the CR, to read config the backend doesn't | ||
| // expose, such as a cluster's backup credentials secret. | ||
| func ResolveClusterCRByUUID( |
Collaborator
There was a problem hiding this comment.
The UUID is the cluster id?
Let's move this with a clean name into atlas/kube as part of the Resolver interface.
Collaborator
There was a problem hiding this comment.
Anyway, let's do this separately
3 tasks
noctarius
pushed a commit
that referenced
this pull request
Aug 21, 2026
…ctly (#441) sbcli PR #1249 (backup rework) removes the cluster-wide backup source-switch mechanism (POST /backups/source-switch, GET /backups/sources, and Cluster.backup_source) since every Backup now records its own bucket location. Restore reads directly from wherever a backup says it lives, and POST /backups/restore takes an optional s3_credentials field for the cross-cluster case instead. Update BackupRestoreReconciler to match: drop the switch-before/switch-back phases entirely, and for cross-cluster restores resolve the source StorageCluster's backup credentials secret and forward it as s3_credentials on the restore call. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> (cherry picked from commit d3b6c9f)
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.
Summary
POST /backups/source-switch,GET /backups/sources,Cluster.backup_source) — everyBackupnow records its own bucket location, andPOST /backups/restoretakes an optionals3_credentialsfield for the cross-cluster case instead.BackupRestoreReconcilerdrops the switch-before/switch-back phases entirely; cross-cluster restores now go straight to the restore call.StorageCluster's backup credentials secret and forwards it ass3_credentialson the restore request (falls back gracefully if the source cluster CR is gone, letting the backend's own precondition check surface any real error).RestorePhaseSwitchingSource/RestorePhaseSwitchingSourceLocalphases andSourceSwitchedAtstatus field from theBackupRestoreCRD; regenerated CRD manifests (config/crd/bases,dist/install.yaml, Helm chart copy).Test plan
make test(full suite incl. envtest) passesmake lint— 0 issues🤖 Generated with Claude Code