woehrl01/pod-pacemaker

[Feature Request] Support for linux/arm64/v8

Closed this issue · 2 comments

Good day,

I am currently experimenting with AWS Graviton based instances (arm64) and would like to run pod-pacemaker on those instances.

Have you thought about ARM64 support yet?

As for me I am working on images for arm64/v8 and amd64 with a modified version of the Makefile in this repository with docker buildx:

diff --git a/Makefile b/Makefile
index 0be518d..04a36aa 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION ?= v0.0.1
 IMAGE_BUILDER ?= docker
-IMAGE_BUILD_CMD ?= build
+IMAGE_BUILD_CMD ?= buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64
 IMAGE_NAME ?= woehrl01/pod-pacemaker
 
 export IMG = $(REGISTRY)/$(IMAGE_NAME):$(VERSION)
@@ -33,7 +33,7 @@ docker-build:
        $(IMAGE_BUILDER) $(IMAGE_BUILD_CMD) -t $(IMG) .
 
 docker-push:
-       $(IMAGE_BUILDER) push $(IMG)
+       $(IMAGE_BUILDER) $(IMAGE_BUILD_CMD) -t $(IMG) --push
 
 helm-render:
        helm template charts/pod-pacemaker --set image.repository=$(REGISTRY)/$(IMAGE_NAME) --set image.tag=$(VERSION)

However it looks like buildx does not support separate steps to build and push an image (docker/buildx#1152) . As far as I can see at the moment you (https://github.com/woehrl01/pod-pacemaker/blob/main/.github/workflows/build.yml#L50)

  1. build the image (amd64) first
  2. load it into kind and run it for integration testing
  3. deploy the tested image to ghcr.io

I will check if this is also possible with buildx and create a PR to suggest the required changes.

Thanks and best regards,
Florian.

@fbuchmeier-abi thank you for this idea and we should definitely provide that. Doing a multi arch is definitely possible. I have to do a quick lookup in one of my other projects where I have done it already.

Sounds good, thanks! I've created a draft that works for me locally (on linux): #65

I have yet to test this in a Github Runner. I've documented the features and shortcomings in the PR. Let me know what you think.

Best regards,
Florian.