Feat: support arm64 architecture in development tooling#4545
Merged
markmandel merged 4 commits intoagones-dev:mainfrom May 8, 2026
Merged
Feat: support arm64 architecture in development tooling#4545markmandel merged 4 commits intoagones-dev:mainfrom
markmandel merged 4 commits intoagones-dev:mainfrom
Conversation
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>
Member
|
Let's go! /gcbrun |
Member
|
/gcbrun ... does it have to be the first line? |
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: |
markmandel
approved these changes
May 8, 2026
Member
markmandel
left a comment
There was a problem hiding this comment.
Looks good! Thanks for doing that!
Member
|
/gcbrun |
Member
|
/gcbrun |
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
linux-amd64/x86_64-unknown-linux-gnudownload URLs in 6 Dockerfiles (build-image, e2e-image, and the go/restapi/rust SDK images).--platform linux/x86_64forcing block inbuild/Makefilethat activated wheneveruname -preturnedarm.golangci-lintinstall: Go on linux/arm64 forces-fuse-ld=gold, butbinutils-goldwas deprecated and isn't installed indebian:trixie. amd64 doesn't hit this because Go doesn't add the gold flag there.Changes:
Replace hardcoded download URLs with arch-detected versions using
dpkg --print-architecturein all 6 Dockerfiles. The rust SDK image maps that to rustup'saarch64-unknown-linux-gnu/x86_64-unknown-linux-gnutriple via a smallcasestatement. Hugo switches from the legacyLinux-64bitarchive to the consistentlinux-${ARCH}naming (the modern naming is published for both arches).Replace the global
--platform linux/x86_64forcing on ARM hosts with explicit--platform linux/amd64on each amd64 production image build target (controller, extensions, sdk-server, ping, allocator, processor, and their debug variants). This mirrors the existing explicit--platform linux/arm64for 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).Add
CGO_ENABLED=0to thegolangci-lintinstall. 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:
build-build-imagenatively on Apple Silicon (linux/arm64). Confirmedaarch64runtime,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, andgcloud SDKall work natively inside the resulting container.docker build --platform linux/amd64(verified the URL patterns, the CGO_ENABLED=0 install).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.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.binutils-goldto the apt install line because it's deprecated indebian:trixie; usingCGO_ENABLED=0is the upstream-recommended path for golangci-lint and works on every arch.