Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new region ecr accounts and domains #1956

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions nodeadm/internal/aws/ecr/ecr.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,27 +94,29 @@ var accountsByRegion = map[string]string{
"us-east-2": nonOptInRegionAccount,
"us-west-1": nonOptInRegionAccount,
"us-west-2": nonOptInRegionAccount,
"ap-east-1": "800184023465",
"me-south-1": "558608220178",
"cn-north-1": "918309763551",
"cn-northwest-1": "961992271922",
"us-gov-west-1": "013241004608",
"us-gov-east-1": "151742754352",
"us-iso-west-1": "608367168043",
"us-iso-east-1": "725322719131",
"us-isob-east-1": "187977181151",
"eu-isoe-west-1": "249663109785",
"af-south-1": "877085696533",
"ap-southeast-3": "296578399912",
"me-central-1": "759879836304",
"eu-south-1": "590381155156",
"eu-south-2": "455263428931",
"eu-central-2": "900612956339",
"ap-south-2": "900889452093",
"ap-southeast-4": "491585149902",
"il-central-1": "066635153087",
"ca-west-1": "761377655185",
"ap-southeast-5": "151610086707",

"af-south-1": "877085696533",
ndbaker1 marked this conversation as resolved.
Show resolved Hide resolved
"ap-east-1": "800184023465",
"ap-south-2": "900889452093",
"ap-southeast-3": "296578399912",
"ap-southeast-4": "491585149902",
"ap-southeast-5": "151610086707",
"ca-west-1": "761377655185",
"cn-north-1": "918309763551",
"cn-northwest-1": "961992271922",
"eu-central-2": "900612956339",
"eu-isoe-west-1": "249663109785",
"eu-south-1": "590381155156",
"eu-south-2": "455263428931",
"il-central-1": "066635153087",
"me-central-1": "759879836304",
"me-south-1": "558608220178",
"us-gov-east-1": "151742754352",
"us-gov-west-1": "013241004608",
"us-iso-east-1": "725322719131",
"us-iso-west-1": "608367168043",
"us-isob-east-1": "187977181151",
"us-isof-south-1": "676585237158",
}

// getEKSRegistryCoordinates returns an AWS region and account ID for the default EKS ECR container image registry
Expand All @@ -133,6 +135,8 @@ func getEKSRegistryCoordinates(region string) (string, string) {
return "187977181151", "us-isob-east-1"
} else if strings.HasPrefix(region, "eu-isoe-") {
return "249663109785", "eu-isoe-west-1"
} else if strings.HasPrefix(region, "us-isof-") {
return "676585237158", "us-isof-south-1"
}
return "602401143452", "us-west-2"
}
4 changes: 3 additions & 1 deletion templates/al2/provisioners/install-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ sudo mv $WORKING_DIR/iptables-restore.service /etc/eks/iptables-restore.service
################################################################################

