1- pr : none
2- trigger : none
1+ parameters :
2+ dependsOn : " "
3+ name : " cilium"
4+ clusterType : " overlay-no-kube-proxy-up"
5+ clusterName : " cilium-overlay"
6+ nodeCount : 10
7+ vmSize : " Standard_DS4_v2"
8+
39
410stages :
5- - stage : creating_aks_cluster
6- displayName : " Create AKS Cluster with Cilium"
11+
12+ - stage : createAKScluster
13+ dependsOn : ${{ parameters.dependsOn }}
14+ displayName : " AKS Cluster with Cilium"
715 jobs :
8- - job : create_aks_cluster_with_cilium
16+ - job : create_aks_cluster_with_${{ parameters.name }}
917 steps :
10- - task : AzureCLI@1
11- inputs :
12- azureSubscription : $(TEST_SUB_SERVICE_CONNECTION)
13- scriptLocation : " inlineScript"
14- scriptType : " bash"
15- addSpnToEnvironment : true
16- inlineScript : |
17- set -ex
18- make -C ./hack/swift azcfg AZCLI=az REGION=$(LOCATION)
19- make -C ./hack/swift overlay-no-kube-proxy-up AZCLI=az REGION=$(LOCATION) SUB=$(SUBSCRIPTION_ID) CLUSTER=${RESOURCE_GROUP}-$(make revision) NODE_COUNT=10 VM_SIZE=Standard_DS4_v2
20- name : " CreateAksCluster"
21- displayName : " Create AKS Cluster"
18+ - template : ../load-test-templates/create-cluster-template.yaml
19+ parameters :
20+ clusterType : ${{ parameters.clusterType }}
21+ clusterName : ${{ parameters.clusterName }}
22+ nodeCount : ${{ parameters.nodeCount }}
23+ vmSize : ${{ parameters.vmSize }}
2224 - stage : install_cilium
23- dependsOn : creating_aks_cluster
25+ dependsOn : createAKScluster
2426 displayName : " Install Cilium on AKS Overlay"
2527 jobs :
2628 - job : deploy_cilium_components
@@ -35,7 +37,7 @@ stages:
3537 inlineScript : |
3638 set -ex
3739 az extension add --name aks-preview
38- make -C ./hack/swift set-kubeconf AZCLI=az CLUSTER=${RESOURCE_GROUP }-$(make revision)
40+ make -C ./hack/swift set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName } }-$(make revision)
3941 ls -lah
4042 pwd
4143 kubectl cluster-info
@@ -65,73 +67,39 @@ stages:
6567 jobs :
6668 - job : deploy_pods
6769 steps :
68- - task : AzureCLI@1
69- displayName : " Pod Deployment"
70- inputs :
71- azureSubscription : $(TEST_SUB_SERVICE_CONNECTION)
72- scriptLocation : " inlineScript"
73- scriptType : " bash"
74- addSpnToEnvironment : true
75- inlineScript : |
76- set -ex
77- az extension add --name aks-preview
78- make -C ./hack/swift set-kubeconf AZCLI=az CLUSTER=${RESOURCE_GROUP}-$(make revision)
79- cd test/integration/load
80- go test -timeout 30m -tags load -run ^TestLoad$ -tags=load -iterations=4 -scaleup=2400
70+ - template : ../load-test-templates/pod-deployment-template.yaml
71+ parameters :
72+ clusterName : ${{ parameters.clusterName }}
8173 - stage : validate_state
8274 dependsOn : pod_deployment
8375 displayName : " Validate State"
8476 jobs :
8577 - job : validate_state
8678 steps :
87- - task : AzureCLI@1
88- inputs :
89- azureSubscription : $(TEST_SUB_SERVICE_CONNECTION)
90- scriptLocation : " inlineScript"
91- scriptType : " bash"
92- addSpnToEnvironment : true
93- inlineScript : |
94- make -C ./hack/swift set-kubeconf AZCLI=az CLUSTER=${RESOURCE_GROUP}-$(make revision)
95- kubectl get pods -A
96- make test-validate-state
97- name : " ValidateState"
98- displayName : " Validate State"
99- retryCountOnTaskFailure : 3
79+ - template : ../load-test-templates/validate-state-template.yaml
80+ parameters :
81+ clusterName : ${{ parameters.clusterName }}
10082 - stage : restart_nodes
10183 dependsOn : validate_state
10284 displayName : " Restart Node"
10385 jobs :
10486 - job : restart_nodes
10587 steps :
106- - task : AzureCLI@1
107- inputs :
108- azureSubscription : $(TEST_SUB_SERVICE_CONNECTION)
109- scriptLocation : " inlineScript"
110- scriptType : " bash"
111- addSpnToEnvironment : true
112- inlineScript : |
113- echo "Scale up the pods and immediated restart the nodes"
114- make -C ./hack/swift set-kubeconf AZCLI=az CLUSTER=${RESOURCE_GROUP}-$(make revision)
115- make -C ./hack/swift azcfg AZCLI=az REGION=$(LOCATION)
116- cd test/integration/load
117- echo "Scaling the pods down to 100 per node"
118- go test -count 1 -timeout 30m -tags load -run ^TestScaleDeployment$ -tags=load -scaleup=1000 -skip-wait=true
119- cd ../../../
120- echo "Restarting the nodes"
121- vmss_name=$(az vmss list -g MC_${RESOURCE_GROUP}_${RESOURCE_GROUP}_$(LOCATION) --query "[].name" -o tsv)
122- make -C ./hack/swift restart-vmss AZCLI=az CLUSTER=${RESOURCE_GROUP}-$(make revision) REGION=$(LOCATION) VMSS_NAME=$vmss_name
123- cd test/integration/load
124- go test -count 1 -timeout 30m -tags load -run ^TestScaleDeployment$ -tags=load -replicas=1000
125- name : " RestartNodes"
126- displayName : " Restart Nodes"
127- - script : |
128- export RESTART_CASE=true
129- make test-validate-state
130- name: "ValidateState"
131- displayName: "Validate State"
132- retryCountOnTaskFailure: 3
133- - stage : connectivity_tests
88+ - template : ../load-test-templates/restart-node-template.yaml
89+ parameters :
90+ clusterName : ${{ parameters.clusterName }}
91+ - stage : validate_restart_state
13492 dependsOn : restart_nodes
93+ displayName : " Validate Restart State"
94+ jobs :
95+ - job : validate_restart_state
96+ steps :
97+ - template : ../load-test-templates/validate-state-template.yaml
98+ parameters :
99+ clusterName : ${{ parameters.clusterName }}
100+ restartCase : " true"
101+ - stage : connectivity_tests
102+ dependsOn : validate_restart_state
135103 displayName : " Connectivity Tests"
136104 jobs :
137105 - job : cni_tests
@@ -154,7 +122,7 @@ stages:
154122 addSpnToEnvironment : true
155123 inlineScript : |
156124 set -ex
157- make -C ./hack/swift set-kubeconf AZCLI=az CLUSTER=${RESOURCE_GROUP }-$(make revision)
125+ make -C ./hack/swift set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName } }-$(make revision)
158126 name : " GetCluster"
159127 displayName : " Get AKS Cluster"
160128 - script : |
@@ -181,9 +149,9 @@ stages:
181149 if [ "$(DELETE_RESOURCES)" ]
182150 then
183151 echo "Deleting Cluster and resource group"
184- make -C ./hack/swift set-kubeconf AZCLI=az CLUSTER=${RESOURCE_GROUP }-$(make revision)
152+ make -C ./hack/swift set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName } }-$(make revision)
185153 make -C ./hack/swift azcfg AZCLI=az REGION=$(LOCATION)
186- make -C ./hack/swift down AZCLI=az REGION=$(LOCATION) SUB=$(SUBSCRIPTION_ID) CLUSTER=${RESOURCE_GROUP }-$(make revision)
154+ make -C ./hack/swift down AZCLI=az REGION=$(LOCATION) SUB=$(SUBSCRIPTION_ID) CLUSTER=${{ parameters.clusterName } }-$(make revision)
187155 echo "Cluster and resources down"
188156 else
189157 echo "Deletion of resources is False"
0 commit comments