diff --git a/.gitignore b/.gitignore index cad6ccaa6..7439e3166 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ clouds.yaml _clouds_yaml metal3-dev/deployment-*.yaml assets/generated -metallb/frr/ # Conditionally created for appropriate environments assets/templates/99_master-chronyd-redhat.yaml diff --git a/06_create_cluster.sh b/06_create_cluster.sh index a1842b51a..886ad8967 100755 --- a/06_create_cluster.sh +++ b/06_create_cluster.sh @@ -69,20 +69,6 @@ if [[ ${NUM_EXTRA_WORKERS} -ne 0 && -d "${OCP_DIR}/extras" ]]; then oc create secret generic extraworkers-secret --from-file="${OCP_DIR}/extras/" -n openshift-machine-api fi -if [[ ! -z "${ENABLE_METALLB}" ]]; then - - if [[ -z ${METALLB_IMAGE_BASE} ]]; then - export METALLB_IMAGE_BASE=$(\ - jq -r .references.spec.tags[0].from.name ${OCP_DIR}/release_info.json | sed -e 's/@.*$//g') - export METALLB_IMAGE_TAG="metallb" - export FRR_IMAGE_TAG="metallb-frr" - fi - - pushd metallb - ./configure_metallb.sh - popd -fi - if [[ ! -z "${ENABLE_VIRTUAL_MEDIA_VIA_EXTERNAL_NETWORK}" ]]; then oc patch provisioning provisioning-configuration --type merge -p "{\"spec\":{\"virtualMediaViaExternalNetwork\":true}}" fi diff --git a/config_example.sh b/config_example.sh index 7dab4c59a..c5c7908e1 100755 --- a/config_example.sh +++ b/config_example.sh @@ -174,17 +174,6 @@ set -x # #export DISABLE_MULTICAST=false -# ENABLE_METALLB_MODE - -# Enable metallb -# Default is unset. -# Choices: "l2", "bgp" -# -#export ENABLE_METALLB_MODE="l2" -# -# metallb container location (optional) -#export METALLB_IMAGE_BASE= -#export METALLB_IMAGE_TAG= - ################################################################################ ## Network Settings ## diff --git a/metallb/Makefile b/metallb/Makefile deleted file mode 100644 index 389c94a93..000000000 --- a/metallb/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -.PHONY: config_l2 config_bgp start_frr stop_frr run_e2e - -all: - echo "make {config_bgp | config_l2}" - -config_metallb: - ./configure_metallb.sh - -run_e2e: - ./run_e2e.sh diff --git a/metallb/OWNERS b/metallb/OWNERS deleted file mode 100644 index 15e12fbf2..000000000 --- a/metallb/OWNERS +++ /dev/null @@ -1,7 +0,0 @@ -# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md - -approvers: - - fedepaol - - msherif1234 - - russellb - - s1061123 diff --git a/metallb/README.md b/metallb/README.md deleted file mode 100644 index d2132b0c6..000000000 --- a/metallb/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# MetalLB test env - -This scripts installs MetalLB into OCP, for test environment. - -## Prerequisites - -- Succeed to deploy OCP by dev-script -- IPv4 is enabled (Currently we targets IPv4. v4v6 case, we only support IPv4 for now) - -## Quickstart - -Make sure that OCP is deployed by dev-script - -To configure MetalLB - -``` -$ cd /metallb -$ make config_metallb -``` - -### Check MetalLB pod status - -``` -$ export KUBECONIFG=/ocp//auth/kubeconfig -$ oc get pod -n metallb-system -``` - -### Run E2E tests against development cluster - -The test suite will run the appropriate tests against the cluster. - -To run the E2E tests - -``` -$ cd /metallb -$ make run_e2e -``` diff --git a/metallb/configure_metallb.sh b/metallb/configure_metallb.sh deleted file mode 100755 index 1622d8b26..000000000 --- a/metallb/configure_metallb.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/bash - -metallb_dir="$(dirname $(readlink -f $0))" -source ${metallb_dir}/metallb_common.sh - -# configure metallb through metallb-operator -${metallb_dir}/deploy_operator.sh -oc apply -f ${metallb_dir}/metallb.yaml -oc adm policy add-scc-to-user privileged -n metallb-system -z speaker - -sudo ip route add 192.168.10.0/24 dev ${BAREMETAL_NETWORK_NAME} diff --git a/metallb/deploy_operator.sh b/metallb/deploy_operator.sh deleted file mode 100755 index 6402c6d9d..000000000 --- a/metallb/deploy_operator.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/bash - -metallb_dir="$(dirname $(readlink -f $0))" -source ${metallb_dir}/metallb_common.sh - -METALLB_OPERATOR_REPO=${METALLB_OPERATOR_REPO:-"https://github.com/metallb/metallb-operator.git"} -METALLB_OPERATOR_COMMIT=${METALLB_OPERATOR_COMMIT:-"4d52b86"} -METALLB_OPERATOR_IMAGE_TAG=${METALLB_OPERATOR_IMAGE_TAG:-"metallb-operator"} -export NAMESPACE=${NAMESPACE:-"metallb-system"} - -if [ ! -d ./metallb-operator ]; then - git clone ${METALLB_OPERATOR_REPO} - cd metallb-operator - git checkout ${METALLB_OPERATOR_COMMIT} - cd - -fi -cd metallb-operator - -# install yq v4 for metallb deployment -go install -mod='' github.com/mikefarah/yq/v4@v4.13.3 - -yq e --inplace '.spec.template.spec.containers[0].env[] |= select (.name=="SPEAKER_IMAGE").value|="'${METALLB_IMAGE_BASE}':'${METALLB_IMAGE_TAG}'"' ${metallb_dir}/metallb-operator-deploy/controller_manager_patch.yaml -yq e --inplace '.spec.template.spec.containers[0].env[] |= select (.name=="CONTROLLER_IMAGE").value|="'${METALLB_IMAGE_BASE}':'${METALLB_IMAGE_TAG}'"' ${metallb_dir}/metallb-operator-deploy/controller_manager_patch.yaml -yq e --inplace '.spec.template.spec.containers[0].env[] |= select (.name=="FRR_IMAGE").value|="'${METALLB_IMAGE_BASE}':'${FRR_IMAGE_TAG}'"' ${metallb_dir}/metallb-operator-deploy/controller_manager_patch.yaml - -PATH="${GOPATH}:${PATH}" ENABLE_OPERATOR_WEBHOOK=true KUSTOMIZE_DEPLOY_DIR="../metallb-operator-deploy" IMG="${METALLB_IMAGE_BASE}:${METALLB_OPERATOR_IMAGE_TAG}" make deploy diff --git a/metallb/metallb-operator-deploy/controller_manager_patch.yaml b/metallb/metallb-operator-deploy/controller_manager_patch.yaml deleted file mode 100644 index a56f50f9d..000000000 --- a/metallb/metallb-operator-deploy/controller_manager_patch.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system -spec: - template: - spec: - containers: - - name: manager - env: - - name: SPEAKER_IMAGE - value: "quay.io/metallb/speaker:main" - - name: CONTROLLER_IMAGE - value: "quay.io/metallb/controller:main" - - name: METALLB_BGP_TYPE - value: "frr" - - name: FRR_IMAGE - value: "quay.io/frrouting/frr:stable_7.5" diff --git a/metallb/metallb-operator-deploy/kustomization.yaml b/metallb/metallb-operator-deploy/kustomization.yaml deleted file mode 100644 index 964ed38df..000000000 --- a/metallb/metallb-operator-deploy/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: -- ../metallb-operator/config/webhook-on-openshift - -patchesStrategicMerge: -- controller_manager_patch.yaml diff --git a/metallb/metallb.yaml b/metallb/metallb.yaml deleted file mode 100644 index 3f83d73c7..000000000 --- a/metallb/metallb.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -apiVersion: metallb.io/v1beta1 -kind: MetalLB -metadata: - name: metallb - namespace: metallb-system diff --git a/metallb/metallb_common.sh b/metallb/metallb_common.sh deleted file mode 100644 index 6a6d942a9..000000000 --- a/metallb/metallb_common.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/bash - -METALLB_IMAGE_BASE=${METALLB_IMAGE_BASE:-"quay.io/metallb"} -METALLB_IMAGE_TAG=${METALLB_IMAGE_TAG:-"main"} - -metallb_dir="$(dirname $(readlink -f $0))" -source ${metallb_dir}/../common.sh -source ${metallb_dir}/../network.sh diff --git a/metallb/run_e2e.sh b/metallb/run_e2e.sh deleted file mode 100755 index 4cd1d8eba..000000000 --- a/metallb/run_e2e.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/bash - -metallb_dir="$(dirname $(readlink -f $0))" -source ${metallb_dir}/metallb_common.sh - -export METALLB_REPO=${METALLB_REPO:-https://github.com/metallb/metallb.git} -METALLB_BRANCH=${METALLB_BRANCH:-"main"} -[[ -d /usr/local/go ]] && export PATH=${PATH}:/usr/local/go/bin - -if [ ! -d ./metallb ]; then - git clone $METALLB_REPO - cd metallb - git checkout "${METALLB_BRANCH}" - cd - -fi -cd metallb - -# add firewalld rules -sudo firewall-cmd --zone=libvirt --permanent --add-port=179/tcp -sudo firewall-cmd --zone=libvirt --add-port=179/tcp -sudo firewall-cmd --zone=libvirt --permanent --add-port=180/tcp -sudo firewall-cmd --zone=libvirt --add-port=180/tcp -# BFD control packets -sudo firewall-cmd --zone=libvirt --permanent --add-port=3784/udp -sudo firewall-cmd --zone=libvirt --add-port=3784/udp -# BFD echo packets -sudo firewall-cmd --zone=libvirt --permanent --add-port=3785/udp -sudo firewall-cmd --zone=libvirt --add-port=3785/udp -# BFD multihop packets -sudo firewall-cmd --zone=libvirt --permanent --add-port=4784/udp -sudo firewall-cmd --zone=libvirt --add-port=4784/udp - -# need to skip L2 metrics test because the pod that's running the tests is not in the -# same subnet of the cluster nodes, so the arp request that's done in the test won't work. -SKIP="\"L2 metrics\"" -if [ "${IP_STACK}" = "v4" ]; then - SKIP="$SKIP\|IPV6\|DUALSTACK" - export PROVISIONING_HOST_EXTERNAL_IPV4=${PROVISIONING_HOST_EXTERNAL_IP} - export PROVISIONING_HOST_EXTERNAL_IPV6=1111:1:1::1 -elif [ "${IP_STACK}" = "v6" ]; then - SKIP="$SKIP\|IPV4\|DUALSTACK" - export PROVISIONING_HOST_EXTERNAL_IPV6=${PROVISIONING_HOST_EXTERNAL_IP} - export PROVISIONING_HOST_EXTERNAL_IPV4=1.1.1.1 -elif [ "${IP_STACK}" = "v4v6" ]; then - SKIP="$SKIP\|IPV6" - export PROVISIONING_HOST_EXTERNAL_IPV4=${PROVISIONING_HOST_EXTERNAL_IP} - export PROVISIONING_HOST_EXTERNAL_IPV6=1111:1:1::1 -fi -echo "Skipping ${SKIP}" - -pip3 install --user -r ./dev-env/requirements.txt -export PATH=${PATH}:${HOME}/.local/bin -export CONTAINER_RUNTIME=podman -export RUN_FRR_CONTAINER_ON_HOST_NETWORK=true -inv e2etest --kubeconfig=$(readlink -f ../../ocp/ostest/auth/kubeconfig) \ - --service-pod-port=8080 --system-namespaces="metallb-system" --skip-docker \ - --ipv4-service-range=192.168.10.0/24 --ipv6-service-range=fc00:f853:0ccd:e799::/124 \ - --skip="${SKIP}" --use-operator