Skip to content

Commit 79cd7f7

Browse files
committed
Define AZURE_LOCATION_LOAD for load test regions
1 parent 5b0130c commit 79cd7f7

File tree

7 files changed

+17
-2
lines changed

7 files changed

+17
-2
lines changed

hack/util.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ capz::util::get_random_region_edgezone() {
7676
local REGIONS=("canadacentral")
7777
echo "${REGIONS[${RANDOM} % ${#REGIONS[@]}]}"
7878
}
79+
# all regions below must have sufficient quota to run load tests
80+
capz::util::get_random_region_load() {
81+
local REGIONS=("canadacentral" "francecentral" "northeurope")
82+
echo "${REGIONS[${RANDOM} % ${#REGIONS[@]}]}"
83+
}
7984

8085
capz::util::generate_ssh_key() {
8186
# Generate SSH key.

scripts/ci-conformance.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export GINKGO_NODES=1
6868
export AZURE_LOCATION="${AZURE_LOCATION:-$(capz::util::get_random_region)}"
6969
export AZURE_LOCATION_GPU="${AZURE_LOCATION_GPU:-$(capz::util::get_random_region_gpu)}"
7070
export AZURE_LOCATION_EDGEZONE="${AZURE_LOCATION_EDGEZONE:-$(capz::util::get_random_region_edgezone)}"
71+
export AZURE_LOCATION_LOAD="${AZURE_LOCATION_LOAD:-$(capz::util::get_random_region_load)}"
7172
export AZURE_CONTROL_PLANE_MACHINE_TYPE="${AZURE_CONTROL_PLANE_MACHINE_TYPE:-"Standard_B2s"}"
7273
export AZURE_NODE_MACHINE_TYPE="${AZURE_NODE_MACHINE_TYPE:-"Standard_B2s"}"
7374
export WINDOWS="${WINDOWS:-false}"

scripts/ci-entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ setup() {
100100
echo "Using AZURE_LOCATION_GPU: ${AZURE_LOCATION_GPU}"
101101
export AZURE_LOCATION_EDGEZONE="${AZURE_LOCATION_EDGEZONE:-$(capz::util::get_random_region_edgezone)}"
102102
echo "Using AZURE_LOCATION_EDGEZONE: ${AZURE_LOCATION_EDGEZONE}"
103+
export AZURE_LOCATION_LOAD="${AZURE_LOCATION_LOAD:-$(capz::util::get_random_region_load)}"
104+
echo "Using AZURE_LOCATION_LOAD: ${AZURE_LOCATION_LOAD}"
103105
# Need a cluster with at least 2 nodes
104106
export CONTROL_PLANE_MACHINE_COUNT="${CONTROL_PLANE_MACHINE_COUNT:-1}"
105107
export CCM_COUNT="${CCM_COUNT:-1}"

templates/test/dev/cluster-template-custom-builds-load-dra.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/test/dev/cluster-template-custom-builds-load.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/test/dev/custom-builds-load/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ resources:
55
- ../custom-builds
66
- storageclass-resource-set.yaml
77
patches:
8+
- path: patches/location.yaml
89
- path: patches/cluster-label-storageclass.yaml
910
- path: patches/cluster-label-azuredisk.yaml
1011
- path: patches/kcp-scheduler.yaml
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
2+
kind: AzureCluster
3+
metadata:
4+
name: ${CLUSTER_NAME}
5+
spec:
6+
location: ${AZURE_LOCATION_LOAD}

0 commit comments

Comments
 (0)