azureblob: upgrade gocloud to support endpoint option#6735
azureblob: upgrade gocloud to support endpoint option#6735zchuX wants to merge 1 commit intopingcap:release-1.xfrom
Conversation
* azureblob: upgrade gocloud to support endpoint options * try make AD work with Azure other region * fix build --------- Co-authored-by: Ziya Ye <ziya.ye@your.hostname.com> (cherry picked from commit 779c481c3901ec5222f6ee436ef5950b716e23ed)
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @zchuX! It looks like this is your first PR to pingcap/tidb-operator 🎉 |
|
Hi @zchuX. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
|
|
@zchuX please rebase |
What problem does this PR solve?
Azure Blob Storage (azblob) backups only worked against the global Azure public cloud endpoint. Users running TiDB Operator in Azure sovereign/regional clouds — specifically Azure China (Mooncake /
chinacloudapi.cn) and Azure US Government (usgovcloudapi.net) could not use azblob as a backup target because the storage endpoint, Active Directory authentication endpoint, and resource URI were all hardcoded to the public cloud values.What is changed and how does it work?
A new optional
endpointfield is added to theAzblobStorageProviderAPI spec. When provided, it overrides the default Azure public cloud storage endpoint and also drives the correct AAD (Active Directory) authentication endpoint and resource URI selection for the corresponding sovereign cloud.Change originally cherry-picked from https://github.com/pingcap/tidb-operator/pull/6356/changes. Fixed the issue with
ccc.Resourceset to different values for different domain in the original PR, it should remain constant across domains.Code changes
Tests
Basked the change for a months in both China/USGov regions and confirmed br works as expected. Please refer to correspondence at: https://tidb.support.pingcap.com/servicedesk/customer/portal/4/NAID-11542
Side effects
gocloud.devupgraded fromv0.18.0tov0.21.0. The AAD authentication path behavior changes when anendpointis provided (uses cloud-specific resource URIs instead of the globalhttps://storage.azure.com/). Existing configurations withoutendpointare unaffected.Related changes
Release Notes
Add support for configuring a custom
endpointinAzblobStorageProvider, enabling azblob backup and restore to work with Azure sovereign/regional clouds (Azure China, Azure US Government, Azure Germany) in addition to the global Azure public cloud.