Skip to content

feat(fluid-helm): import helm from local#5752

Merged
cheyang merged 1 commit intofluid-cloudnative:masterfrom
Syspretor:feature/import-helm-from-local
Mar 31, 2026
Merged

feat(fluid-helm): import helm from local#5752
cheyang merged 1 commit intofluid-cloudnative:masterfrom
Syspretor:feature/import-helm-from-local

Conversation

@Syspretor
Copy link
Copy Markdown
Collaborator

(fluid-helm): import helm-bin from local

Ⅰ. Describe what this PR does

Ⅱ. Does this pull request fix one issue?

fixes #XXXX

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the Helm binary acquisition process by introducing a download-helm target in the Makefile and updating several Dockerfiles to copy pre-downloaded binaries from the builder stage. Reviewer feedback suggests maintaining the Git ignore rule for the binary directory to prevent repository bloat, parameterizing architectures in the Makefile for flexibility, improving the reliability of the download pipe, and using relative paths in Dockerfile COPY instructions.

Comment thread .gitignore Outdated
*.dylib
*.jar
bin
!bin/helm/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Un-ignoring bin/helm/ in .gitignore might lead to large binaries being accidentally committed to the repository. If the goal is to include these binaries in the Docker build context, it is better to keep them ignored in Git and ensure they are not excluded in .dockerignore. If you intend to track these binaries in Git, please consider the impact on repository size.

Comment thread Makefile
.PHONY: download-helm
download-helm:
mkdir -p $(HELM_BINARY_DIR)
@for arch in amd64 arm64; do \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The architectures are hardcoded to amd64 and arm64. This prevents building for other architectures that might be supported by the project (e.g., ppc64le, s390x). Consider using a variable like SUPPORTED_ARCHS ?= amd64 arm64 to make this more flexible.

	@for arch in $(SUPPORTED_ARCHS); do \

Comment thread Makefile
Comment on lines +450 to +451
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; \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

When piping curl to tar, if curl fails (e.g., due to a 404 or network issue), tar might still attempt to process the output or fail with a confusing error. It's safer to download the file first or use a shell that supports set -o pipefail to ensure the command fails if any part of the pipe fails.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using an absolute path for the COPY source is brittle and depends on the specific directory structure inside the builder stage. Since the WORKDIR is already set to /go/src/github.com/fluid-cloudnative/fluid, you can use a relative path.

COPY --from=builder bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.22%. Comparing base (8de67ca) to head (c385872).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5752   +/-   ##
=======================================
  Coverage   61.22%   61.22%           
=======================================
  Files         444      444           
  Lines       30557    30557           
=======================================
  Hits        18710    18710           
  Misses      10307    10307           
  Partials     1540     1540           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to stop downloading Helm during Docker image builds by sourcing a Helm binary from a local path in the repository/build context.

Changes:

  • Added a make download-helm target to download Helm binaries into bin/helm/<version>/.
  • Updated multiple runtime/controller Dockerfiles to COPY Helm from bin/helm/${HELM_VERSION}/... instead of downloading it at image build time.
  • Updated .gitignore to (partially) unignore bin/helm/.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
Makefile Adds download-helm target and a versioned Helm binary directory under bin/helm/.
docker/Dockerfile.vineyardruntime Switches to copying ddc-helm from the builder stage’s bin/helm/... path.
docker/Dockerfile.thinruntime Switches to copying ddc-helm from the builder stage’s bin/helm/... path.
docker/Dockerfile.juicefsruntime Switches to copying ddc-helm from the builder stage’s bin/helm/... path.
docker/Dockerfile.jindoruntime Switches to copying ddc-helm from the builder stage’s bin/helm/... path.
docker/Dockerfile.goosefsruntime Switches to copying ddc-helm from the builder stage’s bin/helm/... path.
docker/Dockerfile.efcruntime Switches to copying ddc-helm from the builder stage’s bin/helm/... path.
docker/Dockerfile.dataset Switches to copying ddc-helm from the builder stage’s bin/helm/... path.
docker/Dockerfile.application Switches to copying ddc-helm from the builder stage’s bin/helm/... path.
docker/Dockerfile.alluxioruntime Switches to copying ddc-helm from the builder stage’s bin/helm/... path.
.gitignore Attempts to unignore bin/helm/ under an otherwise-ignored bin/ directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile
Comment on lines +437 to +445
##@ 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)
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Dockerfiles now expect a pre-existing Helm binary at bin/helm/$(HELM_VERSION)/helm-linux-, but this Makefile doesn't hook download-helm into any docker-build-* / docker-buildx-* targets (and the Dockerfile builder stages don't run it either). As-is, docker builds will fail unless callers manually populate that path; consider wiring download-helm into the docker build flow (either run it in the Dockerfile builder stage or add it as a prerequisite for the Makefile docker targets and ensure CI uses those targets).

