Skip to content

Feat: support arm64 architecture in development tooling#4545

Merged
markmandel merged 4 commits intoagones-dev:mainfrom
nicknikolakakis:feat/4533-arm64-dev-tooling
May 8, 2026
Merged

Feat: support arm64 architecture in development tooling#4545
markmandel merged 4 commits intoagones-dev:mainfrom
nicknikolakakis:feat/4533-arm64-dev-tooling

Conversation

@nicknikolakakis
Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind feature

What this PR does / Why we need it:

Makes the development tooling containers natively runnable on ARM64 (Apple Silicon, Ampere, AWS Graviton). Previously, ARM hosts were forced to run the build container under x86_64 emulation due to:

  • Hardcoded linux-amd64 / x86_64-unknown-linux-gnu download URLs in 6 Dockerfiles (build-image, e2e-image, and the go/restapi/rust SDK images).
  • A --platform linux/x86_64 forcing block in build/Makefile that activated whenever uname -p returned arm.
  • A CGO/linker issue in the golangci-lint install: Go on linux/arm64 forces -fuse-ld=gold, but binutils-gold was deprecated and isn't installed in debian:trixie. amd64 doesn't hit this because Go doesn't add the gold flag there.

Changes:

  1. Replace hardcoded download URLs with arch-detected versions using dpkg --print-architecture in all 6 Dockerfiles. The rust SDK image maps that to rustup's aarch64-unknown-linux-gnu / x86_64-unknown-linux-gnu triple via a small case statement. Hugo switches from the legacy Linux-64bit archive to the consistent linux-${ARCH} naming (the modern naming is published for both arches).

  2. Replace the global --platform linux/x86_64 forcing on ARM hosts with explicit --platform linux/amd64 on each amd64 production image build target (controller, extensions, sdk-server, ping, allocator, processor, and their debug variants). This mirrors the existing explicit --platform linux/arm64 for arm64 builds. Net effect: dev tooling builds and runs native on whatever host arch is present, while production amd64 images continue to be built correctly on any host (including ARM).

  3. Add CGO_ENABLED=0 to the golangci-lint install. Upstream's official golangci-lint binaries are built without CGO, so this matches their distribution model and avoids a runtime dependency on the deprecated gold linker.

Which issue(s) this PR fixes:

Closes #4533

Special notes for your reviewer:

  • Tested the full build-build-image natively on Apple Silicon (linux/arm64). Confirmed aarch64 runtime, go version go1.26.0 linux/arm64, kubectl 1.34.6, helm 3.18.4, hugo 0.152.2 extended linux/arm64, htmltest 0.17.0, terraform 1.5.4, golangci-lint 1.64.8, gotestsum 1.13.0, and gcloud SDK all work natively inside the resulting container.
  • Same Dockerfile builds via docker build --platform linux/amd64 (verified the URL patterns, the CGO_ENABLED=0 install).
  • Production amd64 image builds (controller, extensions, sdk-server, ping, allocator, processor) gained an explicit --platform linux/amd64, so they continue to produce correct amd64-tagged images on any host. On amd64 hosts (Google Cloud Build), behavior is unchanged.
  • The e2e-image base (gcr.io/cloud-builders/gcloud) is amd64-only at the manifest level, so it still runs under emulation on ARM64 hosts. The Dockerfile change for it is forward-compatible: when the gcloud base ships arm64 in the future, the URLs will resolve to the right binaries automatically.
  • I did not add binutils-gold to the apt install line because it's deprecated in debian:trixie; using CGO_ENABLED=0 is the upstream-recommended path for golangci-lint and works on every arch.

Replace hardcoded linux-amd64 / x86_64 download URLs in
build/build-image, build/e2e-image, and the go/restapi/rust SDK
images with arch-detected versions using dpkg --print-architecture.
For rustup-init, map dpkg arch to rustup's triple (amd64 ->
x86_64-unknown-linux-gnu, arm64 -> aarch64-unknown-linux-gnu).
Switch Hugo from the legacy Linux-64bit archive to the consistent
linux-${ARCH} naming.

Disable CGO when installing golangci-lint so the build no longer
depends on the gold linker, which is deprecated and not installed
in debian:trixie. Upstream golangci-lint binaries are also built
without CGO.

Replace the global --platform linux/x86_64 forcing on ARM hosts
with an explicit --platform linux/amd64 on each amd64 production
image build target (controller, extensions, sdk-server, ping,
allocator, processor, and their debug variants), mirroring the
existing explicit --platform linux/arm64 used for arm64 builds.
This lets the build-image and other dev tooling run natively on
Apple Silicon, Ampere, and AWS Graviton hosts.

Closes agones-dev#4533

Signed-off-by: Nick Nikolakakis <nonicked@protonmail.com>
@github-actions github-actions Bot added kind/feature New features for Agones size/S and removed kind/feature New features for Agones labels May 1, 2026
@markmandel
Copy link
Copy Markdown
Member

Let's go!

/gcbrun

@github-actions github-actions Bot added the kind/feature New features for Agones label May 7, 2026
@markmandel
Copy link
Copy Markdown
Member

/gcbrun

... does it have to be the first line?

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 188204fc-e716-4a2e-b3b5-9df44d5c9431

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4545/head:pr_4545 && git checkout pr_4545
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.58.0-dev-a312f25

Copy link
Copy Markdown
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for doing that!

@markmandel markmandel enabled auto-merge (squash) May 8, 2026 15:55
@markmandel
Copy link
Copy Markdown
Member

/gcbrun

@markmandel
Copy link
Copy Markdown
Member

/gcbrun

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 4319cecf-3b99-4784-8c1a-de8d91449f83

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4545/head:pr_4545 && git checkout pr_4545
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.58.0-dev-15dc74e

@markmandel markmandel merged commit 0a0f2d5 into agones-dev:main May 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature New features for Agones size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support ARM (arm64) architecture in development tooling

3 participants