zookeeper-operator
zookeeper-operator copied to clipboard
Support ARM64
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 would you like to raise a PR for the changes?
@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
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.