Skip to content

Comments

Support for Azure Blob Backup#866

Open
BillyGrande wants to merge 6 commits intocybozu-go:mainfrom
BillyGrande:main
Open

Support for Azure Blob Backup#866
BillyGrande wants to merge 6 commits intocybozu-go:mainfrom
BillyGrande:main

Conversation

@BillyGrande
Copy link

Based on this issue:

#829

@lrf141 lrf141 requested a review from yamatcha January 8, 2026 07:38
@yamatcha yamatcha requested a review from Copilot January 23, 2026 02:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for Azure Blob Storage as a backup backend for MOCO, complementing the existing S3 and GCS options.

Changes:

  • Added Azure Blob Storage backend implementation with credential-based authentication
  • Added comprehensive test coverage for Azure operations including Azurite emulator tests
  • Added documentation for Azure Blob Storage setup and configuration

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pkg/constants/backup.go Added Azure backend type constant
pkg/bucket/azure.go Implemented Azure Blob Storage client with Put/Get/List operations
pkg/bucket/azure_test.go Added comprehensive test suite using Azurite emulator
cmd/moco-backup/cmd/root.go Integrated Azure bucket creation logic
api/v1beta2/job_types.go Updated BackendType enum to include azure
config/crd/bases/*.yaml Updated CRD schemas to allow azure backend type
e2e/backup_azure_test.go Added end-to-end tests for Azure backup/restore
e2e/testdata/*.yaml Added test configurations for Azure
e2e/azurite.yaml Added Azurite emulator deployment for testing
e2e/Makefile Updated setup to include Azurite and increased timeouts
docs/azure-blob-storage.md Added comprehensive documentation for Azure setup
go.mod Added Azure SDK dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@yamatcha yamatcha left a comment

Choose a reason for hiding this comment

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

Apologies for the delay in reviewing.
Since I'm not familiar with Azure, so please feel free to correct me if I make any mistakes.

And could you also format the code using go fmt?

@BillyGrande
Copy link
Author

@yamatcha
Hello, I've updated the PR based on your suggestions. Sorry for any inconvenience.

@yamatcha yamatcha requested a review from Copilot January 27, 2026 05:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@yamatcha yamatcha left a comment

Choose a reason for hiding this comment

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

LGTM. Please wait for one more maintainer to review.

@yamatcha
Copy link
Contributor

@BillyGrande
Sorry, There are some commits that are not signed off.
Please resubmit them with the Signed-off-by.

BillyGrande and others added 6 commits January 30, 2026 10:37
Signed-off-by: BillyGrande <billxs@hotmail.com>
Signed-off-by: BillyGrande <billxs@hotmail.com>
Signed-off-by: BillyGrande <billxs@hotmail.com>
Signed-off-by: BillyGrande <billxs@hotmail.com>
Signed-off-by: BillyGrande <billxs@hotmail.com>
- Fix go fmt formatting issues in azure.go, azure_test.go, and backup.go
- Add trailing newlines to azure.go and azure_test.go
- Use NewAzureBucketFromConnectionString and NewAzureBucket constructors in tests
- Add Azurite documentation reference for well-known credentials
- Rename 'name' to 'containerName' for clarity
- Add comments explaining timeout increases in e2e/Makefile

Signed-off-by: BillyGrande <billxs@hotmail.com>
@BillyGrande
Copy link
Author

@yamatcha

Sorry for that!
I signed them off.

@yoheinbb
Copy link
Contributor

@BillyGrande
Thank you for your contribution.
Please add support for Azure Storage to the docs/backup.md and include a link to azure-blob-storage.md.

It("should delete namespace", func() {
kubectlSafe(nil, "delete", "-n", "backup-azure", "mysqlclusters", "--all")
// Delete the create-bucket job to clean up its pods
kubectl(nil, "delete", "-n", "backup-azure", "job", "create-bucket", "--ignore-not-found=true")
Copy link
Contributor

Choose a reason for hiding this comment

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

Use kubectlSafe to ensure code consistency and check for errors.

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.

3 participants