-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add HNS restart to Windows CNIv1 in Load Test Pipeline (#2261)
* add: HNS restart template * add: re-run all tests after HNS restart * style: add provided test coverage to template
- Loading branch information
1 parent
4423a94
commit e874736
Showing
4 changed files
with
121 additions
and
6 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
.pipelines/cni/load-test-templates/restart-hns-template.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
parameters: | ||
clusterName: "" | ||
cni: "cniv1" | ||
|
||
steps: | ||
- task: AzureCLI@1 | ||
inputs: | ||
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) | ||
scriptLocation: "inlineScript" | ||
scriptType: "bash" | ||
addSpnToEnvironment: true | ||
inlineScript: | | ||
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }} | ||
kubectl get pod -owide -A | ||
echo "Validate pod IP assignment before HNS restart" | ||
make test-validate-state CNI_TYPE=${{ parameters.cni }} OS_TYPE=windows | ||
podList=`kubectl get pods -n kube-system -l os=windows,app=privileged-daemonset -owide --no-headers | awk '{print $1}'` | ||
echo "Restart HNS service on each node" | ||
for pod in $podList; do | ||
kubectl exec -i -n kube-system $pod -- powershell Restart-Service hns | ||
done | ||
echo "Validate pod IP assignment after HNS restart" | ||
make test-validate-state CNI_TYPE=${{ parameters.cni }} OS_TYPE=windows | ||
name: "restartHNS" | ||
displayName: "Restart HNS and Validate pods" | ||
retryCountOnTaskFailure: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters