Upgrade to MetalLB v0.13.3
No problems whatsoever by automatically applying the MetalLB Helm chart on both architectures - arm64 and amd64 - with the Flux V2 GitOps approach.
metallb-chart-0.13.2
Version 0.13.2
metallb-chart-0.13.3
Version 0.13.3
Importing Docker container images for arm64 and amd64 architecture into private Sonatype Nexus registry by means of Docker fat-manifest.
docker image pull --platform linux/amd64 quay.io/metallb/controller:v0.13.3
docker inspect quay.io/metallb/controller:v0.13.3
docker tag quay.io/metallb/controller:v0.13.3 registry.bierochs.org/metallb/controller:v0.13.3-amd64
docker push registry.bierochs.org/metallb/controller:v0.13.3-amd64
docker image pull --platform linux/arm64 quay.io/metallb/controller:v0.13.3
docker inspect quay.io/metallb/controller:v0.13.3
docker tag quay.io/metallb/controller:v0.13.3 registry.bierochs.org/metallb/controller:v0.13.3-arm64
docker push registry.bierochs.org/metallb/controller:v0.13.3-arm64
docker manifest create registry.bierochs.org/metallb/controller:v0.13.3 --amend registry.bierochs.org/metallb/controller:v0.13.3-amd64 --amend registry.bierochs.org/metallb/controller:v0.13.3-arm64
docker manifest push registry.bierochs.org/metallb/controller:v0.13.3
To automate this procedure the following shell script is implemented:
#!/bin/bash
while [ "$#" -gt 0 ]; do
case "$1" in
-r) SRC_DCKR_RGT="$2"; shift 2;;
-i) SRC_DCKR_IMG="$2"; shift 2;;
-t) SRC_DCKR_TG="$2"; shift 2;;
--registry=*) SRC_DCKR_RGT="${1#*=}"; shift 1;;
--image=*) SRC_DCKR_IMG="${1#*=}"; shift 1;;
--tag=*) SRC_DCKR_TG="${1#*=}"; shift 1;;
--registry|--image|--tag) echo "$1 requires an argument" >&2; exit 1;;
-*) echo "unknown option: $1" >&2; exit 1;;
*) handle_argument "$1"; shift 1;;
esac
done
echo "registry: $SRC_DCKR_RGT"
echo "image: $SRC_DCKR_IMG"
echo "tag: $SRC_DCKR_TG"
export ARCH_DCKR=('amd64' 'arm64')
for ARCH in "${ARCH_DCKR[@]}"
do
docker pull --platform linux/"$ARCH" $SRC_DCKR_RGT/$SRC_DCKR_IMG:$SRC_DCKR_TG
docker tag $SRC_DCKR_RGT/$SRC_DCKR_IMG:$SRC_DCKR_TG registry.bierochs.org/$SRC_DCKR_IMG:$SRC_DCKR_TG-"$ARCH"
docker push registry.bierochs.org/$SRC_DCKR_IMG:$SRC_DCKR_TG-"$ARCH"
done
docker manifest create registry.bierochs.org/$SRC_DCKR_IMG:$SRC_DCKR_TG \
--amend registry.bierochs.org/$SRC_DCKR_IMG:$SRC_DCKR_TG-amd64 \
--amend registry.bierochs.org/$SRC_DCKR_IMG:$SRC_DCKR_TG-arm64
docker manifest push registry.bierochs.org/$SRC_DCKR_IMG:$SRC_DCKR_TG
Which should be used like this:
multi_arch_docker_to_nexus.sh \
-r quay.io \
-i metallb/speaker \
-t v0.13.3