From 6205cd37024e611d8dfe85ea32716b5106ec0bba Mon Sep 17 00:00:00 2001 From: Joakim Ahrlin Date: Thu, 23 Dec 2021 09:54:08 +0100 Subject: [PATCH] build images with host architecture Signed-off-by: Joakim Ahrlin --- devel/addon/certmanager/install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/devel/addon/certmanager/install.sh b/devel/addon/certmanager/install.sh index 54ad8e41d..56c4834d0 100755 --- a/devel/addon/certmanager/install.sh +++ b/devel/addon/certmanager/install.sh @@ -38,7 +38,13 @@ check_tool helm # triggered on every call to this script. export APP_VERSION="$(date +"%s")" # Build a copy of the cert-manager release images using the :bazel image tag -bazel run --stamp=true --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 "//devel/addon/certmanager:bundle" + +ARCH="$(uname -m)" +if [ "$ARCH" == "arm64" ] ; then + bazel run --stamp=true --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64 "//devel/addon/certmanager:bundle" +else + bazel run --stamp=true --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 "//devel/addon/certmanager:bundle" +fi # Load all images into the cluster load_image "quay.io/jetstack/cert-manager-controller:${APP_VERSION}" &