Skip to content

Commit

Permalink
Add regional ECR map (#6853)
Browse files Browse the repository at this point in the history
  • Loading branch information
d8660091 authored Oct 20, 2023
1 parent 690df20 commit 9193e87
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/curatedpackages/packagecontrollerclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ func TestGetCuratedPackagesRegistries(s *testing.T) {
curatedpackages.WithRegistryAccessTester(&stubRegistryAccessTester{}),
)

expected := "TODO.dkr.ecr.us-west-2.amazonaws.com"
expected := "346438352937.dkr.ecr.us-west-2.amazonaws.com"
_, actualDefaultRegistry, actualImageRegistry := client.GetCuratedPackagesRegistries(context.Background())

if actualDefaultRegistry != expected {
Expand Down
29 changes: 27 additions & 2 deletions pkg/curatedpackages/regional_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,33 @@ const (
)

var prodRegionalECRMap = map[string]string{
"us-west-2": "TODO.dkr.ecr.us-west-2.amazonaws.com",
"us-east-2": "TODO.dkr.ecr.us-east-2.amazonaws.com",
"af-south-1": "783635962247.dkr.ecr.af-south-1.amazonaws.com",
"ap-east-1": "804323328300.dkr.ecr.ap-east-1.amazonaws.com",
"ap-northeast-1": "143143237519.dkr.ecr.ap-northeast-1.amazonaws.com",
"ap-northeast-2": "447311122189.dkr.ecr.ap-northeast-2.amazonaws.com",
"ap-northeast-3": "376465423944.dkr.ecr.ap-northeast-3.amazonaws.com",
"ap-south-1": "357015164304.dkr.ecr.ap-south-1.amazonaws.com",
"ap-south-2": "388483641499.dkr.ecr.ap-south-2.amazonaws.com",
"ap-southeast-1": "654894141437.dkr.ecr.ap-southeast-1.amazonaws.com",
"ap-southeast-2": "299286866837.dkr.ecr.ap-southeast-2.amazonaws.com",
"ap-southeast-3": "703305448174.dkr.ecr.ap-southeast-3.amazonaws.com",
"ap-southeast-4": "106475008004.dkr.ecr.ap-southeast-4.amazonaws.com",
"ca-central-1": "064352486547.dkr.ecr.ca-central-1.amazonaws.com",
"eu-central-1": "364992945014.dkr.ecr.eu-central-1.amazonaws.com",
"eu-central-2": "551422459769.dkr.ecr.eu-central-2.amazonaws.com",
"eu-north-1": "826441621985.dkr.ecr.eu-north-1.amazonaws.com",
"eu-south-1": "787863792200.dkr.ecr.eu-south-1.amazonaws.com",
"eu-west-1": "090204409458.dkr.ecr.eu-west-1.amazonaws.com",
"eu-west-2": "371148654473.dkr.ecr.eu-west-2.amazonaws.com",
"eu-west-3": "282646289008.dkr.ecr.eu-west-3.amazonaws.com",
"il-central-1": "131750224677.dkr.ecr.il-central-1.amazonaws.com",
"me-central-1": "454241080883.dkr.ecr.me-central-1.amazonaws.com",
"me-south-1": "158698011868.dkr.ecr.me-south-1.amazonaws.com",
"sa-east-1": "517745584577.dkr.ecr.sa-east-1.amazonaws.com",
"us-east-1": "331113665574.dkr.ecr.us-east-1.amazonaws.com",
"us-east-2": "297090588151.dkr.ecr.us-east-2.amazonaws.com",
"us-west-1": "440460740297.dkr.ecr.us-west-1.amazonaws.com",
"us-west-2": "346438352937.dkr.ecr.us-west-2.amazonaws.com",
}

// RegistryAccessTester test if AWS credentials has valid permission to access an ECR registry.
Expand Down

0 comments on commit 9193e87

Please sign in to comment.