Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RUN curl -L -o devspace "https://github.com/loft-sh/devspace/releases/latest/dow
RUN curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-linux-${TARGETARCH}" && install -c -m 0755 vcluster /usr/local/bin
RUN curl -L -o kind "https://kind.sigs.k8s.io/dl/v0.29.0/kind-linux-${TARGETARCH}" && install -c -m 0755 kind /usr/local/bin
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/${TARGETARCH}/kubectl && chmod +x ./kubectl && mv ./kubectl /usr/local/bin
RUN bash -c "curl -s https://get.helm.sh/helm-v3.18.6-linux-${TARGETARCH}.tar.gz > helm3.tar.gz" && tar -zxvf helm3.tar.gz linux-${TARGETARCH}/helm && chmod +x linux-${TARGETARCH}/helm && mv linux-${TARGETARCH}/helm /usr/local/bin && rm helm3.tar.gz && rm -R linux-${TARGETARCH}
RUN bash -c "curl -s https://get.helm.sh/helm-v4.1.3-linux-${TARGETARCH}.tar.gz > helm.tar.gz" && tar -zxvf helm.tar.gz linux-${TARGETARCH}/helm && chmod +x linux-${TARGETARCH}/helm && mv linux-${TARGETARCH}/helm /usr/local/bin && rm helm.tar.gz && rm -R linux-${TARGETARCH}
2 changes: 1 addition & 1 deletion .github/workflows/e2e-ginkgo-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Setup Helm
uses: azure/setup-helm@v4
with:
version: "v3.19.0"
version: "v4.1.3"

- name: Build vcluster image and CLI
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-ginkgo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:
- uses: azure/setup-helm@v4
name: Setup Helm
with:
version: "v3.19.0"
version: "v4.1.3"

- name: Run vCluster Ginkgo E2E Tests
id: execute-e2e-tests
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
- uses: azure/setup-helm@v4
name: Setup Helm
with:
version: "v3.11.0"
version: "v4.1.3"

- name: Set up kind k8s cluster
uses: loft-sh/setup-kind@master
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
- uses: azure/setup-helm@v4
name: Setup Helm
with:
version: "v3.11.0"
version: "v4.1.3"

- name: Set up kind k8s cluster
uses: loft-sh/setup-kind@master
Expand Down Expand Up @@ -297,7 +297,7 @@ jobs:
- uses: azure/setup-helm@v4
name: Setup Helm
with:
version: "v3.11.0"
version: "v4.1.3"

- name: Set up kind k8s cluster
uses: loft-sh/setup-kind@master
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ jobs:
ref: ${{ inputs.ref }}
- uses: azure/setup-helm@v4
with:
version: "v3.0.2"
version: "v4.1.3"
- name: Publish Helm chart
run: |
set -euo pipefail
CHART_VERSION=$(echo "${{ inputs.release_version }}" | sed -nE 's!^v(.*)!\1!p')
echo "Publishing Helm chart for version $CHART_VERSION"
helm plugin install https://github.com/chartmuseum/helm-push.git || true
helm plugin install https://github.com/chartmuseum/helm-push.git --verify=false || true
helm repo add chartmuseum "$CHART_MUSEUM_URL" --username "$CHART_MUSEUM_USER" --password "$CHART_MUSEUM_PASSWORD"
helm cm-push --force --version="$CHART_VERSION" --app-version="$CHART_VERSION" chart chartmuseum
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push-head-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v6
- name: Install Helm Unit Test Plugin
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest --version v0.4.4
helm plugin install https://github.com/helm-unittest/helm-unittest --version v1.0.3 --verify=false
- name: Run Helm Unit Tests
run: |
helm unittest chart
Expand Down Expand Up @@ -115,10 +115,10 @@ jobs:

- uses: azure/setup-helm@v4
with:
version: "v3.20.0"
version: "v4.1.3"

- name: Install helm-push plugin
run: helm plugin install https://github.com/chartmuseum/helm-push.git
run: helm plugin install https://github.com/chartmuseum/helm-push.git --verify=false

- name: Add ChartMuseum repo
run: helm repo add chartmuseum "$CHART_MUSEUM_URL" --username "$CHART_MUSEUM_USER" --password "$CHART_MUSEUM_PASSWORD"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
uses: docker/setup-buildx-action@v3
- uses: azure/setup-helm@v4
with:
version: "v3.0.2"
version: "v4.1.3"
- id: get_version
run: |
RELEASE_VERSION=$(echo "$GITHUB_REF" | sed -nE 's!refs/tags/!!p')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@v6
- name: Install Helm Unit Test Plugin
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest --version v0.4.4
helm plugin install https://github.com/helm-unittest/helm-unittest --version v1.0.3 --verify=false
- name: Run Helm Unit Tests
run: |
helm unittest chart
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ ARG TARGETOS
ARG TARGETARCH
ARG BUILD_VERSION=dev
ARG TELEMETRY_PRIVATE_KEY=""
ARG HELM_VERSION="v3.17.3"
ARG HELM_VERSION="v4.1.3"

# Install kubectl for development
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/${TARGETARCH}/kubectl && chmod +x ./kubectl && mv ./kubectl /usr/local/bin/kubectl

# Install helm binary
RUN curl -s https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz > helm3.tar.gz && tar -zxvf helm3.tar.gz linux-${TARGETARCH}/helm && chmod +x linux-${TARGETARCH}/helm && mv linux-${TARGETARCH}/helm /usr/local/bin/helm && rm helm3.tar.gz && rm -R linux-${TARGETARCH}
RUN curl -s https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz > helm.tar.gz && tar -zxvf helm.tar.gz linux-${TARGETARCH}/helm && chmod +x linux-${TARGETARCH}/helm && mv linux-${TARGETARCH}/helm /usr/local/bin/helm && rm helm.tar.gz && rm -R linux-${TARGETARCH}

# Install Delve for debugging
RUN if [ "${TARGETARCH}" = "amd64" ] || [ "${TARGETARCH}" = "arm64" ]; then go install github.com/go-delve/delve/cmd/dlv@latest; fi
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.cli
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG TARGETOS
ARG TARGETARCH

# Install helm binary
RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && chmod 700 get_helm.sh && ./get_helm.sh
RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4 && chmod 700 get_helm.sh && ./get_helm.sh

# Copy the Go Modules manifests
COPY go.mod go.mod
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.cli.release
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# we use alpine for easier debugging
FROM alpine:3.23

ARG HELM_VERSION="v3.17.3"
ARG HELM_VERSION="v4.1.3"
ARG TARGETARCH

# Set root path as working directory
Expand All @@ -13,11 +13,11 @@ RUN wget -O devspace "https://github.com/loft-sh/devspace/releases/latest/downlo
&& mv devspace /usr/local/bin/devspace

# Add helm
RUN wget -O helm3.tar.gz "https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" \
&& tar -zxvf helm3.tar.gz "linux-${TARGETARCH}/helm" \
RUN wget -O helm.tar.gz "https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" \
&& tar -zxvf helm.tar.gz "linux-${TARGETARCH}/helm" \
&& chmod +x "linux-${TARGETARCH}/helm" \
&& mv "linux-${TARGETARCH}/helm" /usr/local/bin/helm \
&& rm helm3.tar.gz \
&& rm helm.tar.gz \
&& rm -R "linux-${TARGETARCH}"

# Add kubectl
Expand Down
2 changes: 1 addition & 1 deletion chart/tests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Add [unittest plugin](https://github.com/helm-unittest/helm-unittest) via:
```
helm plugin install https://github.com/helm-unittest/helm-unittest.git
helm plugin install https://github.com/helm-unittest/helm-unittest.git --verify=false
```

Run tests via:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ require (
github.com/loft-sh/api/v4 v4.8.0-alpha.1
github.com/loft-sh/e2e-framework v0.0.0-20260226211029-dc642849b244
github.com/loft-sh/image v0.0.0-20250625154753-87447a6ad364
github.com/loft-sh/utils v0.0.29
github.com/loft-sh/utils v0.0.30
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
github.com/mitchellh/go-homedir v1.1.0
github.com/moby/term v0.5.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ github.com/loft-sh/image v0.0.0-20250625154753-87447a6ad364 h1:vSuqHqh4w2zrG+Wvn
github.com/loft-sh/image v0.0.0-20250625154753-87447a6ad364/go.mod h1:niVPRwWFUSA8FihY9e5hGAp5IbKmbCdckGxJGSTKTUs=
github.com/loft-sh/log v0.0.0-20240219160058-26d83ffb46ac h1:Gz/7Lb7WgdgIv+KJz87ORA1zvQW52tUqKPGyunlp4dQ=
github.com/loft-sh/log v0.0.0-20240219160058-26d83ffb46ac/go.mod h1:YImeRjXH34Yf5E79T7UHBQpDZl9fIaaFRgyZ/bkY+UQ=
github.com/loft-sh/utils v0.0.29 h1:P/MObccXToAZy2QoJSQDJ+OJx1qHitpFHEVj3QBSNJs=
github.com/loft-sh/utils v0.0.29/go.mod h1:9hlX9cGpWHg3mNi/oBlv3X4ePGDMK66k8MbOZGFMDTI=
github.com/loft-sh/utils v0.0.30 h1:MXtZPeNGjo14PhE1Fu937rUykj3tSUY8Ln2KhdrlOAE=
github.com/loft-sh/utils v0.0.30/go.mod h1:HYzIQwi0vjQt7OmhYDl2z23Md1SNbPJQpw+jZuEM6LQ=
github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4=
github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo=
Expand Down
16 changes: 8 additions & 8 deletions pkg/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ type UpgradeOptions struct {
Password string
WorkDir string

Insecure bool
Atomic bool
Force bool
Debug bool
Insecure bool
RollbackOnFailure bool
ForceReplace bool
Debug bool
}

const (
Expand Down Expand Up @@ -162,11 +162,11 @@ func (c *client) run(ctx context.Context, name, namespace string, options Upgrad
}

// force
if options.Force {
args = append(args, "--force")
if options.ForceReplace {
args = append(args, "--force-replace")
}
if options.Atomic {
args = append(args, "--atomic")
if options.RollbackOnFailure {
args = append(args, "--rollback-on-failure")
}
if options.Debug {
args = append(args, "--debug")
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/helmdownloader/helm_downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func GetHelmBinaryPath(ctx context.Context, log log.BaseLogger) (string, error)
// test for helm
helmExecutablePath, err := exec.LookPath("helm")
if err != nil {
helmExecutablePath, err = downloader.NewDownloader(commands.NewHelmV3Command(), logger, constants.VClusterFolder).EnsureCommand(ctx)
helmExecutablePath, err = downloader.NewDownloader(commands.NewHelmV4Command(), logger, constants.VClusterFolder).EnsureCommand(ctx)
if err != nil {
return "", fmt.Errorf("error while installing helm: %w", err)
}
Expand Down
91 changes: 91 additions & 0 deletions vendor/github.com/loft-sh/utils/pkg/downloader/commands/helm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading