mirror of https://github.com/helm/helm
The Makefile LDFLAGS were pointing to an incorrect package path (helm.sh/helm/v4/pkg/chart/common/util) that doesn't exist, causing the k8sVersionMajor and k8sVersionMinor variables to silently fail to be set. This left the hardcoded defaults (1.20) in place. After this fix, `helm template` now correctly defaults to Kubernetes v1.34.0 (matching the bundled client-go version) instead of v1.20.0, ensuring charts render with current stable API versions. Testing scenario: ```sh cat > /tmp/test-chart/Chart.yaml << 'EOF' apiVersion: v2 name: test-chart version: 1.0.0 kubeVersion: ">= 1.28.0-0" EOF ./bin/helm template test-release /tmp/test-chart cat > /tmp/test-chart-fail/Chart.yaml << 'EOF' apiVersion: v2 name: test-chart-fail version: 1.0.0 kubeVersion: ">= 1.35.0-0" EOF ./bin/helm template test-release /tmp/test-chart-fail Exit code 1 Error: chart requires kubeVersion: >= 1.35.0-0 which is incompatible with Kubernetes v1.34.0 ``` Fixes #31508 Closes #31501 Closes #31502 Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>pull/31512/head
parent
51a9bc5157
commit
b6a8c65216
Loading…
Reference in new issue