-
Notifications
You must be signed in to change notification settings - Fork 260
ci: add cilium identities check to nightly pipeline #2071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -158,6 +158,11 @@ steps: | |
| - script: | | ||
| echo "validate pod IP assignment and check systemd-networkd restart" | ||
| kubectl get pod -owide -A | ||
| if [ "$CILIUM_VERSION_TAG" = "cilium-nightly-pipeline" ]; then | ||
| echo "Check cilium identities in cilium-test namepsace during nightly run" | ||
| echo "expect the identities to be deleted when the namespace is deleted" | ||
| kubectl get ciliumidentity | grep cilium-test | ||
| fi | ||
| make test-validate-state | ||
| echo "delete cilium connectivity test resources and re-validate state" | ||
| kubectl delete ns cilium-test | ||
|
|
@@ -166,6 +171,33 @@ steps: | |
| name: "validatePods" | ||
| displayName: "Validate Pods" | ||
|
|
||
| - script: | | ||
| if [ "$CILIUM_VERSION_TAG" = "cilium-nightly-pipeline" ]; then | ||
| kubectl get pod -owide -n cilium-test | ||
| echo "wait for pod and cilium identity deletion in cilium-test namespace" | ||
| ns="cilium-test" | ||
| while true; do | ||
| pods=$(kubectl get pods -n $ns --no-headers=true 2>/dev/null) | ||
| if [[ -z "$pods" ]]; then | ||
| echo "No pods found" | ||
| break | ||
| fi | ||
| sleep 2s | ||
| done | ||
| sleep 20s | ||
| echo "Verify cilium identities are deleted from cilium-test" | ||
| checkIdentity="$(kubectl get ciliumidentity -o json | grep cilium-test | jq -e 'length == 0')" | ||
| if [[ -n $checkIdentity ]]; then | ||
| echo "##[error]Cilium Identities still present in cilium-test namespace" | ||
| else | ||
| printf -- "Identities deleted from cilium-test namespace\n" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason we added
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I wrote this for the original nightly pipeline I recall I had to change the first case to echo with azp syntax in order to indicate actual failure in the pipeline. |
||
| fi | ||
| else | ||
| echo "skip cilium identities check for PR pipeline" | ||
| fi | ||
| name: "CiliumIdentities" | ||
| displayName: "Verify Cilium Identities Deletion" | ||
|
|
||
| - script: | | ||
| echo "validate pod IP assignment before CNS restart" | ||
| kubectl get pod -owide -A | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are sleeping again after checking the deletion of pods ? For cilium
gc?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, need to wait for cilium gc