Repository navigation
Add cross-cluster restore to KubeTaskWith{Backup,Restore}PVC - #4086
Open
anand-veeam wants to merge 4 commits into
Conversation
…nand-veeam/k10-36928-export-import-functionality-csi-driver
Contributor
|
This PR is marked as stale due to inactivity. Add a new comment to reactivate it. CC @kanisterio/maintainers |
This branch has not been deployed
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.
Change Overview
Summary
Adds cross-cluster restore support to
KubeTaskWith{Backup,Restore}PVCbyhaving the backup function emit the CSI snapshot handle and the restore
function reconstruct a bridge VolumeSnapshot + VolumeSnapshotContent on the
dest cluster when the original snapshot doesn't exist locally.
Pattern mirrors K10's
CreatePVCandSnapshotFromSource(
kio/exec/internal/phaseutils/phaseutils.go:542): clone the destVolumeSnapshotClass with
DeletionPolicy: Retain,CreateFromSourceusingthe clone, defer cleanup of the VS+VSC after the restore pod completes.
Kopia content is preserved because the cloned class carries Retain.
Changes
Backup side (
KubeTaskWithBackupPVC)snapshotHandleoutput by readingVolumeSnapshotContent.spec.source.snapshotHandleafter the CSI snapshotreaches terminal state.
observable at backup time, not at restore time.
Restore side (
KubeTaskWithRestorePVC)snapshotHandlearg.volumeSnapshotName,snapshotHandle,restoreSizefrom theinput artifact's
KeyValue(K10 catalog convention) so the blueprintdoesn't have to re-template them as args.
ensureRestoreSnapshotstep before PVC provisioning:using the kopia handle, defer VS+VSC cleanup at end of
run().snapshotClassForRestoreskipskanister-clone-*classes to avoidnested-clone loops on subsequent restores.
Please check the type of change your PR introduces:
Issues
Test Plan