diff --git a/.gitmodules b/.gitmodules index edcda93f3c..3ed2889e95 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "cnf-tests/submodules/metallb-operator"] - path = cnf-tests/submodules/metallb-operator - url = https://github.com/openshift/metallb-operator.git [submodule "cnf-tests/submodules/sriov-network-operator"] path = cnf-tests/submodules/sriov-network-operator url = https://github.com/openshift/sriov-network-operator.git diff --git a/Makefile b/Makefile index 8f79805d83..1e6685d367 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,7 @@ #TODO add default features here -export FEATURES?=sctp performance vrf container-mount-namespace metallb tuningcni bondcni knmstate +export FEATURES?=sctp performance vrf container-mount-namespace tuningcni bondcni knmstate export SKIP_TESTS?= export FOCUS_TESTS?= -export METALLB_OPERATOR_TARGET_COMMIT?=main export SRIOV_NETWORK_OPERATOR_TARGET_COMMIT?=main export CLUSTER_NODE_TUNING_OPERATOR_TARGET_COMMIT?=main IMAGE_BUILD_CMD ?= "docker" diff --git a/cnf-tests/README.md b/cnf-tests/README.md index 5cee5857e6..593d37ab9c 100644 --- a/cnf-tests/README.md +++ b/cnf-tests/README.md @@ -15,13 +15,12 @@ Table of Contents The conformance test suites verify that the operators we maintain are working properly on CNF-enabled clusters. The suites are "validationsuite", "configsuite", and "cnftests". The underlying Ginkgo test suites run by each suite can be found in the `TESTS_PATHS` variable in `hack/common.sh` in the root directory. -To prevent dependency conflicts, we use git submodules to store external repositories: `cluster-node-tuning-operator`, `metallb-operator`, and `sriov-network-operator`, in the path `cnf-tests/submodules`. +To prevent dependency conflicts, we use git submodules to store external repositories: `cluster-node-tuning-operator` and `sriov-network-operator`, in the path `cnf-tests/submodules`. To specify the desired commit of the external repositories, we expose the following environment variables: ``` -export METALLB_OPERATOR_TARGET_COMMIT?=main export SRIOV_NETWORK_OPERATOR_TARGET_COMMIT?=main export CLUSTER_NODE_TUNING_OPERATOR_TARGET_COMMIT?=main ``` @@ -40,7 +39,7 @@ We invoke the tests using the Ginkgo CLI tool. **SKIP_TESTS**: Translates to the ginkgo skip flag. **FEATURES** and **FOCUS_TESTS**: Translates to the ginkgo focus flag. **GINKGO_PARAMS**: Provide any additional valid ginkgo parameters. -**EXTERNAL_SUITES**: Specifies which external test suites to run; options include: (integration/metallb/nto/sriov/nto-performance) +**EXTERNAL_SUITES**: Specifies which external test suites to run; options include: (integration/nto/sriov/nto-performance) **TESTS_REPORTS_PATH**: Path where the test reports will be stored. **FAIL_FAST**: Set to "true" to enable the ginkgo `--fail-fast` flag. **TEST_SUITES**: : Set this if you want to focus on a specific suite; options are: (validationsuite/configsuite/cnftests) @@ -60,7 +59,7 @@ We invoke the tests using the Ginkgo CLI tool. - CLEAN_PERFORMANCE_PROFILE - disable performance profile cleanup for faster tests - PERFORMANCE_PROFILE_MANIFEST_OVERRIDE - performance profile manifest override - IPERF3_BITRATE_OVERRIDE - set a maximum bitrate for iperf3 to use in ovs_qos tests -- SKIP_LOCAL_RESOURCES - use default test resource of dependant test suites, using hardcoded defaults instead, needed to successfuly run the metallb e2e tests +- SKIP_LOCAL_RESOURCES - use default test resource of dependant test suites, using hardcoded defaults instead ## Test Reports @@ -72,12 +71,6 @@ The tests produce two kinds of outputs, which are stored in the directory specif ├── junit_cnftests.xml ├── junit_setup.xml ├── junit_validation.xml -├── metallb_failure_report.log -│   └── metallb_MetalLB_deploy_should_have_frr-k8s_pods_in_running_state -│   ├── crs.log -│   ├── nodes.log -│   ├── openshift-metallb-system-pods_logs.log -│   └── openshift-metallb-system-pods_specs.log ├── setup_junit.xml └── validation_junit.xml ``` @@ -88,7 +81,7 @@ A JUnit-compliant XML file is produced for each test suite: `junit_cnftests.xml` ### Test Failure Report -A report containing information about the cluster state (and resources) for troubleshooting is produced for each failed test. For example, if a test fails in the metallb suite, the logs are dumped into the following file: `metallb_failure_report.log`. +A report containing information about the cluster state (and resources) for troubleshooting is produced for each failed test. ## Gatekeeper diff --git a/cnf-tests/hack/init-git-submodules.sh b/cnf-tests/hack/init-git-submodules.sh index 1dc3cbe043..276a7b1a02 100755 --- a/cnf-tests/hack/init-git-submodules.sh +++ b/cnf-tests/hack/init-git-submodules.sh @@ -6,20 +6,14 @@ set -x set -e if [ -n "$TARGET_RELEASE" ]; then - METALLB_OPERATOR_TARGET_COMMIT="$TARGET_RELEASE" SRIOV_NETWORK_OPERATOR_TARGET_COMMIT="$TARGET_RELEASE" CLUSTER_NODE_TUNING_OPERATOR_TARGET_COMMIT="$TARGET_RELEASE" fi -echo "metallb-operator target commit: ${METALLB_OPERATOR_TARGET_COMMIT}" echo "sriov-operator target commit: ${SRIOV_NETWORK_OPERATOR_TARGET_COMMIT}" echo "cluster-node-tuning-operator target commit: ${CLUSTER_NODE_TUNING_OPERATOR_TARGET_COMMIT}" -cd submodules/metallb-operator/ -git fetch --all -git checkout origin/"${METALLB_OPERATOR_TARGET_COMMIT}" - -cd ../sriov-network-operator/ +cd submodules/sriov-network-operator/ git fetch --all git checkout origin/"${SRIOV_NETWORK_OPERATOR_TARGET_COMMIT}" diff --git a/cnf-tests/submodules/metallb-operator b/cnf-tests/submodules/metallb-operator deleted file mode 160000 index fa92126008..0000000000 --- a/cnf-tests/submodules/metallb-operator +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fa921260087a5605072e925deb38f42550d5ce42 diff --git a/cnf-tests/testsuites/pkg/namespaces/namespaces.go b/cnf-tests/testsuites/pkg/namespaces/namespaces.go index f5b3c22e51..bbd7889d58 100644 --- a/cnf-tests/testsuites/pkg/namespaces/namespaces.go +++ b/cnf-tests/testsuites/pkg/namespaces/namespaces.go @@ -36,9 +36,6 @@ var IntelOperator = "vran-acceleration-operators" // SpecialResourceOperator is the namespace where the SRO is installed var SpecialResourceOperator = "openshift-special-resource-operator" -// MetalLBOperator is the namespace where the MetalLB Operator is installed -var MetalLBOperator = "openshift-metallb-system" - // SroTestNamespace is the namespace where we run the oot driver builds as part of the sro testing var SroTestNamespace = "oot-driver" diff --git a/cnf-tests/testsuites/pkg/utils/reporter.go b/cnf-tests/testsuites/pkg/utils/reporter.go index 7af0726c06..efc5ce1f37 100644 --- a/cnf-tests/testsuites/pkg/utils/reporter.go +++ b/cnf-tests/testsuites/pkg/utils/reporter.go @@ -118,7 +118,6 @@ func NewReporter(reportPath string) (*k8sreporter.KubernetesReporter, error) { namespaces.SroTestNamespace: "sro", namespaces.SroTestNamespace: "sro", namespaces.BondTestNamespace: "bondcni", - namespaces.MetalLBOperator: "metallb", namespaces.TuningTest: "tuningcni", namespaces.Multus: "multus", } diff --git a/feature-configs/ci/metallb/kustomization.yaml b/feature-configs/ci/metallb/kustomization.yaml deleted file mode 100644 index d33aeddcf7..0000000000 --- a/feature-configs/ci/metallb/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -bases: - - ../../deploy/metallb - -patchesStrategicMerge: - - operator_subscription.yaml diff --git a/feature-configs/ci/metallb/operator_subscription.yaml b/feature-configs/ci/metallb/operator_subscription.yaml deleted file mode 100644 index 079bb63b67..0000000000 --- a/feature-configs/ci/metallb/operator_subscription.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: metallb-operator-sub - namespace: openshift-metallb-system -spec: - name: metallb-operator - channel: "alpha" - source: ci-index - sourceNamespace: openshift-marketplace diff --git a/feature-configs/deploy/metallb/kustomization.yaml b/feature-configs/deploy/metallb/kustomization.yaml deleted file mode 100644 index aa9998131f..0000000000 --- a/feature-configs/deploy/metallb/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - operator_namespace.yaml - - operator_operatorgroup.yaml - - operator_subscription.yaml diff --git a/feature-configs/deploy/metallb/operator_namespace.yaml b/feature-configs/deploy/metallb/operator_namespace.yaml deleted file mode 100644 index a8a29f7719..0000000000 --- a/feature-configs/deploy/metallb/operator_namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: openshift-metallb-system diff --git a/feature-configs/deploy/metallb/operator_operatorgroup.yaml b/feature-configs/deploy/metallb/operator_operatorgroup.yaml deleted file mode 100644 index 5241b6b713..0000000000 --- a/feature-configs/deploy/metallb/operator_operatorgroup.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: metallb-operator - namespace: openshift-metallb-system diff --git a/feature-configs/deploy/metallb/operator_subscription.yaml b/feature-configs/deploy/metallb/operator_subscription.yaml deleted file mode 100644 index 432d1bb2d8..0000000000 --- a/feature-configs/deploy/metallb/operator_subscription.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: metallb-operator-sub - namespace: openshift-metallb-system -spec: - name: metallb-operator - channel: "stable" - source: redhat-operators - sourceNamespace: openshift-marketplace diff --git a/feature-configs/hypershift-ci/metallb/kustomization.yaml b/feature-configs/hypershift-ci/metallb/kustomization.yaml deleted file mode 100644 index d33aeddcf7..0000000000 --- a/feature-configs/hypershift-ci/metallb/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -bases: - - ../../deploy/metallb - -patchesStrategicMerge: - - operator_subscription.yaml diff --git a/feature-configs/hypershift-ci/metallb/operator_subscription.yaml b/feature-configs/hypershift-ci/metallb/operator_subscription.yaml deleted file mode 100644 index 079bb63b67..0000000000 --- a/feature-configs/hypershift-ci/metallb/operator_subscription.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: metallb-operator-sub - namespace: openshift-metallb-system -spec: - name: metallb-operator - channel: "alpha" - source: ci-index - sourceNamespace: openshift-marketplace diff --git a/hack/common.sh b/hack/common.sh index 9a84f4e813..b2089417fd 100644 --- a/hack/common.sh +++ b/hack/common.sh @@ -20,10 +20,6 @@ export OPERATOR_VERSION="${OPERATOR_VERSION:-4.21}" export GATEKEEPER_VERSION="${GATEKEEPER_VERSION:-v0.2.0}" export SRO_VERSION="${SRO_VERSION:-4.11}" -# the metallb-operator deployment and test namespace -export OO_INSTALL_NAMESPACE="${OO_INSTALL_NAMESPACE:-openshift-metallb-system}" -export FRRK8S_EXTERNAL_NAMESPACE="${FRRK8S_EXTERNAL_NAMESPACE:-openshift-frr-k8s}" - export TESTS_REPORTS_PATH="${TESTS_REPORTS_PATH:-/logs/artifacts/}" export JUNIT_TO_HTML="${JUNIT_TO_HTML:-false}" @@ -38,9 +34,7 @@ export HYPERSHIFT_ENVIRONMENT="${HYPERSHIFT_ENVIRONMENT:-false}" declare -A TESTS_PATHS=\ (["configsuite nto"]="cnf-tests/submodules/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/0_config"\ ["validationsuite integration"]="cnf-tests/testsuites/validationsuite"\ - ["validationsuite metallb"]="cnf-tests/submodules/metallb-operator/test/e2e/validation"\ ["cnftests integration"]="cnf-tests/testsuites/e2esuite"\ - ["cnftests metallb"]="cnf-tests/submodules/metallb-operator/test/e2e/functional"\ ["cnftests sriov"]="cnf-tests/submodules/sriov-network-operator/test/conformance"\ ["cnftests nto-performance"]="cnf-tests/submodules/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/1_performance") export TESTS_PATHS diff --git a/hack/run-functests.sh b/hack/run-functests.sh index 703d28b806..0b845785ba 100755 --- a/hack/run-functests.sh +++ b/hack/run-functests.sh @@ -25,10 +25,6 @@ export IS_OPENSHIFT="${IS_OPENSHIFT:-true}" # https://github.com/k8snetworkplumbingwg/sriov-network-operator/pull/636 export MULTUS_NAMESPACE=openshift-multus -# The metallb tests cover both frr and frr-k8s, and we don't -# currently deploy frr-k8s mode -export BLACKLISTED_TESTS="frr-k8s" - # Map for the suites' junit report names declare -A JUNIT_REPORT_NAME=( ["configsuite"]="junit_setup.xml" ["cnftests"]="junit_cnftests.xml" ["validationsuite"]="junit_validation.xml") @@ -119,7 +115,7 @@ for step in "${steps[@]}"; do get_current_commit "$step" "$external_suite" echo "now testing $CURRENT_TEST" - EXEC_TESTS="ginkgo -tags=validationtests,e2etests $FAIL_FAST $SKIP --skip $BLACKLISTED_TESTS $FOCUS $GINKGO_PARAMS $REPORTERS $TEST_PATH -- -report=${TESTS_REPORTS_PATH}" + EXEC_TESTS="ginkgo -tags=validationtests,e2etests $FAIL_FAST $SKIP $FOCUS $GINKGO_PARAMS $REPORTERS $TEST_PATH -- -report=${TESTS_REPORTS_PATH}" if ! $EXEC_TESTS; then failed=true failures+=( "Tier 2 tests for $external_suite" ) diff --git a/hack/setup-build-index-image.sh b/hack/setup-build-index-image.sh index fe9991d7b1..87b8cee9fc 100755 --- a/hack/setup-build-index-image.sh +++ b/hack/setup-build-index-image.sh @@ -111,13 +111,6 @@ spec: cd ../../.. - git clone --single-branch --branch OPERATOR_RELEASES https://github.com/openshift/metallb-operator.git - cd metallb-operator - podman build -f bundleci.Dockerfile --tag image-registry.openshift-image-registry.svc:5000/openshift-marketplace/metallb-operator-bundle:latest . - podman push image-registry.openshift-image-registry.svc:5000/openshift-marketplace/metallb-operator-bundle:latest --tls-verify=false - cd .. - - git clone --single-branch --branch GATEKEEPER_VERSION https://github.com/open-cluster-management/gatekeeper-operator.git cd gatekeeper-operator podman build -f bundle.Dockerfile --tag image-registry.openshift-image-registry.svc:5000/openshift-marketplace/gatekeeper-operator-bundle:latest . @@ -135,7 +128,7 @@ spec: podman push image-registry.openshift-image-registry.svc:5000/openshift-marketplace/kubernetes-nmstate-operator-bundle:latest --tls-verify=false cd .. - ./opm index --skip-tls add --bundles image-registry.openshift-image-registry.svc:5000/openshift-marketplace/sriov-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/ptp-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/special-resource-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/cluster-nfd-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/metallb-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/gatekeeper-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/kubernetes-nmstate-operator-bundle:latest --tag image-registry.openshift-image-registry.svc:5000/openshift-marketplace/ci-index:latest -p podman --mode semver + ./opm index --skip-tls add --bundles image-registry.openshift-image-registry.svc:5000/openshift-marketplace/sriov-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/ptp-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/special-resource-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/cluster-nfd-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/gatekeeper-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/kubernetes-nmstate-operator-bundle:latest --tag image-registry.openshift-image-registry.svc:5000/openshift-marketplace/ci-index:latest -p podman --mode semver podman push image-registry.openshift-image-registry.svc:5000/openshift-marketplace/ci-index:latest --tls-verify=false securityContext: privileged: true