Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dr): new improved dr restore capability #1583

Merged

Conversation

emosbaugh
Copy link
Member

@emosbaugh emosbaugh commented Dec 5, 2024

What this PR does / why we need it:

Adds support for restoring from dual-backups.

Adds a new app release with a Restore resource for E2E tests.

$ diff e2e/kots-release-install e2e/kots-release-install-newdr
Only in e2e/kots-release-install-newdr: backup.yaml
diff --color e2e/kots-release-install/deployment-2.yaml e2e/kots-release-install-newdr/deployment-2.yaml
4a5
>   namespace: my-app
diff --color e2e/kots-release-install/deployment.yaml e2e/kots-release-install-newdr/deployment.yaml
4a5
>   namespace: my-app
diff --color e2e/kots-release-install/kots-app.yaml e2e/kots-release-install-newdr/kots-app.yaml
9a10,11
>   additionalNamespaces:
>     - my-app
11c13
<     - deployment/nginx
---
>     - my-app/deployment/nginx
Only in e2e/kots-release-install-newdr: restore.yaml

Which issue(s) this PR fixes:

Does this PR require a test?

Does this PR require a release note?

Adds improved Disaster Recovery support, as outlined in the docs LINK, with the addition of a Velero Backup and Restore resource.

Does this PR require documentation?

TODO

Copy link

github-actions bot commented Dec 5, 2024

This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID.

Online Installer:

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/appver-dev-1ef37e8" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Airgap Installer (may take a few minutes before the airgap bundle is built):

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci-airgap/appver-dev-1ef37e8?airgap=true" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Happy debugging!

@@ -321,8 +322,8 @@ func RestoreCmd(ctx context.Context, name string) *cobra.Command {
backupToRestore = pickBackupToRestore(backups)

logrus.Info("")
completionTimestamp := backupToRestore.Status.CompletionTimestamp.Time.Format("2006-01-02 15:04:05 UTC")
shouldRestore := prompts.New().Confirm(fmt.Sprintf("Restore from backup %q (%s)?", backupToRestore.Name, completionTimestamp), true)
creationTimestamp := backupToRestore.GetCreationTimestamp().Time.Format("2006-01-02 15:04:05 UTC")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldnt this be creation timestamp not completion timestamp?

@emosbaugh emosbaugh force-pushed the emosbaugh/sc-116323/implement-app-specific-restore-capabilities branch from a752b8c to f539aa4 Compare December 9, 2024 21:40
@emosbaugh emosbaugh force-pushed the emosbaugh/sc-116323/implement-app-specific-restore-capabilities branch from 850cb27 to 017d7e5 Compare December 12, 2024 22:29
@emosbaugh emosbaugh marked this pull request as ready for review December 13, 2024 14:03
@emosbaugh
Copy link
Member Author

[sc-116990]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the package name be dr or disasterrecovery instead? the term snapshots is for legacy backup/restore functionality.

sgalsaleh
sgalsaleh previously approved these changes Dec 13, 2024
@emosbaugh emosbaugh requested a review from sgalsaleh December 13, 2024 18:23
@emosbaugh emosbaugh merged commit cefa45b into main Dec 13, 2024
70 checks passed
@emosbaugh emosbaugh deleted the emosbaugh/sc-116323/implement-app-specific-restore-capabilities branch December 13, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants