diff --git a/ci/test-conformance-aks.sh b/ci/test-conformance-aks.sh index 8312334ab37..ab001a6b6f3 100755 --- a/ci/test-conformance-aks.sh +++ b/ci/test-conformance-aks.sh @@ -247,10 +247,14 @@ function run_conformance() { echo "=== Running Antrea Conformance and Network Policy Tests ===" # Skip NodePort related cases for AKS since as Nodes in AKS cluster seem not accessible from other Nodes # through public IPs by default. See https://github.com/antrea-io/antrea/issues/2409 - skip_regex="\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[sig-cli\]|\[sig-storage\]|\[sig-auth\]|\[sig-api-machinery\]|\[sig-apps\]|\[sig-node\]|NodePort" - ${GIT_CHECKOUT_DIR}/ci/run-k8s-e2e-tests.sh --e2e-conformance --e2e-network-policy --e2e-skip ${skip_regex} \ + skip_regex="\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[sig-cli\]|\[sig-storage\]|\[sig-auth\]|\[sig-api-machinery\]|\[sig-apps\]|\[sig-node\]|\[sig-instrumentation\]|NodePort" + ${GIT_CHECKOUT_DIR}/ci/run-k8s-e2e-tests.sh --e2e-conformance --e2e-skip ${skip_regex} \ --kube-conformance-image-version ${KUBE_CONFORMANCE_IMAGE_VERSION} \ - --log-mode ${MODE} > ${GIT_CHECKOUT_DIR}/aks-test.log || TEST_SCRIPT_RC=$? + --log-mode ${MODE} > ${GIT_CHECKOUT_DIR}/aks-test.log && \ + ${GIT_CHECKOUT_DIR}/ci/run-k8s-e2e-tests.sh --e2e-network-policy --e2e-skip "Netpol" \ + --kube-conformance-image-version ${KUBE_CONFORMANCE_IMAGE_VERSION} \ + --log-mode ${MODE} >> ${GIT_CHECKOUT_DIR}/aks-test.log || \ + TEST_SCRIPT_RC=$? if [[ $TEST_SCRIPT_RC -eq 0 ]]; then echo "All tests passed." diff --git a/ci/test-conformance-eks.sh b/ci/test-conformance-eks.sh index 5d59fd99877..a9e34385f73 100755 --- a/ci/test-conformance-eks.sh +++ b/ci/test-conformance-eks.sh @@ -262,10 +262,14 @@ function run_conformance() { # Skip NodePort related cases for EKS since by default eksctl does not create security groups for nodeport service # access through node external IP. See https://github.com/antrea-io/antrea/issues/690 - skip_regex="\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[sig-cli\]|\[sig-storage\]|\[sig-auth\]|\[sig-api-machinery\]|\[sig-apps\]|\[sig-node\]|NodePort" - ${GIT_CHECKOUT_DIR}/ci/run-k8s-e2e-tests.sh --e2e-conformance --e2e-network-policy --e2e-skip ${skip_regex} \ - --kube-conformance-image-version ${KUBE_CONFORMANCE_IMAGE_VERSION} \ - --log-mode ${MODE} > ${GIT_CHECKOUT_DIR}/eks-test.log || TEST_SCRIPT_RC=$? + skip_regex="\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[sig-cli\]|\[sig-storage\]|\[sig-auth\]|\[sig-api-machinery\]|\[sig-apps\]|\[sig-node\]|\[sig-instrumentation\]|NodePort" + ${GIT_CHECKOUT_DIR}/ci/run-k8s-e2e-tests.sh --e2e-conformance --e2e-skip ${skip_regex} \ + --kube-conformance-image-version ${KUBE_CONFORMANCE_IMAGE_VERSION} \ + --log-mode ${MODE} > ${GIT_CHECKOUT_DIR}/eks-test.log && \ + ${GIT_CHECKOUT_DIR}/ci/run-k8s-e2e-tests.sh --e2e-network-policy --e2e-skip "Netpol" \ + --kube-conformance-image-version ${KUBE_CONFORMANCE_IMAGE_VERSION} \ + --log-mode ${MODE} >> ${GIT_CHECKOUT_DIR}/eks-test.log || \ + TEST_SCRIPT_RC=$? if [[ $TEST_SCRIPT_RC -eq 0 ]]; then echo "All tests passed." diff --git a/ci/test-conformance-gke.sh b/ci/test-conformance-gke.sh index faa47bae80d..4a968e4303b 100755 --- a/ci/test-conformance-gke.sh +++ b/ci/test-conformance-gke.sh @@ -31,8 +31,7 @@ RUN_ALL=true RUN_SETUP_ONLY=false RUN_CLEANUP_ONLY=false TEST_SCRIPT_RC=0 -# There is a problem with the netpol suite added in v1.21.0 when running on GKE. See #3762 for details. -KUBE_CONFORMANCE_IMAGE_VERSION=v1.20.15 +KUBE_CONFORMANCE_IMAGE_VERSION=auto _usage="Usage: $0 [--cluster-name ] [--kubeconfig ] [--k8s-version ] \ [--svc-account ] [--user ] [--gke-project ] [--gke-zone ] [--log-mode ] \ @@ -262,9 +261,15 @@ function run_conformance() { # Allow nodeport traffic by external IP ${GCLOUD_PATH} compute firewall-rules create allow-nodeport --allow tcp:30000-32767 - ${GIT_CHECKOUT_DIR}/ci/run-k8s-e2e-tests.sh --e2e-conformance --e2e-network-policy \ + ${GIT_CHECKOUT_DIR}/ci/run-k8s-e2e-tests.sh --e2e-conformance \ --kube-conformance-image-version ${KUBE_CONFORMANCE_IMAGE_VERSION} \ - --log-mode ${MODE} > ${GIT_CHECKOUT_DIR}/gke-test.log || TEST_SCRIPT_RC=$? + --log-mode ${MODE} > ${GIT_CHECKOUT_DIR}/gke-test.log && \ + # Skip Netpol tests for GKE as the test suite's Namespace creation function is not robust, which leads to test + # failures. See https://github.com/antrea-io/antrea/issues/3762#issuecomment-1195865441. + ${GIT_CHECKOUT_DIR}/ci/run-k8s-e2e-tests.sh --e2e-network-policy --e2e-skip "Netpol" \ + --kube-conformance-image-version ${KUBE_CONFORMANCE_IMAGE_VERSION} \ + --log-mode ${MODE} >> ${GIT_CHECKOUT_DIR}/gke-test.log || \ + TEST_SCRIPT_RC=$? if [[ $TEST_SCRIPT_RC -eq 0 ]]; then echo "All tests passed."