Skip to content

Commit 841dfd7

Browse files
committed
Migrate to Helm v4 SDK
Bump helm.sh/helm from v3 to v4 (v4.2.3) and adapt the provider to the Helm v4 SDK breaking changes: - Update all import paths from helm.sh/helm/v3 to helm.sh/helm/v4 - Upgrade k8s.io dependencies to v0.36.1 - Add compat_v4.go shims for chartutil and releaseutil packages removed in Helm v4 (ParseKubeVersion, SplitManifests, dependency conversion) - Add postrender_exec.go to preserve binary-path post-renderer support (postrender.NewExec was removed in Helm v4) - Adapt action fields: * Wait bool -> WaitStrategy (kube.WaitStrategy) * WaitForJobs -> handled by StatusWatcherStrategy * Atomic -> RollbackOnFailure * Force/ForceUpdate -> ForceReplace * DryRun -> DryRunStrategy * ClientOnly -> DryRunStrategy * Remove Recreate (removed in Helm v4) - Type-assert loader.Load results (chart.Charter) to *v2.Chart - Type-assert Run() results (release.Releaser) to *v1.Release - actionConfig.Init no longer accepts a logging callback - Update test helpers (kube.GetConfig -> ConfigFlags, StatusDeployed -> release/common) and status action fields - Add CHANGELOG entry for the Helm v4 migration Fixes #1730 and #1792
1 parent a4f1c1d commit 841dfd7

11 files changed

