What Is New in Helm 4.2
Helm 4.2 is a feature release that builds on the foundation of Helm 4.0's major changes -- Server Side Apply, improved security, and chart distribution improvements -- with a focused set of developer experience improvements, templating fixes, and dependency upgrades.
| Category | Highlights |
|---|---|
| New Features |
Added mustToToml template function; experimental --chart-api-version flag for chart v3 scaffolding; internal/release/v2 package for chart v3 support; fine-grained context options for kstatus waiting; loong64 architecture support added to release binaries
|
| Improvements |
Switched release build toolchain from mitchellh/gox to goreleaser; Kubernetes client libraries bumped to v1.36; Go upgraded to 1.26; kstatus upgraded to 1.2; --dry-run=server now respects generateName:; improved SSA patch error messages; decoupled EnvSettings from pkg/kube to avoid import cycles; debug logging added to HTTP getter for helm pull
|
| Bug Fixes |
Fixed hooks conflicting with templates in post-renderers; fixed wrong YAML separator parsing for post-renderers; fixed SplitManifests not preserving line endings for downstream YAML parsers; fixed nil values not being preserved in subchart coalescing; fixed chart dot-name path bug; fixed OCI digest algorithm prefix handling in chart downloader; fixed pulling charts from OCI indices; fixed rollback for missing resources; fixed plugin version path traversal and missing provenance bypass; fixed concurrent file writes on Windows in downloader; fixed --atomic flag missing from install command; fixed storage driver not getting logger; fixed kstatus waiting forever on failed resources; fixed newline insertion after doc separators when template trimming is used
|
| Deprecations |
--hide-notes and --render-subchart-notes flags on helm template are now deprecated and will be removed in a future version
|
What templating and YAML rendering issues were fixed in Helm 4.2?
Helm 4.2 ships a cluster of critical templating fixes that affect post-renderer pipelines and YAML manifest generation. In practice, these bugs were easy to miss locally but surfaced reliably in production CI/CD pipelines where post-renderers are common.
- Hooks conflicting with templates in post-renderers: Hooks were incorrectly mixed with regular templates when passed through post-renderers, causing unpredictable rendering output. This is now resolved.
- Wrong YAML separator parsing: Post-renderers received malformed multi-document YAML due to incorrect
---separator detection. Fixed. - Line ending preservation in
SplitManifests: Downstream YAML parsers (including external post-renderers and tools like Kustomize) could choke on manifests with stripped line endings. Helm now preserves them correctly. - Newline after doc separators: Template trimming (using
{{-or-}}) could glue a---separator directly to the following content, producing invalid YAML. A newline is now inserted automatically.
Watch out for these fixes if you are running custom post-renderers -- validate your pipelines after upgrading, since the output may differ subtly from 4.1.x.
What is the new mustToToml template function and when should you use it?
Helm 4.2 adds mustToToml as a strict counterpart to the existing toToml function. Where toToml silently returns an empty string on error, mustToToml fails the render with an explicit error -- matching the same error-propagation pattern as mustToJson, mustFromJson, and similar functions in the Sprig family.
{{- $config := dict "host" "db.example.com" "port" 5432 -}}
{{ mustToToml $config }}
This matters if you are using TOML to generate application config files inside your chart templates and need rendering failures to surface immediately rather than deploying silently broken configuration. Most teams generating structured config should prefer mustToToml over toToml going forward.
How does Helm 4.2 improve --dry-run=server behavior with generateName?
Prior to 4.2, using --dry-run=server with resources that had generateName: set instead of name: would skip those objects silently -- the server-side validation pass simply skipped nameless resources. This was a long-standing gap where a dry run could pass cleanly for resources that would fail or behave unexpectedly on actual install.
apiVersion: batch/v1
kind: Job
metadata:
generateName: migration-
spec:
template:
spec:
containers:
- name: migrate
image: myapp:latest
In 4.2, --dry-run=server now correctly handles resources using generateName:, making server-side dry runs more representative of actual cluster behavior. This is particularly relevant for Jobs, Pods, and any CRD-based resources that rely on Kubernetes name generation.
What changed in Helm 4.2's build toolchain and dependency stack?
Helm 4.2 replaces the long-used mitchellh/gox cross-compilation tool with goreleaser for all release builds. This is an infrastructure change with no user-facing impact on behavior, but it improves build reproducibility, archive naming consistency, and adds official loong64 (Loongson architecture) binary support to the release matrix.
On the dependency side, this release includes significant upstream bumps:
- Go upgraded to 1.26
- Kubernetes client libraries to v1.36 -- required for compatibility with clusters running Kubernetes 1.36+
- kstatus upgraded to 1.2 and controller-runtime to 0.24
- Various security-relevant dependency bumps:
golang.org/x/crypto,go.opentelemetry.io/otel(GO-2026-4394),cloudflare/circl,ProtonMail/go-crypto
In practice, the Kubernetes client bump to v1.36 is the most operationally relevant. If you are building tooling or plugins that embed Helm as a library, plan for the module upgrade path.
What subchart value coalescing bugs were fixed in Helm 4.2?
Helm 4.2 fixes two related but distinct bugs in how nil values propagate through subchart value coalescing -- an area that has historically been a source of subtle, hard-to-diagnose rendering issues.
- Chart-default nils copied into coalesced values: When a parent chart overrides a subchart value with a map, nil entries from the chart's own defaults were incorrectly included in the coalesced result. This could cause
%!s(<nil>)rendering artifacts in templates. - Nil values not preserved when chart default is an empty map: Explicitly set nil values from parent overrides were being dropped when the subchart's default was an empty map, causing unexpected fallback behavior.
This matters if your charts use nullable values as a feature -- for example, optional database connection blocks that render nothing when nil. Validate coalescing behavior after upgrading if your chart hierarchy is complex.
Frequently Asked Questions about Helm 4.2
Is upgrading from Helm 4.1 to 4.2 safe for production clusters?
Yes, Helm 4.2 is a backward-compatible feature release. No breaking changes were introduced relative to 4.1, though you should validate post-renderer pipelines and subchart value coalescing if your charts rely on those behaviors.
Does --dry-run=server now fully simulate generateName resources in Helm 4.2?
Yes, the fix in 4.2 means that resources using generateName are no longer silently skipped during server-side dry runs, making the validation pass more accurate.
What is the difference between mustToToml and toToml in Helm 4.2?
mustToToml fails the render with an explicit error if conversion fails, while toToml silently returns an empty string. Use mustToToml when generating config files where a silent failure would be worse than a hard stop.
Are the --hide-notes and --render-subchart-notes flags removed in Helm 4.2?
No, they are deprecated but not yet removed. They will emit a deprecation warning when used and will be removed in a future release.
Do I need to update my charts to take advantage of the chart v3 format support added in Helm 4.2?
Not yet. The internal/release/v2 package and the experimental --chart-api-version flag lay groundwork for chart format v3, but the feature is gated behind the HELM_EXPERIMENTAL_CHART_V3 environment variable and is not ready for production use in this release.
Does Helm 4.2 support Kubernetes 1.36?
Yes, the Kubernetes client libraries were bumped to v1.36 in this release, adding full compatibility with Kubernetes 1.36 clusters.