zookeeper-operator icon indicating copy to clipboard operation
zookeeper-operator copied to clipboard

Support ARM64

Open alittlec opened this issue 3 years ago • 3 comments

Description

Create a multi-arch image that supports arm64. (at present only amd64 supported)

Importance

It is possible to rebuild from source, but this is fragile and takes time, you also need to know the arch. upfront when deploying.

Location

https://github.com/pravega/zookeeper-operator

Suggestions for an improvement

Add a couple of additional entries to the build-go section:

CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build \
	-ldflags "-X github.com/$(REPO)/pkg/version.Version=$(VERSION) -X github.com/$(REPO)/pkg/version.GitSHA=$(GIT_SHA)" \
	-o bin/$(PROJECT_NAME)-linux-arm64 cmd/manager/main.go
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build \
	-ldflags "-X github.com/$(REPO)/pkg/version.Version=$(VERSION) -X github.com/$(REPO)/pkg/version.GitSHA=$(GIT_SHA)" \
	-o bin/$(EXPORTER_NAME)-linux-arm64 cmd/exporter/main.go

alittlec avatar Apr 20 '21 13:04 alittlec

@alittlec would you like to raise a PR for the changes?

anishakj avatar Jun 09 '21 11:06 anishakj

@alittlec + @anishakj PR is raised, however I'm not sure if this will work at all because the available GHA CI pipeline is not used at all (IMHO). Cf. https://github.com/pravega/zookeeper-operator/pull/504

mmoscher avatar Oct 12 '22 21:10 mmoscher

Hello,

Since I do not want to use Docker Hub. I have a different approach using GHA and docker image is saved to GHCR: https://github.com/pravega/zookeeper-operator/compare/master...patrickdung:pravega-zookeeper-operator:master?diff=unified

Note I disabled the E2E test because it would took about 1 hour to finish. Not submitting PR because the changes are only suitable for my needs. Feel free to adopt any changes.

patrickdung avatar Mar 19 '23 10:03 patrickdung