-
Notifications
You must be signed in to change notification settings - Fork 82
OADP-3307: Add Azure and GCP CloudStorage API provider implementations #1828
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
Skipping CI for Draft Pull Request. |
@kaovilai: This pull request references OADP-3307 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the feature request to target the "4.20.0" version, but no target version was set. 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: This pull request references OADP-3307 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the feature request to target the "4.20.0" version, but no target version was set. 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. |
b197ddd
to
150c818
Compare
14184a7
to
e2c38f5
Compare
317a215
to
2a289d0
Compare
Azure CloudStorage Test Results ✅Manual Test Execution Results:
|
✅ GCP CloudStorage API Test ResultsSuccessfully tested CloudStorage API functionality for GCP with Workload Identity Federation on OpenShift. Test Environment:
Summary: All test cases PASSED ✅ Test Execution Details
Test Case 1: Basic CloudStorage Resource Creation ✅
Test Case 2: DataProtectionApplication Integration ✅
Test Case 3: Backup and Restore Operations ✅
Test Case 4: Error Handling - Invalid Credentials ✅
Validation Results:
Notes:
The CloudStorage API is working correctly with GCP WIF authentication. The operator successfully:
|
@kaovilai: This pull request references OADP-3307 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. |
1 similar comment
@kaovilai: This pull request references OADP-3307 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. |
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.
adoc format so its easier on doc team to integrate with openshift-docs
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.
++ we should follow this practice more often
cc: @weshayutin
/cherry-pick oadp-1.5 |
@kaovilai: once the present PR merges, I will cherry-pick it on top of 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 kubernetes-sigs/prow repository. |
4b6041a
to
155c91e
Compare
./run-azure-test-cases.zsh ? where does this file live? |
unit test?
|
@kaovilai: This pull request references OADP-3307 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. |
Signed-off-by: Tiger Kaovilai <[email protected]> Co-Authored-By: Claude <[email protected]>
@kaovilai: This pull request references OADP-3307 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: This pull request references OADP-3307 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: This pull request references OADP-3307 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: This pull request references OADP-3307 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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kaovilai, shubham-pampattiwar, sseago 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 |
f871f7a
into
openshift:oadp-dev
@kaovilai: new pull request created: #1918 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 kubernetes-sigs/prow repository. |
Why the changes were made
Related issue: OADP-3307
How to test the changes made
Prerequisites
Testing Azure CloudStorage with Workload Identity
Note: The
creationSecret.key
must beazurekey
for Azure provider.Basic CloudStorage Creation:
Verify with DataProtectionApplication:
Test Backup and Restore:
Verify Azure Workload Identity is working:
Test error handling with invalid storage account:
Testing GCP CloudStorage with Workload Identity Federation
Note: The
creationSecret.key
must beservice_account.json
for GCP provider.Basic CloudStorage Creation:
Test with DataProtectionApplication:
Verify backup/restore works:
Comprehensive Test Cases
Azure Test Cases
Test Case 1 - Basic CloudStorage Resource Creation
This test verifies that the CloudStorage controller can successfully create Azure storage containers using the new provider implementation.
Expected outcome: CloudStorage resource is created successfully, and the Azure storage container is provisioned.
Test Case 2 - DataProtectionApplication Integration
This test ensures that the CloudStorage provider works correctly with OADP's DataProtectionApplication, allowing Velero to use Azure storage for backups.
Expected outcome: DPA is reconciled successfully, Velero pod is running, and backup location is accessible.
Test Case 3 - Backup and Restore Operations
This test validates end-to-end backup and restore functionality using Azure storage as the backend.
Expected outcome: Backup completes successfully, namespace is deleted and then restored with all resources intact.
Test Case 4 - Azure Workload Identity Authentication
This test verifies that the Azure Workload Identity authentication is properly configured for both the Velero pod and the controller manager.
Expected outcome: Both service accounts have proper Azure Workload Identity annotations, and environment variables are correctly set.
Test Case 5 - Error Handling with Invalid Storage Account
This test verifies that the CloudStorage controller handles errors gracefully when given invalid configuration, and that resources can be deleted even when the underlying storage doesn't exist (idempotent deletion).
Expected outcome: CloudStorage resource shows error status but can be deleted successfully without hanging.
Test Case 6 - Container Lifecycle Management
This test verifies that containers can be created with unique names and properly cleaned up when CloudStorage resources are deleted.
Expected outcome: Container is created in Azure when CloudStorage is created and deleted when CloudStorage is deleted.
Test Case 7 - Role Assignment Validation
This test ensures that the Azure managed identity has all the required roles for OADP operations.
Expected outcome: All three required roles are assigned to the managed identity at the appropriate scope.
GCP Test Cases
Test Case 1 - Basic CloudStorage Resource Creation
This test verifies that the CloudStorage controller can successfully create GCS buckets using the new provider implementation.
Expected outcome: CloudStorage resource is created and GCS bucket is provisioned successfully.
Test Case 2 - DataProtectionApplication Integration
This test ensures that the CloudStorage provider works correctly with OADP's DataProtectionApplication for GCP.
Expected outcome: DPA is reconciled, Velero pod is running, and backup location is accessible.
Test Case 3 - Backup and Restore Operations
This test validates end-to-end backup and restore functionality using GCS as the backend.
Expected outcome: Backup is stored in GCS, namespace is deleted and restored successfully with all resources.
Test Case 4 - Error Handling with Invalid Credentials
This test verifies that the CloudStorage controller handles authentication errors gracefully.
Expected outcome: CloudStorage shows error status indicating the secret doesn't exist.
Validation Steps
After running tests, validate the implementation:
Key Changes
openshift-adp-controller-manager
service accountopenshift-adp-controller-manager
service accountSharedCredentialsFileFromSecret
function generic to support both AWS and GCPRequired Secret Key Format by Provider
credentials
azurekey
service_account.json
This ensures that the CloudStorage controller can authenticate properly regardless of which service account it runs under.