-
Notifications
You must be signed in to change notification settings - Fork 360
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
Handle Azure URLs for chinacloud #7520
Conversation
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.
The code looks good. Two thing I think we should verify before merging:
- Are pre-signed urls supported in this domain
- If so, does it use the same format as in the microsoft.net domain
beac0e1
to
0b921d7
Compare
♻️ PR Preview 9852415 has been successfully destroyed since this PR has been closed. 🤖 By surge-preview |
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.
Approved, but I'd like to suggest a different approach
pkg/block/azure/adapter.go
Outdated
@@ -29,14 +29,16 @@ const ( | |||
// more the 5000 different accounts, which is highly unlikely | |||
udcCacheSize = 5000 | |||
|
|||
BlobEndpointFormat = "https://%s.blob.core.windows.net/" | |||
BlobEndpointGeneralFormat = "https://%s.blob.core.windows.net/" |
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.
BlobEndpointGeneralFormat = "https://%s.blob.core.windows.net/" | |
BlobEndpointGlobalFormat = "https://%s.blob.core.windows.net/" |
) | ||
|
||
type Adapter struct { | ||
clientCache *ClientCache | ||
preSignedExpiry time.Duration | ||
disablePreSigned bool | ||
disablePreSignedUI bool | ||
chinaCloud bool |
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.
My suggestion is to not use a boolean but rather allow providing a custom domain with the default being the global Azure blob domain. In addition we might want to log a warning when using a custom domain
@itaiad200 another thing I forgot! |
Thanks @N-o-Z . I took these into account. It's dynamically read through |
closes #7518