Skip to content

Add multi-arch container image support#1130

Open
mrIncompetent wants to merge 1 commit into
backube:masterfrom
niledatabase:add-multi-arch-images
Open

Add multi-arch container image support#1130
mrIncompetent wants to merge 1 commit into
backube:masterfrom
niledatabase:add-multi-arch-images

Conversation

@mrIncompetent
Copy link
Copy Markdown

Summary

Adds multi-arch container image support for linux/amd64, linux/arm64, linux/s390x, and linux/ppc64le.

Closes #372

Changes

  • CI build job: Replaced the single-platform docker build with a matrix job that builds all four architectures using Docker Buildx and QEMU
  • CI push job: Pushes per-arch images and assembles them into a manifest list via docker manifest create
  • Deployment configs: Removed kubernetes.io/arch constraints 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?). Only kubernetes.io/os: linux is 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-amd64 and build-cross jobs, but the added duplication isn't worth the complexity IMHO.

Testing

Validated end-to-end on our fork by temporarily swapping quay.io/backube/snapscheduler for ghcr.io/niledatabase/snapscheduler to test the full build + push pipeline:

Both 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.

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>
@mrIncompetent
Copy link
Copy Markdown
Author

Ping @JohnStrunk

@mrIncompetent
Copy link
Copy Markdown
Author

Ping @JohnStrunk :)

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.

multiarch support (arm64 specifically)

1 participant