From fe3506ee291d178e0decb4d92fb84fa34098a5d5 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Wed, 8 Feb 2023 12:44:39 -0800 Subject: [PATCH] first pass mapping cloud run regions to S3 regions --- .../k8s-infra-oci-proxy-prod/terraform.tfvars | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/infra/gcp/terraform/k8s-infra-oci-proxy-prod/terraform.tfvars b/infra/gcp/terraform/k8s-infra-oci-proxy-prod/terraform.tfvars index 24e84ad4b3e..72f79ca4e5d 100644 --- a/infra/gcp/terraform/k8s-infra-oci-proxy-prod/terraform.tfvars +++ b/infra/gcp/terraform/k8s-infra-oci-proxy-prod/terraform.tfvars @@ -19,7 +19,14 @@ project_id = "k8s-infra-oci-proxy-prod" digest = "sha256:fc811af33c78e9765ee95d6994a6e0dac4c382ae63a960872404b7190110c769" cloud_run_config = { asia-east1 = { + // TODO: switch DEFAULT_AWS_BASE_URL to cloudfront or else refine the region mapping + // GCP asia-east1 is Changhua County, Taiwan environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS ap-southeast-1 is Singapore + value = "https://prod-registry-k8s-io-ap-southeast-1.s3.dualstack.ap-southeast-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://asia-east1-docker.pkg.dev" @@ -30,8 +37,14 @@ cloud_run_config = { } ] } + // GCP asia-northeast1 is Tokyo, Japan asia-northeast1 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS ap-northeast-1 is Tokyo + value = "https://prod-registry-k8s-io-ap-northeast-1.s3.dualstack.ap-northeast-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://asia-northeast1-docker.pkg.dev" @@ -42,8 +55,14 @@ cloud_run_config = { } ] } + // GCP asia-northeast2 is Osaka, Japan asia-northeast2 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS ap-northeast-1 is Tokyo + value = "https://prod-registry-k8s-io-ap-northeast-1.s3.dualstack.ap-northeast-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://asia-northeast2-docker.pkg.dev" @@ -54,8 +73,14 @@ cloud_run_config = { } ] } + // GCP asia-south1 is Mumbai, India asia-south1 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS ap-south-1 is Mumbai + value = "https://prod-registry-k8s-io-ap-south-1.s3.dualstack.ap-south-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://asia-south1-docker.pkg.dev" @@ -66,8 +91,14 @@ cloud_run_config = { } ] } + // GCP australia-southeast1 is Sydney australia-southeast1 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS ap-southeast-1 is Singapore + value = "https://prod-registry-k8s-io-ap-southeast-1.s3.dualstack.ap-southeast-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://australia-southeast1-docker.pkg.dev" @@ -78,8 +109,14 @@ cloud_run_config = { } ] } + // GCP europe-north1 is Hamina, Finland europe-north1 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS eu-central-1 is Frankfurt + value = "https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://europe-north1-docker.pkg.dev" @@ -90,8 +127,14 @@ cloud_run_config = { } ] } + // GCP europe-southwest1 is Madrid, Spain europe-southwest1 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS eu-central-1 is Frankfurt + value = "https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://europe-southwest1-docker.pkg.dev" @@ -102,8 +145,14 @@ cloud_run_config = { } ] } + // GCP europe-west1 is St. Ghislain, Belgium europe-west1 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS eu-central-1 is Frankfurt + value = "https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://europe-west1-docker.pkg.dev" @@ -114,8 +163,14 @@ cloud_run_config = { } ] } + // GCP europe-west2 is London, UK europe-west2 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS eu-west-2 is London + value = "https://prod-registry-k8s-io-eu-west-2.s3.dualstack.eu-west-2.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://europe-west2-docker.pkg.dev" @@ -126,8 +181,14 @@ cloud_run_config = { } ] } + // GCP europe-west4 is Eemshaven, Netherlands europe-west4 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS eu-central-1 is Frankfurt + value = "https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://europe-west4-docker.pkg.dev" @@ -138,8 +199,14 @@ cloud_run_config = { } ] } + // GCP europe-west8 is Milan, Italy europe-west8 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS eu-central-1 is Frankfurt + value = "https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://europe-west8-docker.pkg.dev" @@ -150,8 +217,14 @@ cloud_run_config = { } ] } + // GCP europe-west9 is Paris, France europe-west9 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS eu-west-2 is London + value = "https://prod-registry-k8s-io-eu-west-2.s3.dualstack.eu-west-2.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://europe-west9-docker.pkg.dev" @@ -162,8 +235,15 @@ cloud_run_config = { } ] } + // GCP southamerica-west1 is Santiago, Chile southamerica-west1 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS us-east-1 is Virginia, USA + // See: https://github.com/kubernetes/k8s.io/pull/4739/files#r1100667255 + value = "https://prod-registry-k8s-io-us-east-1.s3.dualstack.us-east-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://southamerica-west1-docker.pkg.dev" @@ -174,8 +254,14 @@ cloud_run_config = { } ] } + // GCP us-central1 is Iowa, USA us-central1 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS us-east-2 is Ohio, USA + value = "https://prod-registry-k8s-io-us-east-2.s3.dualstack.us-east-2.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://us-central1-docker.pkg.dev" @@ -186,8 +272,14 @@ cloud_run_config = { } ] } + // GCP us-east1 is South Carolina, USA us-east1 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS us-east-1 is Virginia, USA + value = "https://prod-registry-k8s-io-us-east-1.s3.dualstack.us-east-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://us-east1-docker.pkg.dev" @@ -198,8 +290,14 @@ cloud_run_config = { } ] } + // GCP us-east4 is Virginia, USA us-east4 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS us-east-1 is Virginia, USA + value = "https://prod-registry-k8s-io-us-east-1.s3.dualstack.us-east-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://us-east4-docker.pkg.dev" @@ -210,8 +308,14 @@ cloud_run_config = { } ] } + // GCP us-east5 is Ohio, USA us-east5 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS us-east-2 is Ohio, USA + value = "https://prod-registry-k8s-io-us-east-2.s3.dualstack.us-east-2.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://us-east5-docker.pkg.dev" @@ -222,8 +326,14 @@ cloud_run_config = { } ] } + // GCP us-south1 is Texas, USA us-south1 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS us-east-2 is Ohio, USA + value = "https://prod-registry-k8s-io-us-east-2.s3.dualstack.us-east-2.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://us-south1-docker.pkg.dev" @@ -234,8 +344,14 @@ cloud_run_config = { } ] } + // GCP us-west1 is Oregon, USA us-west1 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS us-west-2 is Oregon, USA + value = "https://prod-registry-k8s-io-us-west-2.s3.dualstack.us-west-2.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://us-west1-docker.pkg.dev" @@ -246,8 +362,14 @@ cloud_run_config = { } ] } + // GCP us-west2 is California, USA us-west2 = { environment_variables = [ + { + name = "DEFAULT_AWS_BASE_URL", + // AWS us-west-1 is California, USA + value = "https://prod-registry-k8s-io-us-west-1.s3.dualstack.us-west-1.amazonaws.com", + }, { name = "UPSTREAM_REGISTRY_ENDPOINT", value = "https://us-west2-docker.pkg.dev"