Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openshift-metal3/dev-scripts
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f0ae110fdda9e82a675aee2173788df4ea6fc759
Choose a base ref
..
head repository: openshift-metal3/dev-scripts
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 262a631375a294e92329dac8c370ebfb00b7833d
Choose a head ref
Showing with 9 additions and 10 deletions.
  1. +7 −0 01_install_requirements.sh
  2. +2 −10 metallb/deploy_operator.sh
7 changes: 7 additions & 0 deletions 01_install_requirements.sh
Original file line number Diff line number Diff line change
@@ -35,6 +35,13 @@ sudo dnf -y upgrade
source /etc/os-release
export DISTRO="${ID}${VERSION_ID%.*}"
if [[ $DISTRO == "centos8" ]]; then
if [ "$NAME" != "CentOS Stream" -a ! -e /etc/yum.repos.d/centos-vault.repo ] ; then
# Centos8 is EOL
mv /etc/yum.repos.d /etc/yum.repos.d_$(date +%s)
mkdir /etc/yum.repos.d
echo -e '[base]\nname=base\nbaseurl=https://vault.centos.org/8.4.2105/BaseOS/x86_64/os/\ngpgcheck=0\nenabled=1\n[apps]\nname=apps\nbaseurl=https://vault.centos.org/8.4.2105/AppStream/x86_64/os/\ngpgcheck=0\nenabled=1\n[extras]\nname=extras\nbaseurl=https://vault.centos.org/8.4.2105/extras/x86_64/os/\ngpgcheck=0\nenabled=1' > /etc/yum.repos.d/centos-vault.repo
fi

sudo dnf -y install epel-release dnf --enablerepo=extras
elif [[ $DISTRO == "rhel8" ]]; then
# Enable EPEL for python3-passlib and python3-bcrypt required by metal3-dev-env
12 changes: 2 additions & 10 deletions metallb/deploy_operator.sh
Original file line number Diff line number Diff line change
@@ -5,12 +5,7 @@ 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"}
LOCAL_REGISTRY_DNS_NAME=${LOCAL_REGISTRY_DNS_NAME:-"virthost.ostest.test.metalkube.org"}
LOCAL_REGISTRY_PORT=${LOCAL_REGISTRY_PORT:-"5000"}
OPERATOR_IMAGE=${OPERATOR_IMAGE:-"${LOCAL_REGISTRY_DNS_NAME}:${LOCAL_REGISTRY_PORT}/metallb-operator:ci"}
METALLB_OPERATOR_DOCKER_FILE=${METALLB_OPERATOR_DOCKER_FILE:-"Dockerfile"}
PERSONAL_PULL_SECRET=${PERSONAL_PULL_SECRET:-"/root/dev-scripts/pull_secret.json"}
PULL_SECRET_FILE=${PULL_SECRET_FILE:-"/opt/dev-scripts/pull_secret.json"}
METALLB_OPERATOR_IMAGE_TAG=${METALLB_OPERATOR_IMAGE_TAG:-"metallb-operator"}
export NAMESPACE=${NAMESPACE:-"metallb-system"}

if [ ! -d ./metallb-operator ]; then
@@ -21,14 +16,11 @@ if [ ! -d ./metallb-operator ]; then
fi
cd metallb-operator

podman build . -f ${METALLB_OPERATOR_DOCKER_FILE} -t ${OPERATOR_IMAGE} --authfile ${PERSONAL_PULL_SECRET}
podman push ${OPERATOR_IMAGE} --tls-verify=false --authfile ${PULL_SECRET_FILE}

# 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=${OPERATOR_IMAGE} make deploy
PATH="${GOPATH}:${PATH}" ENABLE_OPERATOR_WEBHOOK=true KUSTOMIZE_DEPLOY_DIR="../metallb-operator-deploy" IMG="${METALLB_IMAGE_BASE}:${METALLB_OPERATOR_IMAGE_TAG}" make deploy