-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(fluid-helm): import helm from local #5752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,9 @@ | |
| *.so | ||
| *.dylib | ||
| *.jar | ||
| bin | ||
| /bin/* | ||
| !/bin/helm/ | ||
| !/bin/helm/** | ||
|
|
||
| # Test binary, build with `go test -c` | ||
| *.test | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -434,6 +434,28 @@ docker-push-all: pre-setup ${DOCKER_PUSH} | |||||||||||||||||||||||||||||||
| .PHONY: docker-buildx-all-push | ||||||||||||||||||||||||||||||||
| docker-buildx-all-push: pre-setup ${DOCKER_BUILDX_PUSH} | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ##@ Helm Binary | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| HELM_BINARY_DIR := $(shell pwd)/bin/helm/$(HELM_VERSION) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| # Download helm binaries for linux/amd64 and linux/arm64 to bin/helm/<version>/ | ||||||||||||||||||||||||||||||||
| # Run this target when upgrading HELM_VERSION or on a fresh checkout. | ||||||||||||||||||||||||||||||||
| .PHONY: download-helm | ||||||||||||||||||||||||||||||||
| download-helm: | ||||||||||||||||||||||||||||||||
| mkdir -p $(HELM_BINARY_DIR) | ||||||||||||||||||||||||||||||||
|
Comment on lines
+437
to
+445
|
||||||||||||||||||||||||||||||||
| @for arch in amd64 arm64; do \ | ||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||||||||||||||||||||
| target=$(HELM_BINARY_DIR)/helm-linux-$${arch}; \ | ||||||||||||||||||||||||||||||||
| if [ ! -f "$${target}" ]; then \ | ||||||||||||||||||||||||||||||||
| echo "Downloading helm $(HELM_VERSION) linux/$${arch} ..."; \ | ||||||||||||||||||||||||||||||||
| curl -fsSL https://github.com/fluid-cloudnative/helm/releases/download/$(HELM_VERSION)/helm-$(HELM_VERSION)-linux-$${arch}.tar.gz \ | ||||||||||||||||||||||||||||||||
| | tar -xz --strip-components=1 -C $(HELM_BINARY_DIR) linux-$${arch}/helm; \ | ||||||||||||||||||||||||||||||||
|
Comment on lines
+450
to
+451
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Comment on lines
+446
to
+451
|
||||||||||||||||||||||||||||||||
| @for arch in amd64 arm64; do \ | |
| target=$(HELM_BINARY_DIR)/helm-linux-$${arch}; \ | |
| if [ ! -f "$${target}" ]; then \ | |
| echo "Downloading helm $(HELM_VERSION) linux/$${arch} ..."; \ | |
| curl -fsSL https://github.com/fluid-cloudnative/helm/releases/download/$(HELM_VERSION)/helm-$(HELM_VERSION)-linux-$${arch}.tar.gz \ | |
| | tar -xz --strip-components=1 -C $(HELM_BINARY_DIR) linux-$${arch}/helm; \ | |
| @set -e; \ | |
| for arch in amd64 arm64; do \ | |
| target=$(HELM_BINARY_DIR)/helm-linux-$${arch}; \ | |
| if [ ! -f "$${target}" ]; then \ | |
| echo "Downloading helm $(HELM_VERSION) linux/$${arch} ..."; \ | |
| tmp_tar="$(HELM_BINARY_DIR)/helm-$(HELM_VERSION)-linux-$${arch}.tar.gz"; \ | |
| curl -fsSL https://github.com/fluid-cloudnative/helm/releases/download/$(HELM_VERSION)/helm-$(HELM_VERSION)-linux-$${arch}.tar.gz -o "$${tmp_tar}"; \ | |
| tar -xz --strip-components=1 -C $(HELM_BINARY_DIR) -f "$${tmp_tar}" linux-$${arch}/helm; \ | |
| rm -f "$${tmp_tar}"; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
download-helm would be more robust if it failed hard on download or extract errors instead of relying on a curl | tar pipeline. Downloading to a temporary file first would make failure handling and debugging much clearer.
Copilot
AI
Mar 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
download-helm's for loop doesn't fail fast: if one architecture download/extract fails, the loop can continue and still exit 0 if a later iteration succeeds. Consider forcing the recipe to exit on the first failure (e.g., enable set -e within the loop and/or explicitly track/return a non-zero status when any arch fails).
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,11 +19,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \ | |||||||||||
|
|
||||||||||||
| ARG TARGETARCH | ||||||||||||
| ARG HELM_VERSION | ||||||||||||
| RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||||||||||||
| tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||||||||||||
| mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \ | ||||||||||||
| chmod u+x /usr/local/bin/ddc-helm && \ | ||||||||||||
| rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz | ||||||||||||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm | ||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using an absolute path for the |
||||||||||||
| RUN chmod u+x /usr/local/bin/ddc-helm | ||||||||||||
|
Comment on lines
+22
to
+23
|
||||||||||||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm | |
| RUN chmod u+x /usr/local/bin/ddc-helm | |
| RUN curl -fsSL "https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" \ | |
| | tar -xzO "linux-${TARGETARCH}/helm" > /usr/local/bin/ddc-helm && \ | |
| chmod u+x /usr/local/bin/ddc-helm |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,11 +21,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \ | |
|
|
||
| ARG TARGETARCH | ||
| ARG HELM_VERSION | ||
| RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||
| tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||
| mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \ | ||
| chmod u+x /usr/local/bin/ddc-helm && \ | ||
| rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz | ||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm | ||
| RUN chmod u+x /usr/local/bin/ddc-helm | ||
|
Comment on lines
22
to
+25
|
||
|
|
||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,11 +22,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \ | |
|
|
||
| ARG TARGETARCH | ||
| ARG HELM_VERSION | ||
| RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||
| tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||
| mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \ | ||
| chmod u+x /usr/local/bin/ddc-helm && \ | ||
| rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz | ||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm | ||
| RUN chmod u+x /usr/local/bin/ddc-helm | ||
|
Comment on lines
23
to
+26
|
||
|
|
||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,11 +22,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \ | |
|
|
||
| ARG TARGETARCH | ||
| ARG HELM_VERSION | ||
| RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||
| tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||
| mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \ | ||
| chmod u+x /usr/local/bin/ddc-helm && \ | ||
| rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz | ||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm | ||
| RUN chmod u+x /usr/local/bin/ddc-helm | ||
|
Comment on lines
23
to
+26
|
||
|
|
||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,11 +22,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \ | |||||||||||||||
|
|
||||||||||||||||
| ARG TARGETARCH | ||||||||||||||||
| ARG HELM_VERSION | ||||||||||||||||
| RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||||||||||||||||
| tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||||||||||||||||
| mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \ | ||||||||||||||||
| chmod u+x /usr/local/bin/ddc-helm && \ | ||||||||||||||||
| rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz | ||||||||||||||||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm | ||||||||||||||||
| RUN chmod u+x /usr/local/bin/ddc-helm | ||||||||||||||||
|
Comment on lines
+25
to
+26
|
||||||||||||||||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm | |
| RUN chmod u+x /usr/local/bin/ddc-helm | |
| RUN curl -sSL "https://get.helm.sh/helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" -o /tmp/helm.tgz && \ | |
| tar -xzf /tmp/helm.tgz -C /tmp && \ | |
| mv "/tmp/linux-${TARGETARCH}/helm" /usr/local/bin/ddc-helm && \ | |
| chmod u+x /usr/local/bin/ddc-helm && \ | |
| rm -rf /tmp/helm.tgz "/tmp/linux-${TARGETARCH}" |
Copilot
AI
Mar 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repo only contains helm binaries under bin/helm/v3.19.5/, but this Dockerfile copies from bin/helm/${HELM_VERSION}. Any build that passes a different HELM_VERSION will fail with a missing file. Either align build args to the vendored version, or add a builder-stage step that populates bin/helm/${HELM_VERSION} (e.g., make download-helm).
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,11 +19,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \ | |
|
|
||
| ARG TARGETARCH | ||
| ARG HELM_VERSION | ||
| RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||
| tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||
| mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \ | ||
| chmod u+x /usr/local/bin/ddc-helm && \ | ||
| rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz | ||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm | ||
| RUN chmod u+x /usr/local/bin/ddc-helm | ||
|
Comment on lines
20
to
+23
|
||
|
|
||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/library /charts/library | ||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/jindofs /charts/jindofs | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,11 +24,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \ | |
|
|
||
| ARG TARGETARCH | ||
| ARG HELM_VERSION | ||
| RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||
| tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||
| mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \ | ||
| chmod u+x /usr/local/bin/ddc-helm && \ | ||
| rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz | ||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm | ||
| RUN chmod u+x /usr/local/bin/ddc-helm | ||
|
Comment on lines
25
to
+28
|
||
|
|
||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,11 +22,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \ | |
|
|
||
| ARG TARGETARCH | ||
| ARG HELM_VERSION | ||
| RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||
| tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||
| mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \ | ||
| chmod u+x /usr/local/bin/ddc-helm && \ | ||
| rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz | ||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm | ||
| RUN chmod u+x /usr/local/bin/ddc-helm | ||
|
Comment on lines
23
to
+26
|
||
|
|
||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,11 +19,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \ | |||||||||||||||
|
|
||||||||||||||||
| ARG TARGETARCH | ||||||||||||||||
| ARG HELM_VERSION | ||||||||||||||||
| RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||||||||||||||||
| tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \ | ||||||||||||||||
| mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \ | ||||||||||||||||
| chmod u+x /usr/local/bin/ddc-helm && \ | ||||||||||||||||
| rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz | ||||||||||||||||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm | ||||||||||||||||
| RUN chmod u+x /usr/local/bin/ddc-helm | ||||||||||||||||
|
Comment on lines
+22
to
+23
|
||||||||||||||||
| COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm | |
| RUN chmod u+x /usr/local/bin/ddc-helm | |
| RUN curl -fsSL "https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" -o /tmp/helm.tgz && \ | |
| tar -xz -C /tmp -f /tmp/helm.tgz && \ | |
| mv "/tmp/linux-${TARGETARCH}/helm" /usr/local/bin/ddc-helm && \ | |
| chmod u+x /usr/local/bin/ddc-helm && \ | |
| rm -rf /tmp/helm.tgz "/tmp/linux-${TARGETARCH}" |
Copilot
AI
Mar 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repo only contains helm binaries under bin/helm/v3.19.5/, but this Dockerfile copies from bin/helm/${HELM_VERSION}. Any build that passes a different HELM_VERSION will fail with a missing file. Either align build args to the vendored version, or add a builder-stage step that populates bin/helm/${HELM_VERSION} (e.g., make download-helm).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change also formalizes committing large Helm binaries into the repo history. If that is intentional, it may be worth calling out explicitly in the PR description because it changes the repository size and maintenance trade-off, not just the Docker build implementation.