Skip to content

Commit

Permalink
fix: bundle correct arch for the mindthegap binary (#954)
Browse files Browse the repository at this point in the history
**What problem does this PR solve?**:
Latest changes broke the published arm build. The `mindthegap` binary
from `bundle_builder` will always be `BUILDPLATFORM`, but we want it to
match `TARGETPLATFORM`.

**Which issue(s) this PR fixes**:
Fixes #

**How Has This Been Tested?**:
<!--
Please describe the tests that you ran to verify your changes.
Provide output from the tests and any manual steps needed to replicate
the tests.
-->

**Special notes for your reviewer**:
<!--
Use this to provide any additional information to the reviewers.
This may include:
- Best way to review the PR.
- Where the author wants the most review attention on.
- etc.
-->
  • Loading branch information
dkoshkin authored Oct 29, 2024
1 parent d52de76 commit 9d922aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hack/addons/mindthegap-helm-registry/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ FROM --platform=${BUILDPLATFORM} ghcr.io/mesosphere/mindthegap:${MINDTHEGAP_VERS
# this gets called by goreleaser so the copy source has to be the path relative to the repo root.
RUN --mount=source=./hack/addons/mindthegap-helm-registry/repos.yaml,target=/repos.yaml \
["/ko-app/mindthegap", "create", "bundle", "--helm-charts-file=/repos.yaml", "--output-file=/tmp/helm-charts.tar"]

FROM --platform=${TARGETPLATFORM} ghcr.io/mesosphere/mindthegap:${MINDTHEGAP_VERSION} as mindthegap

FROM --platform=${TARGETPLATFORM} alpine:3.20.3
# Add mindthegap binary that matches TARGETPLATFORM
COPY --from=mindthegap /ko-app/mindthegap /usr/bin/mindthegap
# Add helm charts for the current version
ARG VERSION
COPY --from=bundle_builder /tmp/helm-charts.tar /charts/helm-charts-${VERSION}.tar
COPY --from=bundle_builder /ko-app/mindthegap /usr/bin/mindthegap
# TODO remove me as soon as its not needed to hold multiple versions of helm charts
COPY --from=ghcr.io/nutanix-cloud-native/caren-helm-reg:v0.14.6 /tmp/helm-charts.tar /charts/helm-charts-v0.14.6.tar
COPY --from=ghcr.io/nutanix-cloud-native/caren-helm-reg:v0.14.9 /tmp/helm-charts.tar /charts/helm-charts-v0.14.9.tar
Expand Down

0 comments on commit 9d922aa

Please sign in to comment.