-
Notifications
You must be signed in to change notification settings - Fork 161
K8SPSMDB-1520: implement native Minio support #2114
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
Conversation
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
There was a problem hiding this 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 implements native Minio support for MongoDB backups as an alternative to S3-compatible storage. The implementation adds Minio as a separate BackupStorageType because not all S3-compatible storage services support AWS SDK v2's Signature Version 4 (SigV4). The change uses the MinIO Go client from PBM (v2.12.0+) instead of the AWS SDK.
Key Changes:
- Added
BackupStorageMiniotype with dedicated configuration struct (BackupStorageMinioSpecandMinioRetryer) - Refactored GCS endpoint URL constant to a shared
pkg/namingpackage for better code organization - Updated PBM library dependency to version with Minio storage support
- Extended backup and restore controllers to handle Minio storage type
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/apis/psmdb/v1/psmdb_types.go | Added BackupStorageMinioSpec type and BackupStorageMinio constant |
| pkg/apis/psmdb/v1/perconaservermongodbbackup_types.go | Added Minio field to backup status |
| pkg/apis/psmdb/v1/zz_generated.deepcopy.go | Generated DeepCopy methods for MinioRetryer and BackupStorageMinioSpec |
| pkg/psmdb/backup/pbm.go | Added GetPBMStorageMinioConfig function and integrated Minio case in GetPBMStorageConfig; refactored GCS endpoint checks to use naming package |
| pkg/naming/gcs.go | Created new file to store GCS endpoint constant |
| pkg/controller/perconaservermongodbrestore/validate.go | Updated import to use naming.GCSEndpointURL |
| pkg/controller/perconaservermongodbrestore/psmdb_restore_controller.go | Added Minio support in getStorage function |
| pkg/controller/perconaservermongodbbackup/psmdb_backup_controller.go | Updated GCS endpoint check and added Minio case in deleteBackupFinalizer |
| pkg/controller/perconaservermongodbbackup/backup.go | Added Minio case in backup destination handling |
| config/crd/bases/*.yaml | Added Minio configuration schema to CRDs |
| go.mod, go.sum | Updated percona-backup-mongodb dependency and added new transitive dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
There was a problem hiding this 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 17 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.
|
|
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
| package naming | ||
|
|
||
| const ( | ||
| GCSEndpointURL = "storage.googleapis.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This const was removed in pbm 2.12.0 module
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
There was a problem hiding this 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 45 out of 46 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
e2e-tests/functions:1
- The default backup image has changed from a stable version (percona/percona-backup-mongodb:2.11.0) to a development image (perconalab/...main-backup). This could cause instability in tests and production environments. Consider using a stable version tag instead of 'main' which points to potentially unstable code.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # backoffMax: 30 | ||
| # backoffMultiplier: 2 | ||
| # minio: | ||
| # minio-s3: |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The storage name 'minio-s3' is misleading since this configuration still uses S3 type. Consider renaming to 'minio-via-s3' or 'minio-s3-compatible' to clarify that this is the S3-compatible approach, distinct from the new native 'minio' type.
| # minio-s3: | |
| # minio-s3-compatible: |
egegunes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mayankshah1607 please check init-deploy and replset-overrides failures
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
6dc0f95
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
There was a problem hiding this 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 45 out of 46 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
commit: 3092c1d |
CHANGE DESCRIPTION
This PR adds a new backup storage type
minio. This storage type has been added to PBM 2.12.0. Since not all S3-compatible storage services support AWS SDK v2's Signature Version 4 (SigV4), theminiostorage type uses the Minio client instead of the AWS SDK.Example:
Since
CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
compare/*-oc.yml)?Config/Logging/Testability