Skip to content

Commit 7aa198b

Browse files
committed
ci-operator/step-registry/ipi/conf/azure: Region from Boskos lease
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
1 parent a53aa73 commit 7aa198b

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

ci-operator/step-registry/ipi/conf/azure/ipi-conf-azure-commands.sh

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,8 @@ set -o pipefail
66

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

9-
case $((RANDOM % 8)) in
10-
0) AZURE_REGION=centralus;;
11-
1) AZURE_REGION=centralus;;
12-
2) AZURE_REGION=centralus;;
13-
3) AZURE_REGION=centralus;;
14-
4) AZURE_REGION=centralus;;
15-
5) AZURE_REGION=centralus;;
16-
6) AZURE_REGION=eastus2;;
17-
7) AZURE_REGION=westus;;
18-
*) echo >&2 "invalid Azure region index"; exit 1;;
19-
esac
20-
echo "Azure region: ${AZURE_REGION}"
9+
REGION="${LEASED_RESOURCE}"
10+
echo "Azure region: ${REGION}"
2111

2212
cat >> "${CONFIG}" << EOF
2313
baseDomain: ci.azure.devcluster.openshift.com
@@ -29,5 +19,5 @@ compute:
2919
platform:
3020
azure:
3121
baseDomainResourceGroupName: os4-common
32-
region: ${AZURE_REGION}
22+
region: ${REGION}
3323
EOF

0 commit comments

Comments
 (0)