Skip to content

build: configurable-arch controller manager image (unify arm64 + ppc64le) - #623

Open
yansun1996 wants to merge 3 commits into
ROCm:mainfrom
yansun1996:multiarch-controller-manager
Open

build: configurable-arch controller manager image (unify arm64 + ppc64le)#623
yansun1996 wants to merge 3 commits into
ROCm:mainfrom
yansun1996:multiarch-controller-manager

Conversation

@yansun1996

@yansun1996 yansun1996 commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

Reconciles the two open multi-arch PRs into a single, configurable build for the controller manager image, driven by one architecture variable (ARCH, default amd64).

This branch:

  1. Cherry-picks the arm64 work from arm64 controller #549 (authorship preserved).
  2. Cherry-picks the ppc64le work from Build AMD GPU operator images for ppc64le #565 (authorship preserved), resolving the overlapping Dockerfile / Makefile / internal/utils_container/Dockerfile conflicts in favor of the ppc64le cross-compile approach.
  3. Unifies both into a single cross-compiled manager binary selected by one ENV.

Supersedes / consolidates:

What changed

  • Single configurable arch: Dockerfile cross-compiles one manager binary via GOOS=${TARGETOS} GOARCH=${TARGETARCH} and copies the single ${TARGET}. TARGETARCH/TARGETOS default to amd64/linux, so a plain docker build (no build-args) yields an amd64 image.
  • Makefile: manager builds one binary honoring GOOS/GOARCH; docker-build takes ARCH ?= amd64 and passes it through as --build-arg TARGETARCH=$(ARCH) (+ --platform linux/$(ARCH)). A separate docker-build-multiarch retains the buildx --push multi-platform manifest path (PLATFORMS ?= linux/amd64,linux/arm64,linux/ppc64le).
  • Docs: new developer-guide section covering single-arch builds, arm64/ppc64le examples, the QEMU binfmt prerequisite for cross-arch runtime stages, and the multi-arch target.

Test plan

Verified end-to-end with real docker builds, inspecting the ELF e_machine of /usr/local/bin/manager inside each image:

Command manager arch Result
make docker-build (default) 3e 00 = x86-64 amd64 ✅
make docker-build ARCH=arm64 b7 00 = aarch64 arm64 ✅
  • Default build produces an amd64 manager binary with no extra flags
  • ARCH=arm64 produces an aarch64 manager binary
  • manager cross-compiles for amd64 / arm64 / ppc64le (go build)
  • Makefile arg expansion dry-run correct for default and overridden ARCH
  • docs spellcheck passes (pyspelling)
  • ppc64le image build on a host with QEMU binfmt registered (cross-arch runtime stage requires docker run --privileged --rm tonistiigi/binfmt --install)

🤖 Generated with Claude Code

cyanidium and others added 2 commits August 4, 2026 21:41
Builds the controller/manager container for both amd64 and arm64, in a
single multi-platform image. This allows control plane nodes running
arm64/aarch64 CPUs to be able to manage clusters with AMD GPUs.

Not changes:
- Build host still has to be amd64/x86_64
- GPU node still has to be amd64/x86_64
- e2e still only tests amd64/x86_64

Benefits:
- Heterogeneous/multi-arch clusters do not need dedicated amd64/x86_64
  control plane nodes just to control AMD GPU scheduling.

Resolves ROCm#331
Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
@yansun1996
yansun1996 force-pushed the multiarch-controller-manager branch 5 times, most recently from 90156f6 to 3fd286f Compare August 4, 2026 22:41
…gurable

Unify the arm64 (ROCm#549) and ppc64le (ROCm#565) multi-arch work into a single
configurable build for both the controller manager and utils container
images.

docker-build and docker-build-utils run `$(CONTAINER_ENGINE) buildx build
--platform "$(PLATFORM)"`, defaulting to PLATFORM=linux/amd64. A
single-platform build auto-loads into the local image store. Set PLATFORM to
a single platform (linux/arm64) or a comma-separated list; a multi-platform
list must be pushed via a direct `buildx --push`. Works with docker buildx
and podman 4.0+.

buildx auto-populates TARGETOS/TARGETARCH per platform, driving the Go
cross-compile, the kubectl download, and the utils container's oc/kubectl
client download. Dockerfile.build gains qemu-user-static + libc6-arm64-cross
for cross-arch runtime stages.

bundle build is left as upstream (amd64). Adds a developer-guide section.

Co-Authored-By: Claude <noreply@anthropic.com>
@yansun1996
yansun1996 force-pushed the multiarch-controller-manager branch from 3fd286f to d6bd900 Compare August 4, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants