Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#203 from fredkan/v1.0.3-united-reg…
Browse files Browse the repository at this point in the history
…ion4

add united regions
  • Loading branch information
fredkan authored Mar 5, 2020
2 parents de5730e + 83821fe commit f542ca9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions pkg/disk/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ func updateEcsClent(client *ecs.Client) *ecs.Client {
// SetEcsEndPoint Set Endpoint for Ecs
func SetEcsEndPoint(regionID string) {
// use unitized region endpoint for blew regions.
// total 15 regions
unitizedRegions := []string{"cn-hangzhou", "cn-zhangjiakou", "cn-huhehaote", "cn-shenzhen", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ap-southeast-5", "eu-central-1", "us-east-1", "cn-hongkong", "ap-northeast-1", "ap-south-1", "us-west-1", "me-east-1"}
// total 18 regions
unitizedRegions := []string{"cn-hangzhou", "cn-zhangjiakou", "cn-huhehaote", "cn-shenzhen", "ap-southeast-1", "ap-southeast-2",
"ap-southeast-3", "ap-southeast-5", "eu-central-1", "us-east-1", "cn-hongkong", "ap-northeast-1", "ap-south-1",
"us-west-1", "me-east-1", "cn-north-2-gov-1", "eu-west-1", "cn-chengdu"}
for _, tmpRegion := range unitizedRegions {
if regionID == tmpRegion {
aliyunep.AddEndpointMapping(regionID, "Ecs", "ecs."+regionID+".aliyuncs.com")
Expand Down
8 changes: 4 additions & 4 deletions pkg/nas/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ func newNasClient(accessKeyID, accessKeySecret, accessToken string) (nasClient *
// SetNasEndPoint Set Endpoint for Nas
func SetNasEndPoint(regionID string) {
// use unitized region endpoint for blew regions.
// total 9 regions
unitizedRegions := []string{"cn-hangzhou", "cn-zhangjiakou", "cn-huhehaote", "cn-shenzhen",
"ap-southeast-1", "ap-southeast-2", "ap-southeast-5", "eu-central-1", "us-east-1"}

// total 16 regions
unitizedRegions := []string{"cn-hangzhou", "cn-zhangjiakou", "cn-huhehaote", "cn-shenzhen", "ap-southeast-1", "ap-southeast-2",
"ap-southeast-3", "ap-southeast-5", "eu-central-1", "us-east-1", "ap-northeast-1", "ap-south-1",
"us-west-1", "eu-west-1", "cn-chengdu", "cn-north-2-gov-1"}
for _, tmpRegion := range unitizedRegions {
if regionID == tmpRegion {
aliyunep.AddEndpointMapping(regionID, "Nas", "nas-vpc."+regionID+".aliyuncs.com")
Expand Down

0 comments on commit f542ca9

Please sign in to comment.