소스 검색

Merge pull request #2757 from williamkubecost/add-support-for-china-azcloud

Add Cloud Integration Support for Azure China Cloud
Matt Ray 2 년 전
부모
커밋
5bd1c66d02
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
 	// Use gov cloud blob url if gov is detected in AzureCloud
 	if strings.Contains(strings.ToLower(sc.Cloud), "gov") {
 	if strings.Contains(strings.ToLower(sc.Cloud), "gov") {
 		return "https://%s.blob.core.usgovcloudapi.net/%s"
 		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
 	// default to Public Cloud template
 	return "https://%s.blob.core.windows.net/%s"
 	return "https://%s.blob.core.windows.net/%s"