Skip to content

Commit c385872

Browse files
author
玖宇
committed
feat(fluid-helm): import helm-bin from local
Signed-off-by: 玖宇 <guotongyu.gty@alibaba-inc.com>
1 parent 8de67ca commit c385872

13 files changed

Lines changed: 43 additions & 46 deletions

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
*.so
77
*.dylib
88
*.jar
9-
bin
9+
/bin/*
10+
!/bin/helm/
11+
!/bin/helm/**
1012

1113
# Test binary, build with `go test -c`
1214
*.test

Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,28 @@ docker-push-all: pre-setup ${DOCKER_PUSH}
434434
.PHONY: docker-buildx-all-push
435435
docker-buildx-all-push: pre-setup ${DOCKER_BUILDX_PUSH}
436436

437+
##@ Helm Binary
438+
439+
HELM_BINARY_DIR := $(shell pwd)/bin/helm/$(HELM_VERSION)
440+
441+
# Download helm binaries for linux/amd64 and linux/arm64 to bin/helm/<version>/
442+
# Run this target when upgrading HELM_VERSION or on a fresh checkout.
443+
.PHONY: download-helm
444+
download-helm:
445+
mkdir -p $(HELM_BINARY_DIR)
446+
@for arch in amd64 arm64; do \
447+
target=$(HELM_BINARY_DIR)/helm-linux-$${arch}; \
448+
if [ ! -f "$${target}" ]; then \
449+
echo "Downloading helm $(HELM_VERSION) linux/$${arch} ..."; \
450+
curl -fsSL https://github.com/fluid-cloudnative/helm/releases/download/$(HELM_VERSION)/helm-$(HELM_VERSION)-linux-$${arch}.tar.gz \
451+
| tar -xz --strip-components=1 -C $(HELM_BINARY_DIR) linux-$${arch}/helm; \
452+
mv $(HELM_BINARY_DIR)/helm $${target}; \
453+
chmod +x $${target}; \
454+
else \
455+
echo "helm $(HELM_VERSION) linux/$${arch} already exists, skipping."; \
456+
fi; \
457+
done
458+
437459
##@ Dependencies
438460

439461
## Location to install dependencies to

bin/helm/v3.19.5/helm-linux-amd64

57.4 MB
Binary file not shown.

bin/helm/v3.19.5/helm-linux-arm64

55.1 MB
Binary file not shown.

docker/Dockerfile.alluxioruntime

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \
1919

2020
ARG TARGETARCH
2121
ARG HELM_VERSION
22-
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 && \
23-
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
24-
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
25-
chmod u+x /usr/local/bin/ddc-helm && \
26-
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
22+
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
23+
RUN chmod u+x /usr/local/bin/ddc-helm
2724

2825
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts
2926

docker/Dockerfile.application

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \
2121

2222
ARG TARGETARCH
2323
ARG HELM_VERSION
24-
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 && \
25-
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
26-
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
27-
chmod u+x /usr/local/bin/ddc-helm && \
28-
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
24+
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
25+
RUN chmod u+x /usr/local/bin/ddc-helm
2926

3027
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts
3128

docker/Dockerfile.dataset

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \
2222

2323
ARG TARGETARCH
2424
ARG HELM_VERSION
25-
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 && \
26-
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
27-
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
28-
chmod u+x /usr/local/bin/ddc-helm && \
29-
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
25+
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
26+
RUN chmod u+x /usr/local/bin/ddc-helm
3027

3128
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts
3229

docker/Dockerfile.efcruntime

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \
2222

2323
ARG TARGETARCH
2424
ARG HELM_VERSION
25-
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 && \
26-
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
27-
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
28-
chmod u+x /usr/local/bin/ddc-helm && \
29-
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
25+
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
26+
RUN chmod u+x /usr/local/bin/ddc-helm
3027

3128
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts
3229

docker/Dockerfile.goosefsruntime

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \
2222

2323
ARG TARGETARCH
2424
ARG HELM_VERSION
25-
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 && \
26-
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
27-
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
28-
chmod u+x /usr/local/bin/ddc-helm && \
29-
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
25+
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
26+
RUN chmod u+x /usr/local/bin/ddc-helm
3027

3128
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts
3229

docker/Dockerfile.jindoruntime

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \
1919

2020
ARG TARGETARCH
2121
ARG HELM_VERSION
22-
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 && \
23-
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
24-
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
25-
chmod u+x /usr/local/bin/ddc-helm && \
26-
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
22+
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
23+
RUN chmod u+x /usr/local/bin/ddc-helm
2724

2825
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/library /charts/library
2926
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/jindofs /charts/jindofs

0 commit comments

Comments
 (0)