Skip to content

Commit

Permalink
fix: Change argument in load-test template (#2136)
Browse files Browse the repository at this point in the history
* fix: Change argument in load-test template

* Addressing Comments
  • Loading branch information
jpayne3506 authored Aug 21, 2023
1 parent ec9d41e commit ef30552
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
7 changes: 5 additions & 2 deletions .pipelines/cni/cilium/cilium-overlay-load-test-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ parameters:
nodeCount: 10
vmSize: "Standard_DS4_v2"


stages:

- stage: createAKScluster
Expand Down Expand Up @@ -76,8 +75,10 @@ stages:
- template: ../load-test-templates/pod-deployment-template.yaml
parameters:
clusterName: ${{ parameters.clusterName }}
scaleup: 2400
scaleup: ${CILIUM_SCALEUP}
os: linux
iterations: ${CILIUM_ITERATIONS}
nodeCount: ${{ parameters.nodeCount }}
- stage: validate_state
dependsOn: pod_deployment
displayName: "Validate State"
Expand All @@ -100,6 +101,8 @@ stages:
- template: ../load-test-templates/restart-node-template.yaml
parameters:
clusterName: ${{ parameters.clusterName }}
nodeCount: ${{ parameters.nodeCount }}
scaleup: ${CILIUM_SCALEUP}
- stage: validate_restart_state
dependsOn: restart_nodes
displayName: "Validate Restart State"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
parameters:
clusterName: ""
scaleup: 1000
scaleup: 100
os: ""
iterations: 4
nodeCount: 10

steps:
- task: AzureCLI@1
Expand All @@ -17,4 +18,5 @@ steps:
az extension add --name aks-preview
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(make revision)
cd test/integration/load
go test -timeout 30m -tags load -run ^TestLoad$ -tags=load -iterations=${{ parameters.iterations }} -scaleup=${{ parameters.scaleup }} -os=${{ parameters.os }}
scale=$(( ${{ parameters.scaleup }} * ${{ parameters.nodeCount }} ))
go test -timeout 30m -tags load -run ^TestLoad$ -tags=load -iterations=${{ parameters.iterations }} -scaleup=$scale -os=${{ parameters.os }}
10 changes: 7 additions & 3 deletions .pipelines/cni/load-test-templates/restart-node-template.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
parameters:
clusterName: ""
nodeCount: 10
scaleup: 100

steps:
- task: AzureCLI@1
Expand All @@ -14,13 +16,15 @@ steps:
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${clusterName}
make -C ./hack/aks azcfg AZCLI=az REGION=$(LOCATION)
cd test/integration/load
echo "Scaling the pods down to 100 per node"
go test -count 1 -timeout 30m -tags load -run ^TestScaleDeployment$ -tags=load -scaleup=1000 -skip-wait=true
# Capture a scaledown, scaling down to 50% of initial value
scale=$(( ${{ parameters.scaleup }} * ${{ parameters.nodeCount }} / 2))
echo "Scaling the pods down to $(( $scale / ${{ parameters.nodeCount }} )) per node"
go test -count 1 -timeout 30m -tags load -run ^TestScaleDeployment$ -tags=load -replicas=$scale -skip-wait=true
cd ../../../
echo "Restarting the nodes"
vmss_name=$(az vmss list -g MC_${clusterName}_${clusterName}_$(LOCATION) --query "[].name" -o tsv)
make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=$(LOCATION) VMSS_NAME=$vmss_name
cd test/integration/load
go test -count 1 -timeout 30m -tags load -run ^TestScaleDeployment$ -tags=load -replicas=1000
go test -count 1 -timeout 30m -tags load -run ^TestScaleDeployment$ -tags=load -replicas=$scale
name: "RestartNodes"
displayName: "Restart Nodes"
6 changes: 3 additions & 3 deletions .pipelines/cni/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ stages:
- template: cilium/cilium-overlay-load-test-template.yaml
parameters:
name: cilium
clusterType: "cilium-overlay-up"
clusterType: cilium-overlay-up
clusterName: "cilium-overlay"
nodeCount: ${LINUX_NODE_COUNT}
nodeCount: ${CILIUM_NODE_COUNT}
vmSize: "Standard_DS4_v2"
dependsOn: setup
- template: singletenancy/windows-cni-load-test-template.yaml
parameters:
name: win_cniv1
clusterType: "windows-cniv1-up"
clusterName: "win-cniv1"
nodeCount: 2
nodeCount: ${WINDOWS_NODE_COUNT}
vmSize: Standard_B2ms
dependsOn: setup
windowsVMSize: ${WINDOWS_VM_SKU}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ stages:
- template: ../k8s-e2e/k8s-e2e-job-template.yaml
parameters:
sub: $(TEST_SUB_SERVICE_CONNECTION)
clusterName: ${{ parameters.clusterName }}
clusterName: ${{ parameters.clusterName }}-$(make revision)
os: ${{ parameters.os }}
datapath: true
dns: true
Expand All @@ -147,6 +147,7 @@ stages:
os: ${{ parameters.os }}
cni: ${{ parameters.cni }}
iterations: ${WINDOWS_ITERATIONS}
nodeCount: ${{ parameters.nodeCount }}
- stage: validate_state_windows
pool:
name: $(BUILD_POOL_NAME_DEFAULT)
Expand Down

0 comments on commit ef30552

Please sign in to comment.