Lines changed: 672 additions & 405 deletions

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## Unreleased
2+
3+
BREAKING CHANGES:
4+
5+
* Migrate from Helm v3 SDK (`helm.sh/helm/v3`) to Helm v4 SDK (`helm.sh/helm/v4`) [[GH-1730](https://github.com/hashicorp/terraform-provider-helm/issues/1730)]
6+
* The bundled Helm engine is now Helm v4. This brings server-side apply as the default behavior, chart pinning by digest, multi-document YAML values support, and other Helm v4 changes.
7+
* `postrender` now uses Helm v4 post-renderer plugin semantics; arbitrary executables via `binary_path` are still supported through a compatibility layer but are deprecated.
8+
* The `wait` and `wait_for_jobs` attributes are now handled through Helm v4's wait strategy.
9+
* `recreate_pods` is no longer supported (removed in Helm v4).
10+
111
## 3.2.0 (June 4, 2026)
212

313
ENHANCEMENT:

go.mod

Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/hashicorp/terraform-provider-helm
22

3-
go 1.25.8
3+
go 1.26.0
44

55
require (
66
github.com/hashicorp/go-version v1.9.0
@@ -14,16 +14,16 @@ require (
1414
github.com/mitchellh/go-homedir v1.1.0
1515
github.com/pkg/errors v0.9.1
1616
github.com/stretchr/testify v1.11.1
17-
helm.sh/helm/v3 v3.20.2
18-
k8s.io/api v0.35.1
19-
k8s.io/apimachinery v0.35.1
20-
k8s.io/cli-runtime v0.35.1
21-
k8s.io/client-go v0.35.1
17+
helm.sh/helm/v4 v4.2.3
18+
k8s.io/api v0.36.1
19+
k8s.io/apimachinery v0.36.1
20+
k8s.io/cli-runtime v0.36.1
21+
k8s.io/client-go v0.36.1
2222
k8s.io/helm v2.17.0+incompatible
2323
k8s.io/klog v1.0.0
24-
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
25-
k8s.io/kubectl v0.35.1
26-
sigs.k8s.io/structured-merge-diff/v6 v6.3.0
24+
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a
25+
k8s.io/kubectl v0.36.1
26+
sigs.k8s.io/structured-merge-diff/v6 v6.3.2
2727
sigs.k8s.io/yaml v1.6.0
2828
)
2929

@@ -40,7 +40,7 @@ require (
4040
github.com/BurntSushi/toml v1.6.0 // indirect
4141
github.com/MakeNowJust/heredoc v1.0.0 // indirect
4242
github.com/Masterminds/goutils v1.1.1 // indirect
43-
github.com/Masterminds/semver/v3 v3.4.0 // indirect
43+
github.com/Masterminds/semver/v3 v3.5.0 // indirect
4444
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
4545
github.com/Masterminds/squirrel v1.5.4 // indirect
4646
github.com/ProtonMail/go-crypto v1.4.1 // indirect
@@ -52,33 +52,32 @@ require (
5252
github.com/blang/semver/v4 v4.0.0 // indirect
5353
github.com/chai2010/gettext-go v1.0.2 // indirect
5454
github.com/cloudflare/circl v1.6.3 // indirect
55-
github.com/containerd/containerd v1.7.30 // indirect
56-
github.com/containerd/errdefs v0.3.0 // indirect
57-
github.com/containerd/log v0.1.0 // indirect
58-
github.com/containerd/platforms v0.2.1 // indirect
5955
github.com/cyphar/filepath-securejoin v0.6.1 // indirect
6056
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
61-
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
62-
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
57+
github.com/dylibso/observe-sdk/go v0.0.0-20240819160327-2d926c5d788a // indirect
58+
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
59+
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
6360
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
61+
github.com/extism/go-sdk v1.7.1 // indirect
6462
github.com/fatih/camelcase v1.0.0 // indirect
65-
github.com/fatih/color v1.16.0 // indirect
63+
github.com/fatih/color v1.19.0 // indirect
64+
github.com/fluxcd/cli-utils v1.2.1 // indirect
6665
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
6766
github.com/ghodss/yaml v1.0.0 // indirect
68-
github.com/go-errors/errors v1.4.2 // indirect
67+
github.com/go-errors/errors v1.5.1 // indirect
6968
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
7069
github.com/go-logr/logr v1.4.3 // indirect
71-
github.com/go-openapi/jsonpointer v0.21.0 // indirect
72-
github.com/go-openapi/jsonreference v0.20.2 // indirect
73-
github.com/go-openapi/swag v0.23.0 // indirect
70+
github.com/go-openapi/jsonpointer v0.21.1 // indirect
71+
github.com/go-openapi/jsonreference v0.21.0 // indirect
72+
github.com/go-openapi/swag v0.23.1 // indirect
7473
github.com/gobwas/glob v0.2.3 // indirect
74+
github.com/gofrs/flock v0.13.0 // indirect
7575
github.com/golang/protobuf v1.5.4 // indirect
7676
github.com/google/btree v1.1.3 // indirect
7777
github.com/google/gnostic-models v0.7.0 // indirect
7878
github.com/google/go-cmp v0.7.0 // indirect
7979
github.com/google/uuid v1.6.0 // indirect
8080
github.com/gosuri/uitable v0.0.4 // indirect
81-
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
8281
github.com/hashicorp/errwrap v1.1.0 // indirect
8382
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
8483
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
@@ -98,18 +97,18 @@ require (
9897
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
9998
github.com/hashicorp/yamux v0.1.2 // indirect
10099
github.com/huandu/xstrings v1.5.0 // indirect
100+
github.com/ianlancetaylor/demangle v0.0.0-20240805132620-81f5be970eca // indirect
101101
github.com/inconshreveable/mousetrap v1.1.0 // indirect
102102
github.com/jmoiron/sqlx v1.4.0 // indirect
103103
github.com/jonboulle/clockwork v0.5.0 // indirect
104104
github.com/josharian/intern v1.0.0 // indirect
105105
github.com/json-iterator/go v1.1.12 // indirect
106-
github.com/klauspost/compress v1.18.0 // indirect
107106
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
108107
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
109-
github.com/lib/pq v1.10.9 // indirect
108+
github.com/lib/pq v1.12.3 // indirect
110109
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
111-
github.com/mailru/easyjson v0.7.7 // indirect
112-
github.com/mattn/go-colorable v0.1.13 // indirect
110+
github.com/mailru/easyjson v0.9.0 // indirect
111+
github.com/mattn/go-colorable v0.1.14 // indirect
113112
github.com/mattn/go-isatty v0.0.20 // indirect
114113
github.com/mattn/go-runewidth v0.0.13 // indirect
115114
github.com/mitchellh/copystructure v1.2.0 // indirect
@@ -132,10 +131,11 @@ require (
132131
github.com/russross/blackfriday/v2 v2.1.0 // indirect
133132
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
134133
github.com/shopspring/decimal v1.4.0 // indirect
135-
github.com/sirupsen/logrus v1.9.3 // indirect
136134
github.com/spf13/cast v1.7.0 // indirect
137135
github.com/spf13/cobra v1.10.2 // indirect
138136
github.com/spf13/pflag v1.0.10 // indirect
137+
github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 // indirect
138+
github.com/tetratelabs/wazero v1.12.0 // indirect
139139
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
140140
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
141141
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
@@ -145,36 +145,38 @@ require (
145145
github.com/yuin/goldmark-meta v1.1.0 // indirect
146146
github.com/zclconf/go-cty v1.16.2 // indirect
147147
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
148+
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
148149
go.yaml.in/yaml/v2 v2.4.3 // indirect
149150
go.yaml.in/yaml/v3 v3.0.4 // indirect
150-
golang.org/x/crypto v0.49.0 // indirect
151-
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
152-
golang.org/x/mod v0.35.0 // indirect
153-
golang.org/x/net v0.52.0 // indirect
154-
golang.org/x/oauth2 v0.34.0 // indirect
155-
golang.org/x/sync v0.20.0 // indirect
156-
golang.org/x/sys v0.42.0 // indirect
157-
golang.org/x/term v0.41.0 // indirect
158-
golang.org/x/text v0.35.0 // indirect
159-
golang.org/x/time v0.12.0 // indirect
160-
golang.org/x/tools v0.43.0 // indirect
151+
golang.org/x/crypto v0.54.0 // indirect
152+
golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 // indirect
153+
golang.org/x/mod v0.37.0 // indirect
154+
golang.org/x/net v0.56.0 // indirect
155+
golang.org/x/oauth2 v0.36.0 // indirect
156+
golang.org/x/sync v0.22.0 // indirect
157+
golang.org/x/sys v0.47.0 // indirect
158+
golang.org/x/term v0.45.0 // indirect
159+
golang.org/x/text v0.40.0 // indirect
160+
golang.org/x/time v0.15.0 // indirect
161+
golang.org/x/tools v0.47.0 // indirect
161162
google.golang.org/appengine v1.6.8 // indirect
162-
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
163-
google.golang.org/grpc v1.79.3 // indirect
164-
google.golang.org/protobuf v1.36.10 // indirect
163+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 // indirect
164+
google.golang.org/grpc v1.80.0 // indirect
165+
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect
165166
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
166167
gopkg.in/inf.v0 v0.9.1 // indirect
167168
gopkg.in/yaml.v2 v2.4.0 // indirect
168169
gopkg.in/yaml.v3 v3.0.1 // indirect
169-
k8s.io/apiextensions-apiserver v0.35.1 // indirect
170-
k8s.io/apiserver v0.35.1 // indirect
171-
k8s.io/component-base v0.35.1 // indirect
172-
k8s.io/component-helpers v0.35.1 // indirect
173-
k8s.io/klog/v2 v2.130.1 // indirect
174-
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect
175-
oras.land/oras-go/v2 v2.6.0 // indirect
170+
k8s.io/apiextensions-apiserver v0.36.1 // indirect
171+
k8s.io/apiserver v0.36.1 // indirect
172+
k8s.io/component-base v0.36.1 // indirect
173+
k8s.io/component-helpers v0.36.1 // indirect
174+
k8s.io/klog/v2 v2.140.0 // indirect
175+
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect
176+
oras.land/oras-go/v2 v2.6.1 // indirect
177+
sigs.k8s.io/controller-runtime v0.24.1 // indirect
176178
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
177-
sigs.k8s.io/kustomize/api v0.20.1 // indirect
178-
sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect
179+
sigs.k8s.io/kustomize/api v0.21.1 // indirect
180+
sigs.k8s.io/kustomize/kyaml v0.21.1 // indirect
179181
sigs.k8s.io/randfill v1.0.0 // indirect
180182
)

0 commit comments

Comments
 (0)