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
+
3
9
4
10
stages :
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"
7
15
jobs :
8
- - job : create_aks_cluster_with_cilium
16
+ - job : create_aks_cluster_with_${{ parameters.name }}
9
17
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 }}
22
24
- stage : install_cilium
23
- dependsOn : creating_aks_cluster
25
+ dependsOn : createAKScluster
24
26
displayName : " Install Cilium on AKS Overlay"
25
27
jobs :
26
28
- job : deploy_cilium_components
@@ -35,7 +37,7 @@ stages:
35
37
inlineScript : |
36
38
set -ex
37
39
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)
39
41
ls -lah
40
42
pwd
41
43
kubectl cluster-info
@@ -65,73 +67,39 @@ stages:
65
67
jobs :
66
68
- job : deploy_pods
67
69
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 }}
81
73
- stage : validate_state
82
74
dependsOn : pod_deployment
83
75
displayName : " Validate State"
84
76
jobs :
85
77
- job : validate_state
86
78
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 }}
100
82
- stage : restart_nodes
101
83
dependsOn : validate_state
102
84
displayName : " Restart Node"
103
85
jobs :
104
86
- job : restart_nodes
105
87
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
134
92
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
135
103
displayName : " Connectivity Tests"
136
104
jobs :
137
105
- job : cni_tests
@@ -154,7 +122,7 @@ stages:
154
122
addSpnToEnvironment : true
155
123
inlineScript : |
156
124
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)
158
126
name : " GetCluster"
159
127
displayName : " Get AKS Cluster"
160
128
- script : |
@@ -181,9 +149,9 @@ stages:
181
149
if [ "$(DELETE_RESOURCES)" ]
182
150
then
183
151
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)
185
153
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)
187
155
echo "Cluster and resources down"
188
156
else
189
157
echo "Deletion of resources is False"
0 commit comments