-
Notifications
You must be signed in to change notification settings - Fork 82
OADP-6669: Use CloudStorage creationSecret and config as fallback for BSL #1942
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
base: oadp-dev
Are you sure you want to change the base?
OADP-6669: Use CloudStorage creationSecret and config as fallback for BSL #1942
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kaovilai The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@kaovilai: This pull request references OADP-6669 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
When a DataProtectionApplication references a CloudStorage CR without providing explicit credentials, the BSL controller now uses the CloudStorage's creationSecret as a fallback for authentication. Changes: - Enhanced BSL reconciliation to fallback to CloudStorage's creationSecret when DPA doesn't specify credentials - Moved fallback logic into centralized getSecretNameAndKeyFromCloudStorage function for better code organization - Updated validation to allow nil credentials when CloudStorage is referenced - Fixed related test cases to handle the new fallback behavior This allows users to avoid duplicating credential configuration between CloudStorage and DataProtectionApplication resources. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
d7f5abf
to
aa93572
Compare
When a DataProtectionApplication references a CloudStorage CR, the BSL now inherits configuration values from the CloudStorage CR as fallback, similar to the credential fallback mechanism. Changes: - BSL now uses CloudStorage CR's Config field as base configuration - CloudStorage CR's Region field is automatically added to BSL config - DPA's CloudStorageLocation.Config values override CloudStorage values - Added comprehensive test coverage for config fallback behavior This enhancement allows users to define provider-specific settings once in the CloudStorage CR without needing to duplicate them in the DPA, while still maintaining the ability to override specific values at the DPA level when needed. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
@kaovilai: This pull request references OADP-6669 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
@kaovilai: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
This PR enhances the CloudStorage integration in DataProtectionApplication (DPA) resources by implementing automatic fallback mechanisms for both credentials and configuration when using CloudStorage CRs.
Changes
1. Credential Fallback (commit aa93572)
When a DPA references a CloudStorage CR without explicit credentials, the BSL controller now automatically uses the CloudStorage's
creationSecret
as a fallback for authentication.Benefits:
2. Configuration and Region Fallback (commit 345b342)
The BSL now inherits configuration values from the CloudStorage CR as fallback, including automatic region propagation.
Implementation details:
config
field values are used as base configurationregion
field is automatically added to BSL configExample use case:
Testing
go test ./internal/controller/ -run TestDPAReconciler_ReconcileBackupStorageLocations
Impact
This change is backward compatible and improves the user experience by:
Fixes #[issue_number] (if applicable)
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]