Skip to content

Build db_server for linux/amd64 and linux/arm64 - #3934

Closed
priyawadhwa wants to merge 1 commit into
google:masterfrom
priyawadhwa:multiarch-db-server
Closed

priyawadhwa wants to merge 1 commit into
google:masterfrom
priyawadhwa:multiarch-db-server

Conversation

@priyawadhwa

Copy link
Copy Markdown

We deploy trillian on arm64 Kubernetes nodes through the sigstore/helm-charts trillian chart, which pins gcr.io/trillian-opensource-ci/db_server. Every published tag of that image (checked through v1.8.0) is a single-manifest amd64 image, so the MySQL pod cannot run on arm64 hosts and the whole log stack is held to amd64. Downstream we worked around it by overriding the chart's image (chainguard-dev/mono#62571), but the image itself is the right place to fix this.

The Dockerfile is already multi-arch-ready: it is a thin repack of the multi-arch mysql:8.4 base, two COPYs and a chmod. The amd64-only output comes from the build, since kaniko builds only the Cloud Build host platform. This switches just the db_server step to Cloud Build's documented multi-platform recipe: install binfmt handlers, create a docker-container buildx builder, and build/push linux/amd64,linux/arm64 in one step. QEMU emulation only covers the chmod layer; the Go-binary images are untouched. The kaniko registry cache flags are dropped for this one step, since the build is two COPY layers on a pulled base.

I can't exercise your Cloud Build project from a fork, so the presubmit run on this PR is the real test of the recipe. Happy to adjust if you'd rather scope the change to cloudbuild_master.yaml/cloudbuild_tag.yaml only, or pin binfmt differently.

The db_server Dockerfile is a thin repack of the multi-arch mysql:8.4
base (two COPYs and a chmod), but the kaniko step only builds the Cloud
Build host platform, so every published gcr.io tag is amd64-only. That
leaves arm64 consumers of the sigstore/helm-charts trillian chart unable
to run the log storage at all.

Switch just this image to a buildx multi-platform build using Cloud
Build's documented recipe: install binfmt handlers, create a
docker-container builder, and build/push both platforms in one step. The
QEMU emulation only covers the chmod layer; the Go images are untouched.
The kaniko registry cache flags are dropped for this step since the build
is two COPY layers on a pulled base.
@priyawadhwa
priyawadhwa requested a review from a team as a code owner September 28, 2026 19:33
@priyawadhwa
priyawadhwa requested a review from phbnf September 28, 2026 19:33
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.

1 participant