From e2ba84329829e067dd13de47119b046281513110 Mon Sep 17 00:00:00 2001 From: James Sturtevant Date: Tue, 16 Jul 2024 15:47:13 -0700 Subject: [PATCH] drop west europe do to re-occuring capacity issues Signed-off-by: James Sturtevant --- capz/run-capz-e2e.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/capz/run-capz-e2e.sh b/capz/run-capz-e2e.sh index ca98c102..474ada72 100755 --- a/capz/run-capz-e2e.sh +++ b/capz/run-capz-e2e.sh @@ -477,8 +477,8 @@ set_azure_envs() { # Generate SSH key. capz::util::generate_ssh_key - export AZURE_LOCATION="${AZURE_LOCATION:-$(capz::util::get_random_region)}" - + AZURE_LOCATION=$(get_random_region) + export AZURE_LOCATION if [[ "${CI:-}" == "true" ]]; then # we don't provide an ssh key in ci so it is created. # the ssh code in the logger and gmsa configuration @@ -496,6 +496,12 @@ log() { echo "$(date -R): $msg" } +# all test regions must support AvailabilityZones +get_random_region() { + local REGIONS=("canadacentral" "eastus" "eastus2" "northeurope" "uksouth" "westus2" "westus3") + echo "${REGIONS[${RANDOM} % ${#REGIONS[@]}]}" +} + set_ci_version() { # select correct windows version for tests if [[ "$(capz::util::should_build_kubernetes)" == "true" ]]; then