Copilot uses AI. Check for mistakes.
Comment thread Makefile
Comment on lines +446 to +457
@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; \
mv $(HELM_BINARY_DIR)/helm $${target}; \
chmod +x $${target}; \
else \
echo "helm $(HELM_VERSION) linux/$${arch} already exists, skipping."; \
fi; \
done
Copy link

Copilot AI Mar 31, 2026

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

Copilot uses AI. Check for mistakes.
Comment thread docker/Dockerfile.dataset
Comment on lines 23 to +26
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
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make dataset-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Copilot uses AI. Check for mistakes.
Comment on lines 22 to +25
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
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make application-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make alluxioruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines 23 to +26
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
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make thinruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Copilot uses AI. Check for mistakes.
Comment on lines 25 to +28
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
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make juicefsruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Copilot uses AI. Check for mistakes.
Comment on lines 20 to +23
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
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make jindoruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make goosefsruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Suggested change
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 uses AI. Check for mistakes.
Comment on lines 23 to +26
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
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make efcruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Copilot uses AI. Check for mistakes.
Signed-off-by: 玖宇 <guotongyu.gty@alibaba-inc.com>
@Syspretor Syspretor force-pushed the feature/import-helm-from-local branch from 739b264 to c385872 Compare March 31, 2026 11:25
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 13 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile
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; \
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

download-helm uses a curl | tar pipeline, but without pipefail the target can succeed even if the download fails (the pipeline exit status is typically the tar exit code). Consider downloading to a temp file first (or run the recipe under bash with set -o pipefail) so network/HTTP failures reliably fail the Make target.

Suggested change
@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}"; \

Copilot uses AI. Check for mistakes.
Comment on lines 22 to +25
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
Copy link

Copilot AI Mar 31, 2026

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 at build time with a missing file. Either enforce a single HELM_VERSION across all builds, or add a builder-stage step that populates bin/helm/${HELM_VERSION} (e.g., via make download-helm).

Copilot uses AI. Check for mistakes.
Comment on lines 23 to +26
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
Copy link

Copilot AI Mar 31, 2026

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

Copilot uses AI. Check for mistakes.
Comment on lines 23 to +26
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
Copy link

Copilot AI Mar 31, 2026

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

Copilot uses AI. Check for mistakes.
Comment on lines 20 to +23
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
Copy link

Copilot AI Mar 31, 2026

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

Copilot uses AI. Check for mistakes.
Comment on lines 25 to +28
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
Copy link

Copilot AI Mar 31, 2026

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

Copilot uses AI. Check for mistakes.
Comment on lines 23 to +26
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
Copy link

Copilot AI Mar 31, 2026

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

Copilot uses AI. Check for mistakes.
Comment on lines 20 to +23
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
Copy link

Copilot AI Mar 31, 2026

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

Copilot uses AI. Check for mistakes.
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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Dockerfiles now copy Helm from bin/helm/${HELM_VERSION}/..., but this PR only vendors binaries under bin/helm/v3.19.5/. That means HELM_VERSION still looks configurable from the build interface, while in practice any non-vendored version will fail at build time with a missing file. Before this change, overriding HELM_VERSION still worked because the image downloaded the requested version during build. With the new layout, that behavior is effectively narrowed to the single vendored version unless download-helm is wired into the build flow. I think this should be addressed before merge: either make the build flow populate bin/helm/${HELM_VERSION} reliably, or explicitly lock the build interface to the vendored Helm version.

Comment thread Makefile
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; \
Copy link
Copy Markdown
Collaborator

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.

Comment thread .gitignore
*.dylib
*.jar
bin
/bin/*
Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@cheyang cheyang merged commit 965f661 into fluid-cloudnative:master Mar 31, 2026
18 checks passed
@fluid-e2e-bot fluid-e2e-bot Bot added the lgtm label Apr 3, 2026
@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented Apr 3, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

2 similar comments
@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented Apr 3, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented Apr 3, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants