-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Description
What happened?
When running kustomize build --enable-helm with Helm v4.0.0 installed, the command fails with an error about an unknown flag.
Error message:
Error: Error: unknown shorthand flag: 'c' in -c
: unable to run: 'helm version -c --short' with env=[HELM_CONFIG_HOME=/tmp/kustomize-helm-1488621679/helm HELM_CACHE_HOME=/tmp/kustomize-helm-1488621679/helm/.cache HELM_DATA_HOME=/tmp/kustomize-helm-1488621679/helm/.data] (is 'helm' installed?): exit status 1
This prevents kustomize from working with Helm v4.
Here is additional contexts:
- Helm v4.0.0 was released yesterday: https://github.com/helm/helm/releases/tag/v4.0.0. The full changelog is included in https://helm.sh/docs/changelog
- The
-c/--clientflag was removed in a PR: chore: remove helm version--clientoption helm/helm#31301
What did you expect to happen?
The kustomize build --enable-helm command should work with Helm v4.0.0.
How can we reproduce it (as minimally and precisely as possible)?
Prerequisites
- Install Helm v4.0.0
- Install kustomize v5.8.0
Reproduction steps
1. Create a test kustomization.yaml:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
helmCharts:
- name: nginx
repo: https://charts.bitnami.com/bitnami
version: 18.2.6
releaseName: test-nginx
namespace: default
includeCRDs: false
valuesInline:
replicaCount: 12. Ensure Helm v4 is in PATH:
$ helm version
version.BuildInfo{Version:"v4.0.0", GitCommit:"99cd1964357c793351be481d55abbe21c6b2f4ec", GitTreeState:"clean", GoVersion:"go1.25.3", KubeClientVersion:"v1.34"}3. Run kustomize with --enable-helm:
$ kustomize build . --enable-helmExpected output
apiVersion: v1
automountServiceAccountToken: false
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/instance: test-nginx
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: nginx
app.kubernetes.io/version: 1.27.3
helm.sh/chart: nginx-18.2.6
name: test-nginx
namespace: default
---
apiVersion: v1
kind: Secret
metadata:
labels:
app.kubernetes.io/instance: test-nginx
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: nginx
app.kubernetes.io/version: 1.27.3
helm.sh/chart: nginx-18.2.6
name: test-nginx-tls
namespace: default
type: kubernetes.io/tls
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/instance: test-nginx
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: nginx
app.kubernetes.io/version: 1.27.3
helm.sh/chart: nginx-18.2.6
name: test-nginx
namespace: default
spec:
# ... (service configuration)
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/instance: test-nginx
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: nginx
app.kubernetes.io/version: 1.27.3
helm.sh/chart: nginx-18.2.6
name: test-nginx
namespace: default
spec:
# ... (deployment configuration)
---
# ... (additional resources: PodDisruptionBudget, NetworkPolicy, etc.)Actual output
Error: Error: unknown shorthand flag: 'c' in -c
: unable to run: 'helm version -c --short' with env=[HELM_CONFIG_HOME=/tmp/kustomize-helm-1488621679/helm HELM_CACHE_HOME=/tmp/kustomize-helm-1488621679/helm/.cache HELM_DATA_HOME=/tmp/kustomize-helm-1488621679/helm/.data] (is 'helm' installed?): exit status 1
Kustomize version
v5.8.0
Operating system
Linux
nimjor, erikgb, snorwin, tcaddy, hmilkovi and 25 more
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.