Просмотр исходного кода

cloud-integration support for china cloud in azure

Signed-off-by: Will <156370195+williamkubecost@users.noreply.github.com>
Will 2 лет назад
Родитель
Сommit
a8e91c6143
1 измененных файлов с 3 добавлено и 0 удалено
  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"