From c7acb2a1e7d7cc3cb4e3d3540e2c4c14a3810eab Mon Sep 17 00:00:00 2001 From: Michal Date: Wed, 8 Jul 2026 11:00:06 +0100 Subject: [PATCH] add Makefile: multi-arch build-push (amd64+arm64) for the mixed k8s cluster The single-arch image crashed with 'exec format error' on arm64 nodes. This codifies the podman multi-arch manifest build so future pushes stay multi-arch. --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7744c08 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +IMAGE := edenic-exporter +REGISTRY := mysources.co.uk +REGISTRY_IMAGE := $(REGISTRY)/michal/$(IMAGE) +# The k8s cluster is mixed amd64+arm64 — the registry image MUST be a multi-arch +# manifest list, or pods on the "other" arch crash with `exec format error`. +PLATFORMS := linux/amd64,linux/arm64 +MANIFEST := edenic-exporter-mm + +.PHONY: build-push +# Log in once first (GITEA_TOKEN): +# echo "$$GITEA_TOKEN" | podman login mysources.co.uk -u michal --password-stdin +build-push: + -podman manifest rm $(MANIFEST) 2>/dev/null + podman build --platform $(PLATFORMS) --manifest $(MANIFEST) . + podman manifest push --all $(MANIFEST) docker://$(REGISTRY_IMAGE):latest + podman manifest inspect docker://$(REGISTRY_IMAGE):latest | grep architecture