Skip to content

Add support to restore a snapshot from a Azure storage #740

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

Merged
merged 13 commits into from
May 28, 2025

Conversation

plaharanne
Copy link
Contributor

@plaharanne plaharanne commented May 15, 2025

Summary of changes

  • Refactored the backup repository data in order to use a Dataclass instead of a dict
  • Added backupProvider and Azure related secrets to the "restoreSnapshot" section of the CRD. The Azure Storage and S3 fields are on the same level with none of them being mandatory for backward compatibility, the BackupRepositoryData dataclass takes care of the validation.
  • Changed _create_backup_repository() in order to create either a s3 or azure repository
  • Replaced deprecated utcnow()

Checklist

  • Link to issue this PR refers to: https://github.com/crate/cloud/issues/2585
  • Relevant changes are reflected in CHANGES.rst
  • Added or changed code is covered by tests
  • Documentation has been updated if necessary
  • Changed code does not contain any breaking changes (or this is a major version change)

@plaharanne plaharanne force-pushed the p/restore-azure-backup branch from 4627ff7 to 3d255b4 Compare May 16, 2025 15:38
@plaharanne plaharanne marked this pull request as ready for review May 19, 2025 09:10
@plaharanne plaharanne requested review from tomach and juanpardo May 19, 2025 09:10
@plaharanne plaharanne force-pushed the p/restore-azure-backup branch from ee1e6fe to 1b8be83 Compare May 26, 2025 07:39
@plaharanne plaharanne force-pushed the p/restore-azure-backup branch from 1b8be83 to c0bb011 Compare May 26, 2025 08:35
Copy link
Contributor

@tomach tomach left a comment

Choose a reason for hiding this comment

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

very nice refactoring 👍

@plaharanne plaharanne force-pushed the p/restore-azure-backup branch from d794bca to 9d51b64 Compare May 27, 2025 07:27
@plaharanne plaharanne force-pushed the p/restore-azure-backup branch from f1c808e to c8d42bd Compare May 28, 2025 07:15
@plaharanne plaharanne merged commit 3be9c6b into master May 28, 2025
14 checks passed
@plaharanne plaharanne deleted the p/restore-azure-backup branch May 28, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants