Skip to content

Commit ef30552

Browse files
authored
fix: Change argument in load-test template (#2136)
* fix: Change argument in load-test template * Addressing Comments
1 parent ec9d41e commit ef30552

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ parameters:
66
nodeCount: 10
77
vmSize: "Standard_DS4_v2"
88

9-
109
stages:
1110

1211
- stage: createAKScluster
@@ -76,8 +75,10 @@ stages:
7675
- template: ../load-test-templates/pod-deployment-template.yaml
7776
parameters:
7877
clusterName: ${{ parameters.clusterName }}
79-
scaleup: 2400
78+
scaleup: ${CILIUM_SCALEUP}
8079
os: linux
80+
iterations: ${CILIUM_ITERATIONS}
81+
nodeCount: ${{ parameters.nodeCount }}
8182
- stage: validate_state
8283
dependsOn: pod_deployment
8384
displayName: "Validate State"
@@ -100,6 +101,8 @@ stages:
100101
- template: ../load-test-templates/restart-node-template.yaml
101102
parameters:
102103
clusterName: ${{ parameters.clusterName }}
104+
nodeCount: ${{ parameters.nodeCount }}
105+
scaleup: ${CILIUM_SCALEUP}
103106
- stage: validate_restart_state
104107
dependsOn: restart_nodes
105108
displayName: "Validate Restart State"

.pipelines/cni/load-test-templates/pod-deployment-template.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
parameters:
22
clusterName: ""
3-
scaleup: 1000
3+
scaleup: 100
44
os: ""
55
iterations: 4
6+
nodeCount: 10
67

78
steps:
89
- task: AzureCLI@1
@@ -17,4 +18,5 @@ steps:
1718
az extension add --name aks-preview
1819
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(make revision)
1920
cd test/integration/load
20-
go test -timeout 30m -tags load -run ^TestLoad$ -tags=load -iterations=${{ parameters.iterations }} -scaleup=${{ parameters.scaleup }} -os=${{ parameters.os }}
21+
scale=$(( ${{ parameters.scaleup }} * ${{ parameters.nodeCount }} ))
22+
go test -timeout 30m -tags load -run ^TestLoad$ -tags=load -iterations=${{ parameters.iterations }} -scaleup=$scale -os=${{ parameters.os }}

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
parameters:
22
clusterName: ""
3+
nodeCount: 10
4+
scaleup: 100
35

46
steps:
57
- task: AzureCLI@1
@@ -14,13 +16,15 @@ steps:
1416
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${clusterName}
1517
make -C ./hack/aks azcfg AZCLI=az REGION=$(LOCATION)
1618
cd test/integration/load
17-
echo "Scaling the pods down to 100 per node"
18-
go test -count 1 -timeout 30m -tags load -run ^TestScaleDeployment$ -tags=load -scaleup=1000 -skip-wait=true
19+
# Capture a scaledown, scaling down to 50% of initial value
20+
scale=$(( ${{ parameters.scaleup }} * ${{ parameters.nodeCount }} / 2))
21+
echo "Scaling the pods down to $(( $scale / ${{ parameters.nodeCount }} )) per node"
22+
go test -count 1 -timeout 30m -tags load -run ^TestScaleDeployment$ -tags=load -replicas=$scale -skip-wait=true
1923
cd ../../../
2024
echo "Restarting the nodes"
2125
vmss_name=$(az vmss list -g MC_${clusterName}_${clusterName}_$(LOCATION) --query "[].name" -o tsv)
2226
make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=$(LOCATION) VMSS_NAME=$vmss_name
2327
cd test/integration/load
24-
go test -count 1 -timeout 30m -tags load -run ^TestScaleDeployment$ -tags=load -replicas=1000
28+
go test -count 1 -timeout 30m -tags load -run ^TestScaleDeployment$ -tags=load -replicas=$scale
2529
name: "RestartNodes"
2630
displayName: "Restart Nodes"

.pipelines/cni/pipeline.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ stages:
2020
- template: cilium/cilium-overlay-load-test-template.yaml
2121
parameters:
2222
name: cilium
23-
clusterType: "cilium-overlay-up"
23+
clusterType: cilium-overlay-up
2424
clusterName: "cilium-overlay"
25-
nodeCount: ${LINUX_NODE_COUNT}
25+
nodeCount: ${CILIUM_NODE_COUNT}
2626
vmSize: "Standard_DS4_v2"
2727
dependsOn: setup
2828
- template: singletenancy/windows-cni-load-test-template.yaml
2929
parameters:
3030
name: win_cniv1
3131
clusterType: "windows-cniv1-up"
3232
clusterName: "win-cniv1"
33-
nodeCount: 2
33+
nodeCount: ${WINDOWS_NODE_COUNT}
3434
vmSize: Standard_B2ms
3535
dependsOn: setup
3636
windowsVMSize: ${WINDOWS_VM_SKU}

.pipelines/cni/singletenancy/windows-cni-load-test-template.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ stages:
122122
- template: ../k8s-e2e/k8s-e2e-job-template.yaml
123123
parameters:
124124
sub: $(TEST_SUB_SERVICE_CONNECTION)
125-
clusterName: ${{ parameters.clusterName }}
125+
clusterName: ${{ parameters.clusterName }}-$(make revision)
126126
os: ${{ parameters.os }}
127127
datapath: true
128128
dns: true
@@ -147,6 +147,7 @@ stages:
147147
os: ${{ parameters.os }}
148148
cni: ${{ parameters.cni }}
149149
iterations: ${WINDOWS_ITERATIONS}
150+
nodeCount: ${{ parameters.nodeCount }}
150151
- stage: validate_state_windows
151152
pool:
152153
name: $(BUILD_POOL_NAME_DEFAULT)

0 commit comments

Comments
 (0)