docs(development): describe the multi-arch default of make image - #711
Open
Aleksei Sviridkin (lexfrei) wants to merge 1 commit into
Open
Aleksei Sviridkin (lexfrei) wants to merge 1 commit into
Aleksei Sviridkin (lexfrei) wants to merge 1 commit into
Conversation
cozystack now builds package images for linux/amd64 and linux/arm64 unless PLATFORM is set, which needs a builder that supports both. LOAD=1 builds for the host only, and talos and testing always build amd64. The development page showed a two-platform builder without saying why it is needed or how to build a single architecture. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>
✅ Deploy Preview for cozystack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
12 tasks
Aleksei Sviridkin (lexfrei)
marked this pull request as ready for review
September 26, 2026 13:48
Aleksei Sviridkin (lexfrei)
requested review from
Andrei Kvapil (kvaps),
Timofei Larkin (lllamnyp),
myasnikovdaniil and
Timur Tukaev (tym83)
as code owners
September 26, 2026 13:48
Aleksei Sviridkin (lexfrei)
added a commit
to cozystack/cozystack
that referenced
this pull request
Sep 28, 2026
## What this PR does Package images can now be built for amd64 and arm64 in one `make image`, and a published build is multi-arch unless `PLATFORM` says otherwise. This is the build half of arm64 support from #1961 and #903. CI still publishes amd64 only until it gets a native arm64 leg, which comes in a separate PR. Builder stages now run on the build platform and compile for the target one, so Go never runs under emulation. Under emulation it is slow and it crashes: the migration-controller Dockerfile already records a "bad pointer in Go heap" from exactly that. On top of this, `PLATFORM` defaults to `linux/amd64,linux/arm64`. A build on an arm64 workstation can't publish an arm64-only digest any more. That happened once already, the cilium pin was arm64-only until 3f36a1b rebuilt it by hand. Two images were only right because they were emulated. On a native builder they would ship the wrong architecture. token-proxy ran `go build` with no GOARCH, and kube-ovn calls upstream `make build-go`, which hardcodes `GOARCH=amd64`. Both are fixed now. The new bats test wants every compiling stage on `$BUILDPLATFORM` and actually using `TARGETARCH`. A bare `ARG TARGETARCH` does not count, this is how token-proxy got through. Some things stay amd64. talos and testing pin it with `override`, because matchbox serves amd64 Talos assets and the sandbox runs `qemu-system-x86_64`. `LOAD=1` builds for the host only, since the classic docker image store can't load an index. Every CI build job pins `PLATFORM: linux/amd64`, so CI output does not change. This changes local builds. A `make image` on the default docker driver with the classic image store now fails with "Multi-platform build is not supported for the docker driver", where before it built for the host. Use a `docker-container` builder (`BUILDER=<name>`), or pass `PLATFORM=linux/amd64` (or `LOAD=1`) to build one architecture. I checked it on an arm64 host with a docker-container builder. cozystack-api, dashboard, kubeovn, platform-migrations, cilium and capi-providers-cpprovider build and push as amd64+arm64 indexes. Binaries pulled from each platform are x86-64 and aarch64: cozystack-api, token-proxy, the kamaji provider manager, cilium-agent and all four kube-ovn binaries. piraeus-server builds for both platforms, but the push to my test registry failed on registry 500s. The capi-providers-cpprovider inline cache works with a multi-platform push. Not covered is running the arm64 images on an arm64 cluster, CI has none. This is stacked on #4485 and targets its branch, so the diff here is only the two commits on top. ### Screenshots No UI changes. ### Downstream repositories - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: cozystack/website#711 - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note feat(build): package images build for linux/amd64 and linux/arm64 by default, with Go builders cross-compiling on the build platform; a local `make image` now needs a docker-container builder, or PLATFORM=linux/amd64 / LOAD=1 for a single architecture. CI still publishes amd64. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Build Improvements** * Container image builds now target both amd64 and arm64 by default when building without loading images locally. * CI and release builds are pinned to amd64; Talos and testing images remain amd64-only. * Cross-platform builds now compile on the builder’s native platform while targeting the requested architecture. * **Documentation** * Clarified platform defaults and architecture requirements for local and CI builds. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This branch has not been deployed
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.
The development page should say that
make imagenow builds for linux/amd64 and linux/arm64 by default. That change is cozystack/cozystack#4498. The Buildx section already showed a builder with both platforms, but it never explained why. It also didn't say how to build a single architecture or whatLOAD=1does now.I only changed
next/, because released versions still build the old way. I'll keep this as a draft until the cozystack change is merged, so the page doesn't describe behaviour that main doesn't have yet.