fix(operators): cross-compile the operator image for the target arch#30
Merged
Conversation
The Dockerfile declared ARG TARGETARCH=amd64 with a default value, which shadows the per-platform value buildx auto-populates during a multi-arch build. So the release's linux/arm64 image got an amd64 manager binary: the manifest claimed arm64, but the bytes were amd64, and the operator CrashLooped on Graviton nodes with "exec /manager: exec format error". Declare TARGETOS/TARGETARCH without defaults (the canonical buildx pattern) so buildx populates them per-platform and Go cross-compiles correctly. Plain docker build without --platform leaves them empty and builds natively; an explicit --build-arg still forces a specific arch. Bumps the chart to 0.1.1 for the corrected release.
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 release's multi-arch build declared
ARG TARGETARCH=amd64with a default, shadowing buildx's per-platform value — sooperator:0.1.0's linux/arm64 image carried an amd64managerbinary and CrashLooped on Graviton nodes (exec /manager: exec format error). Surfaced by the landing-zonetask e2eGitOps-install path on real EKS.Declares
TARGETOS/TARGETARCHwithout defaults (canonical buildx pattern) → correct per-platform cross-compile. Bumps the chart to0.1.1; tagoperator-v0.1.1re-publishes the corrected multi-arch image.