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

Multiarch Images that include arm64

Open DWSR opened this issue 2 years ago • 4 comments

CRDB supports arm64 (among other archs) so the operator should as well. This is relevant to anyone running e.g. Graviton (AWS), Tau (GCP) or Ampere (OCI) instances.

DWSR avatar Dec 11 '22 18:12 DWSR

I have also just run into this issue. arm64 is becoming very common.

djh00t avatar May 10 '23 06:05 djh00t

Support for ARM64 is critical for our workloads as the CPU architecture represents a 40% cost per transaction savings. Is there any contribution I can assist with to progress this effort?

mprimeaux avatar Aug 31 '23 12:08 mprimeaux

I don't know bazel enough to make a PR but if you want to get an arm64 build out of the repo you can do:

GOOS=linux GOARCH=arm64 go build -o cockroach-operator -v cmd/cockroach-operator/*.go

At any particular commit.

That gave me:

cockroach-operator: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=NiSUAYgI0rbcdPA7PYjc/UFkJjm-xuVoYR4fPsmMj/uMfJt6MBxBsHXmbnuZ9r/oydO3GqKyb2LA7yOqW9U, with debug_info, not stripped

Then you can copy the binary into a docker container.

jrcichra avatar Feb 06 '24 00:02 jrcichra

Obviously not official nor supported but I set up a mutli-arch build pipeline for cockroach-operator using those principles: https://github.com/jrcichra/cockroach-operator-multiarch

https://github.com/jrcichra/cockroach-operator-multiarch/pkgs/container/cockroach-operator

It's working on my oracle cloud k8s cluster.

jrcichra avatar Feb 06 '24 00:02 jrcichra