### isolated regions can't communicate to awscli.amazonaws.com so installing awscli through yum
ISOLATED_REGIONS="${ISOLATED_REGIONS:-us-iso-east-1 us-iso-west-1 us-isob-east-1 eu-isoe-west-1}"
ISOLATED_REGIONS="${ISOLATED_REGIONS:-us-iso-east-1 us-iso-west-1 us-isob-east-1 eu-isoe-west-1 us-isof-south-1}"
if ! [[ ${ISOLATED_REGIONS} =~ $BINARY_BUCKET_REGION ]]; then
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
echo "Installing awscli v2 bundle"
Expand Down Expand Up @@ -265,6 +265,8 @@ elif [ "$BINARY_BUCKET_REGION" = "us-isob-east-1" ]; then
S3_DOMAIN="sc2s.sgov.gov"
elif [ "$BINARY_BUCKET_REGION" = "eu-isoe-west-1" ]; then
S3_DOMAIN="cloud.adc-e.uk"
elif [ "$BINARY_BUCKET_REGION" = "us-isof-south-1" ]; then
S3_DOMAIN="csp.hci.ic.gov"
fi
S3_URL_BASE="https://$BINARY_BUCKET_NAME.s3.$BINARY_BUCKET_REGION.$S3_DOMAIN/$KUBERNETES_VERSION/$KUBERNETES_BUILD_DATE/bin/linux/$ARCH"
S3_PATH="s3://$BINARY_BUCKET_NAME/$KUBERNETES_VERSION/$KUBERNETES_BUILD_DATE/bin/linux/$ARCH"
Expand Down
7 changes: 7 additions & 0 deletions templates/al2/runtime/get-ecr-uri.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ else
eu-isoe-west-1)
acct="249663109785"
;;
us-isof-south-1)
acct="676585237158"
;;
af-south-1)
acct="877085696533"
;;
Expand Down Expand Up @@ -116,6 +119,10 @@ else
acct="249663109785"
region="eu-isoe-west-1"
;;
us-isof-*)
acct="676585237158"
region="us-isof-south-1"
;;
*)
acct="602401143452"
region="us-west-2"
Expand Down
4 changes: 4 additions & 0 deletions templates/al2023/provisioners/install-efa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ if [ ${PARTITION} == "aws-iso" ]; then
EFA_DOMAIN="https://aws-efa-installer.s3.${AWS_REGION}.c2s.ic.gov"
elif [ ${PARTITION} == "aws-iso-b" ]; then
EFA_DOMAIN="https://aws-efa-installer.s3.${AWS_REGION}.sc2s.sgov.gov"
elif [ ${PARTITION} == "aws-iso-e" ]; then
EFA_DOMAIN="https://aws-efa-installer.s3.${AWS_REGION}.cloud.adc-e.uk"
elif [ ${PARTITION} == "aws-iso-f" ]; then
EFA_DOMAIN="https://aws-efa-installer.s3.${AWS_REGION}.csp.hci.ic.gov"
fi

mkdir -p /tmp/efa-installer
Expand Down
2 changes: 1 addition & 1 deletion templates/al2023/provisioners/install-neuron-driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi

PARTITION=$(imds "/latest/meta-data/services/partition")

if [ "$PARTITION" == "aws-iso" ] || [ "$PARTITION" == "aws-iso-b" ]; then
if [[ "$PARTITION" =~ ^aws-iso(-[bef])?$ ]]; then
echo "Neuron repository not vailable in isolated regions"
exit 1
fi
Expand Down
4 changes: 3 additions & 1 deletion templates/al2023/provisioners/install-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ sudo systemctl restart sshd.service
################################################################################

### isolated regions can't communicate to awscli.amazonaws.com so installing awscli through dnf
ISOLATED_REGIONS="${ISOLATED_REGIONS:-us-iso-east-1 us-iso-west-1 us-isob-east-1 eu-isoe-west-1}"
ISOLATED_REGIONS="${ISOLATED_REGIONS:-us-iso-east-1 us-iso-west-1 us-isob-east-1 eu-isoe-west-1 us-isof-south-1}"
if ! [[ ${ISOLATED_REGIONS} =~ $BINARY_BUCKET_REGION ]]; then
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
echo "Installing awscli v2 bundle"
Expand Down Expand Up @@ -161,6 +161,8 @@ elif [ "$BINARY_BUCKET_REGION" = "us-isob-east-1" ]; then
S3_DOMAIN="sc2s.sgov.gov"
elif [ "$BINARY_BUCKET_REGION" = "eu-isoe-west-1" ]; then
S3_DOMAIN="cloud.adc-e.uk"
elif [ "$BINARY_BUCKET_REGION" = "us-isof-south-1" ]; then
S3_DOMAIN="csp.hci.ic.gov"
fi
S3_URL_BASE="https://$BINARY_BUCKET_NAME.s3.$BINARY_BUCKET_REGION.$S3_DOMAIN/$KUBERNETES_VERSION/$KUBERNETES_BUILD_DATE/bin/linux/$ARCH"
S3_PATH="s3://$BINARY_BUCKET_NAME/$KUBERNETES_VERSION/$KUBERNETES_BUILD_DATE/bin/linux/$ARCH"
Expand Down
Loading