Add multi-arch container image support#1130
Open
mrIncompetent wants to merge 1 commit into
Open
Conversation
Build container images for linux/amd64, linux/arm64, linux/s390x, and linux/ppc64le using Docker Buildx and QEMU. Each architecture is built separately in CI and assembled into a manifest list at push time. Remove kubernetes.io/arch constraints from Helm values, kustomize manager config, and OLM bundle so Kubernetes automatically selects the correct image variant. Co-authored-by: Claude Code <noreply@anthropic.com> Closes: backube#372 Signed-off-by: Henrik Schmidt <mrIncompetent@users.noreply.github.com>
Author
|
Ping @JohnStrunk |
Author
|
Ping @JohnStrunk :) |
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.
Summary
Adds multi-arch container image support for
linux/amd64,linux/arm64,linux/s390x, andlinux/ppc64le.Closes #372
Changes
docker buildwith a matrix job that builds all four architectures using Docker Buildx and QEMUdocker manifest createkubernetes.io/archconstraints from Helm values, kustomize manager config, and OLM bundle CSV — with multi-arch images those aren't needed anymore (Or should those be kept for backwards compat?). Onlykubernetes.io/os: linuxis retained, following the pattern used by cert-manager and ingress-nginx.Build time
Cross-compilation via QEMU takes up to ~18 minutes for the non-amd64 architectures (amd64 builds in ~1.5 minutes natively). The image builds currently block E2E tests since GitHub Actions doesn't support depending on a single matrix entry. This could be changed by splitting into separate
build-amd64andbuild-crossjobs, but the added duplication isn't worth the complexity IMHO.Testing
Validated end-to-end on our fork by temporarily swapping
quay.io/backube/snapschedulerforghcr.io/niledatabase/snapschedulerto test the full build + push pipeline:latestmanifest): https://github.com/niledatabase/snapscheduler/actions/runs/23814407119v99.0.0-test(publishes version-tagged manifest): https://github.com/niledatabase/snapscheduler/actions/runs/23815806152Both runs show all four architectures building, E2E passing on amd64, and the manifest list pushed successfully.
docker manifest inspect ghcr.io/niledatabase/snapscheduler:latest{ "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 3233, "digest": "sha256:cbc75c031b313175a3db5ee86c4d297ba54a02ba910a9a2c8b3115294661df3f", "platform": { "architecture": "amd64", "os": "linux" } }, { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 3233, "digest": "sha256:75f275e0fa55093e236f8ecbf88ce704a619c9d06793e0a316d9c5803a9fa803", "platform": { "architecture": "arm64", "os": "linux" } }, { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 3233, "digest": "sha256:90803657434b6e5c7e376160ba2b52527148851a50ddc52e3974b10328e39c1b", "platform": { "architecture": "ppc64le", "os": "linux" } }, { "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "size": 3233, "digest": "sha256:227f0139b686a8dabd2ed77b80e109ae123a41102dca6d481922431bfeef0b08", "platform": { "architecture": "s390x", "os": "linux" } } ] }This PR was authored with Claude Code.