pravega / zookeeper-operator

Kubernetes Operator for Zookeeper
Apache License 2.0
366 stars 202 forks source link

Support ARM64 #320

Open alittlec opened 3 years ago

alittlec commented 3 years ago

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
anishakj commented 3 years ago

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

mmoscher commented 1 year ago

@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

patrickdung commented 1 year ago

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.