Skip to content

Commit

Permalink
ci-operator/step-registry/ipi/conf/azure: Region from Boskos lease
Browse files Browse the repository at this point in the history
To help avoid errors like "we randomly assigned more Azure centralus
clusters than we had capacity for and they died on quota limits".
From [1]:

> A test may access the name of the resource that was acquired using
> the ${LEASED_RESOURCE} environment variable.

[1]: https://steps.ci.openshift.org/help/leases#static
  • Loading branch information
wking committed Oct 15, 2020
1 parent a53aa73 commit 7aa198b
Showing 1 changed file with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,8 @@ set -o pipefail

CONFIG="${SHARED_DIR}/install-config.yaml"

case $((RANDOM % 8)) in
0) AZURE_REGION=centralus;;
1) AZURE_REGION=centralus;;
2) AZURE_REGION=centralus;;
3) AZURE_REGION=centralus;;
4) AZURE_REGION=centralus;;
5) AZURE_REGION=centralus;;
6) AZURE_REGION=eastus2;;
7) AZURE_REGION=westus;;
*) echo >&2 "invalid Azure region index"; exit 1;;
esac
echo "Azure region: ${AZURE_REGION}"
REGION="${LEASED_RESOURCE}"
echo "Azure region: ${REGION}"

cat >> "${CONFIG}" << EOF
baseDomain: ci.azure.devcluster.openshift.com
Expand All @@ -29,5 +19,5 @@ compute:
platform:
azure:
baseDomainResourceGroupName: os4-common
region: ${AZURE_REGION}
region: ${REGION}
EOF

0 comments on commit 7aa198b

Please sign in to comment.