diff --git a/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml b/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml index 19c26dabce..4d0e2e046d 100644 --- a/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml +++ b/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml @@ -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" + 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 diff --git a/test/integration/manifests/cilium/deployment.yaml b/test/integration/manifests/cilium/deployment.yaml index ac09173c36..2842221eee 100644 --- a/test/integration/manifests/cilium/deployment.yaml +++ b/test/integration/manifests/cilium/deployment.yaml @@ -36,6 +36,8 @@ spec: args: - --config-dir=/tmp/cilium/config-map - --debug=$(CILIUM_DEBUG) + - --identity-gc-interval=0m20s + - --identity-heartbeat-timeout=0m20s env: - name: K8S_NODE_NAME valueFrom: