Skip to content

Commit 0ce33eb

Browse files
authored
[backport] ci: Adjust VM usage for CNI Release Test Pipeline (#2837) (#2848)
ci: Adjust VM usage for CNI Release Test Pipeline (#2837) ci: Add variables for sku region control
1 parent 3477bcb commit 0ce33eb

File tree

6 files changed

+83
-10
lines changed

6 files changed

+83
-10
lines changed

.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ stages:
1919
- stage: create_${{ parameters.name }}
2020
condition: and( succeeded(), and( or( contains(variables.CONTROL_CNI, 'cilium') , contains(variables.CONTROL_CNI, 'all') ), or( contains(variables.CONTROL_OS, 'linux'), contains(variables.CONTROL_OS, 'all') ) ) )
2121
variables:
22+
${{ if contains(parameters.clusterName, 'rdma') }}:
23+
location: $(LOCATION_RDMA)
24+
${{ elseif eq(parameters.arch, 'arm64') }}:
25+
location: $(LOCATION_ARM64)
26+
${{ else }}:
27+
location: $(LOCATION_AMD64)
2228
commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ]
2329
dependsOn:
2430
- setup
@@ -34,7 +40,7 @@ stages:
3440
clusterName: ${{ parameters.clusterName }}-$(commitID)
3541
nodeCount: ${{ parameters.nodeCount }}
3642
vmSize: ${{ parameters.vmSize }}
37-
region: $(LOCATION)
43+
region: $(location)
3844

3945
# Conditions for below E2E test scenarios confirm that:
4046
# Pipeline has not been canceled and that the previous job has reports anything other than failure(Succeeded, SuccededWithIssues, Skipped). Previous job is declared by dependsOn:
@@ -44,6 +50,12 @@ stages:
4450
variables:
4551
commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ]
4652
cnsVersion: $[ stagedependencies.setup.env.outputs['SetEnvVars.cnsVersion'] ]
53+
${{ if contains(parameters.clusterName, 'rdma') }}:
54+
location: $(LOCATION_RDMA)
55+
${{ elseif eq(parameters.arch, 'arm64') }}:
56+
location: $(LOCATION_ARM64)
57+
${{ else }}:
58+
location: $(LOCATION_AMD64)
4759
pool:
4860
name: "$(BUILD_POOL_NAME_DEFAULT)"
4961
dependsOn:
@@ -162,6 +174,7 @@ stages:
162174
clusterName: ${{ parameters.clusterName }}-$(commitID)
163175
os: ${{ parameters.os }}
164176
cni: cilium
177+
region: $(location)
165178
- template: ../load-test-templates/validate-state-template.yaml
166179
parameters:
167180
clusterName: ${{ parameters.clusterName }}-$(commitID)

.pipelines/cni/load-test-templates/restart-node-template.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ parameters:
33
os: "linux"
44
cni: ""
55
jobName: "restart_nodes"
6+
region: ""
67

78
steps:
89
- task: AzureCLI@1
@@ -13,12 +14,14 @@ steps:
1314
addSpnToEnvironment: true
1415
inlineScript: |
1516
clusterName=${{ parameters.clusterName }}
17+
region=${{ parameters.region }}
18+
1619
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${clusterName}
17-
make -C ./hack/aks azcfg AZCLI=az REGION=$(LOCATION)
20+
make -C ./hack/aks azcfg AZCLI=az REGION=${region}
1821
1922
echo "Restarting the nodes"
20-
for val in $(az vmss list -g MC_${clusterName}_${clusterName}_$(LOCATION) --query "[].name" -o tsv); do
21-
make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=$(LOCATION) VMSS_NAME=$val
23+
for val in $(az vmss list -g MC_${clusterName}_${clusterName}_${region} --query "[].name" -o tsv); do
24+
make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=${region} VMSS_NAME=$val
2225
done
2326
kubectl get pods -n kube-system -owide
2427

.pipelines/cni/lsg/lsg-cni-intergration-template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ stages:
144144
clusterName: ${{ parameters.clusterName }}-$(commitID)
145145
os: ${{ parameters.os }}
146146
cni: ${{ parameters.cni }}
147+
region: $(LOCATION)
147148
- template: ../load-test-templates/validate-state-template.yaml
148149
parameters:
149150
clusterName: ${{ parameters.clusterName }}-$(commitID)

.pipelines/cni/pipeline.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ stages:
307307
clusterName: "cilium-over"
308308
nodeCount: ${NODE_COUNT_CILIUM}
309309
vmSize: ${VM_SIZE_CILIUM}
310+
arch: amd64
310311
cni: "cilium"
311312

312313
- template: cilium/cilium-overlay-load-test-template.yaml
@@ -317,6 +318,7 @@ stages:
317318
hubbleEnabled: true
318319
nodeCount: ${NODE_COUNT_CILIUM}
319320
vmSize: ${VM_SIZE_CILIUM}
321+
arch: amd64
320322
cni: "cilium"
321323

322324
- template: cilium/cilium-overlay-load-test-template.yaml
@@ -357,6 +359,7 @@ stages:
357359
clusterName: "cil-ds-ov"
358360
nodeCount: ${NODE_COUNT_CILIUM}
359361
vmSize: ${VM_SIZE_CILIUM}
362+
arch: amd64
360363
dualstackVersion: ${CILIUM_DUALSTACK_VERSION}
361364
cni: "cilium_dualstack"
362365

@@ -449,12 +452,21 @@ stages:
449452
addSpnToEnvironment: true
450453
inlineScript: |
451454
set -x
455+
456+
if [[ ${clusterName} =~ 'rdma' ]]; then
457+
region=${LOCATION_RDMA}
458+
elif [[ ${clusterName} =~ 'arm' ]]; then
459+
region=${LOCATION_ARM64}
460+
else
461+
region=${LOCATION_AMD64}
462+
fi
463+
452464
if [ "$(DELETE_RESOURCES)" ]
453465
then
454466
echo "Deleting Cluster and resource group"
455467
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=$(clusterName)-$(commitID)
456-
make -C ./hack/aks azcfg AZCLI=az REGION=$(LOCATION)
457-
make -C ./hack/aks down AZCLI=az REGION=$(LOCATION) SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) CLUSTER=$(clusterName)-$(commitID)
468+
make -C ./hack/aks azcfg AZCLI=az REGION=${region}
469+
make -C ./hack/aks down AZCLI=az REGION=${region} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) CLUSTER=$(clusterName)-$(commitID)
458470
echo "Cluster and resources down"
459471
else
460472
echo "Deletion of resources is False"

.pipelines/cni/singletenancy/cniv1-template.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ stages:
3535
variables:
3636
commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ]
3737
npmVersion: $[ stagedependencies.setup.env.outputs['SetEnvVars.npmVersion'] ]
38+
${{ if eq(parameters.arch, 'amd64') }}:
39+
location: $(LOCATION_AMD64)
40+
${{ if eq(parameters.arch, 'arm64') }}:
41+
location: $(LOCATION_ARM64)
3842
pool:
3943
name: $(BUILD_POOL_NAME_DEFAULT)
4044
dependsOn:
@@ -50,7 +54,7 @@ stages:
5054
nodeCount: ${{ parameters.nodeCount }}
5155
vmSize: ${{ parameters.vmSize }}
5256
vmSizeWin: ${{ parameters.vmSizeWin }}
53-
region: $(LOCATION)
57+
region: $(location)
5458
osSKU: ${{ parameters.osSKU }}
5559

5660
# If ensures that only windows template calls are compared against the below condition
@@ -63,6 +67,10 @@ stages:
6367
variables:
6468
commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ]
6569
npmVersion: $[ stagedependencies.setup.env.outputs['SetEnvVars.npmVersion'] ]
70+
${{ if eq(parameters.arch, 'amd64') }}:
71+
location: $(LOCATION_AMD64)
72+
${{ if eq(parameters.arch, 'arm64') }}:
73+
location: $(LOCATION_ARM64)
6674
pool:
6775
name: $(BUILD_POOL_NAME_DEFAULT)
6876
dependsOn:
@@ -79,7 +87,7 @@ stages:
7987
nodeCountWin: ${{ parameters.nodeCountWin }}
8088
vmSize: ${{ parameters.vmSize }}
8189
vmSizeWin: ${{ parameters.vmSizeWin }}
82-
region: $(LOCATION)
90+
region: $(location)
8391
osSKU: ${{ parameters.osSKU }}
8492
os: ${{ parameters.os }}
8593
osSkuWin: ${{ parameters.osSkuWin }}
@@ -92,6 +100,10 @@ stages:
92100
variables:
93101
commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ]
94102
npmVersion: $[ stagedependencies.setup.env.outputs['SetEnvVars.npmVersion'] ]
103+
${{ if eq(parameters.arch, 'amd64') }}:
104+
location: $(LOCATION_AMD64)
105+
${{ if eq(parameters.arch, 'arm64') }}:
106+
location: $(LOCATION_ARM64)
95107
pool:
96108
name: $(BUILD_POOL_NAME_DEFAULT)
97109
dependsOn:
@@ -168,6 +180,7 @@ stages:
168180
clusterName: ${{ parameters.clusterName }}-$(commitID)
169181
os: ${{ parameters.os }}
170182
cni: cniv1
183+
region: $(location)
171184
- template: ../load-test-templates/validate-state-template.yaml
172185
parameters:
173186
clusterName: ${{ parameters.clusterName }}-$(commitID)
@@ -231,6 +244,10 @@ stages:
231244
variables:
232245
commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ]
233246
npmVersion: $[ stagedependencies.setup.env.outputs['SetEnvVars.npmVersion'] ]
247+
${{ if eq(parameters.arch, 'amd64') }}:
248+
location: $(LOCATION_AMD64)
249+
${{ if eq(parameters.arch, 'arm64') }}:
250+
location: $(LOCATION_ARM64)
234251
pool:
235252
name: $(BUILD_POOL_NAME_DEFAULT)
236253
dependsOn:
@@ -275,6 +292,7 @@ stages:
275292
os: ${{ parameters.os }}
276293
cni: cniv1
277294
jobName: restart_nodesHNS
295+
region: $(location)
278296
- template: ../load-test-templates/validate-state-template.yaml
279297
parameters:
280298
clusterName: ${{ parameters.clusterName }}-$(commitID)

.pipelines/cni/singletenancy/cniv2-template.yaml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ stages:
3333
condition: and( succeeded(), and( or( contains(variables.CONTROL_CNI, 'cniv2'), contains(variables.CONTROL_CNI, 'all') ), or( contains(variables.CONTROL_OS, 'linux'), contains(variables.CONTROL_OS, 'all') ) ) )
3434
variables:
3535
commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ]
36+
${{ if contains(parameters.clusterName, 'rdma') }}:
37+
location: $(LOCATION_RDMA)
38+
${{ elseif eq(parameters.arch, 'arm64') }}:
39+
location: $(LOCATION_ARM64)
40+
${{ else }}:
41+
location: $(LOCATION_AMD64)
3642
pool:
3743
name: $(BUILD_POOL_NAME_DEFAULT)
3844
dependsOn:
@@ -47,7 +53,7 @@ stages:
4753
clusterName: ${{ parameters.clusterName }}-$(commitID)
4854
nodeCount: ${{ parameters.nodeCount }}
4955
vmSize: ${{ parameters.vmSize }}
50-
region: $(LOCATION)
56+
region: $(location)
5157
osSKU: ${{ parameters.osSKU }}
5258

5359
# If ensures that only windows template calls are compared against the below condition
@@ -59,6 +65,12 @@ stages:
5965
condition: and( succeeded(), and( or( contains(variables.CONTROL_CNI, 'cniv2'), contains(variables.CONTROL_CNI, 'all') ), or( contains(variables.CONTROL_OS, 'windows'), contains(variables.CONTROL_OS, 'all') ) ) )
6066
variables:
6167
commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ]
68+
${{ if contains(parameters.clusterName, 'rdma') }}:
69+
location: $(LOCATION_RDMA)
70+
${{ elseif eq(parameters.arch, 'arm64') }}:
71+
location: $(LOCATION_ARM64)
72+
${{ else }}:
73+
location: $(LOCATION_AMD64)
6274
pool:
6375
name: $(BUILD_POOL_NAME_DEFAULT)
6476
dependsOn:
@@ -75,7 +87,7 @@ stages:
7587
nodeCountWin: ${{ parameters.nodeCountWin }}
7688
vmSize: ${{ parameters.vmSize }}
7789
vmSizeWin: ${{ parameters.vmSizeWin }}
78-
region: $(LOCATION)
90+
region: $(location)
7991
osSKU: ${{ parameters.osSKU }}
8092
os: ${{ parameters.os }}
8193
osSkuWin: ${{ parameters.osSkuWin }}
@@ -93,6 +105,12 @@ stages:
93105
nodeCount: ${{ parameters.nodeCountWin }}
94106
${{ else }}:
95107
nodeCount: ${{ parameters.nodeCount }}
108+
${{ if contains(parameters.clusterName, 'rdma') }}:
109+
location: $(LOCATION_RDMA)
110+
${{ elseif eq(parameters.arch, 'arm64') }}:
111+
location: $(LOCATION_ARM64)
112+
${{ else }}:
113+
location: $(LOCATION_AMD64)
96114
pool:
97115
name: $(BUILD_POOL_NAME_DEFAULT)
98116
dependsOn:
@@ -204,6 +222,7 @@ stages:
204222
clusterName: ${{ parameters.clusterName }}-$(commitID)
205223
os: ${{ parameters.os }}
206224
cni: cniv2
225+
region: $(location)
207226
- template: ../load-test-templates/validate-state-template.yaml
208227
parameters:
209228
clusterName: ${{ parameters.clusterName }}-$(commitID)
@@ -277,6 +296,12 @@ stages:
277296
- stage: ${{ parameters.name }}_HNS
278297
variables:
279298
commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ]
299+
${{ if contains(parameters.clusterName, 'rdma') }}:
300+
location: $(LOCATION_RDMA)
301+
${{ elseif eq(parameters.arch, 'arm64') }}:
302+
location: $(LOCATION_ARM64)
303+
${{ else }}:
304+
location: $(LOCATION_AMD64)
280305
pool:
281306
name: $(BUILD_POOL_NAME_DEFAULT)
282307
dependsOn:
@@ -320,6 +345,7 @@ stages:
320345
nodeCount: ${{ parameters.nodeCountWin }}
321346
scaleup: ${{ parameters.scaleup }}
322347
jobName: "HNS_restart_nodes"
348+
region: $(location)
323349
- template: ../load-test-templates/validate-state-template.yaml
324350
parameters:
325351
clusterName: ${{ parameters.clusterName }}-$(commitID)

0 commit comments

Comments
 (0)