Explorar o código

cloud-integration support for china cloud in azure

Signed-off-by: Will <156370195+williamkubecost@users.noreply.github.com>
Will %!s(int64=2) %!d(string=hai) anos
pai
achega
a8e91c6143
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      pkg/cloud/azure/storageconnection.go

+ 3 - 0
pkg/cloud/azure/storageconnection.go

@@ -42,6 +42,9 @@ func (sc *StorageConnection) getBlobURLTemplate() string {
 	// Use gov cloud blob url if gov is detected in AzureCloud
 	if strings.Contains(strings.ToLower(sc.Cloud), "gov") {
 		return "https://%s.blob.core.usgovcloudapi.net/%s"
+	} else if strings.Contains(strings.ToLower(sc.Cloud), "china") {
+		// Use China cloud blob url if china is detected in AzureCloud
+		return "https://%s.blob.core.chinacloudapi.cn/%s"
 	}
 	// default to Public Cloud template
 	return "https://%s.blob.core.windows.net/%s"