Repository navigation
Description
What happened?
Using Helm SDK v4.3.0 with HookOnlyStrategy, a fresh installation of kube-prometheus-stack intermittently failed with:
no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
The CRDs were available after the failure, and retrying succeeded.
In installCRDs(), Helm uses the install's WaitStrategy to wait for CRD registration. However, hookOnlyWaiter.Wait() immediately returns nil, allowing installation to continue before the CRDs are established.
A standalone SDK test using a simulated Kubernetes API reproduced this consistently: HookOnlyStrategy failed in 10/10 runs, while StatusWatcherStrategy passed in 10/10 runs. Both use the actual Helm waiters.
What did you expect to happen?
Helm should wait for CRDs installed from the chart's crds/ directory to become established before processing custom resources that depend on them, even when workload waiting is disabled.
For comparison:
Helm 3 waits for CRD establishment without checking the install's Wait flag:
https://github.com/helm/helm/blob/v3.19.0/pkg/action/install.go#L172-L176
Helm 4.3.0 selects the CRD waiter using i.WaitStrategy, then calls waiter.Wait(totalItems, 60*time.Second):
https://github.com/helm/helm/blob/v4.3.0/pkg/action/install.go#L221-L235
With HookOnlyStrategy, that Wait method immediately returns nil:
https://github.com/helm/helm/blob/v4.3.0/pkg/kube/statuswait.go#L289-L291
Is skipping this check with HookOnlyStrategy intentional, or is this a regression?
How can we reproduce it (as minimally and precisely as possible)?
Using Helm SDK v4.3.0:
- On a fresh cluster without the chart's CRDs, install a chart containing CRDs in its crds/ directory and custom resources that depend on them. Observed with kube-prometheus-stack 91.4.1.
- Set the install action's WaitStrategy to kube.HookOnlyStrategy.
- If CRD registration has not completed before Helm processes the custom resources, installation fails with:
no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
This is intermittent on a real cluster. Retrying after the CRDs become available succeeds.
To investigate the ordering, I also ran standalone SDK tests using a simulated Kubernetes API and unmodified Helm install and readiness implementations. The API initially reports Established=False, then provides Established=True through polling (Helm 3) or a watch event (Helm 4). Processing the custom resource before establishment causes the test to fail.
Results across 10 runs per configuration:
- Helm 3.19.0, Wait=false: 10/10 passed.
- Helm 3.19.0, Wait=true: 10/10 passed.
- Helm 4.3.0, HookOnlyStrategy: 10/10 failed.
- Helm 4.3.0, StatusWatcherStrategy: 10/10 passed.
With HookOnlyStrategy, no CRD list/watch requests occurred before Helm attempted to process the custom resource. With Helm 3, CRD readiness was polled even when Wait=false.
These are controlled SDK tests, not a standalone Helm CLI reproduction.
Relevant code:
- Helm 3's independent CRD wait:
https://github.com/helm/helm/blob/v3.19.0/pkg/action/install.go#L172-L176 - Helm 4 selects the CRD waiter using the install's WaitStrategy:
https://github.com/helm/helm/blob/v4.3.0/pkg/action/install.go#L221-L235 - HookOnlyStrategy's Wait method immediately returns nil:
https://github.com/helm/helm/blob/v4.3.0/pkg/kube/statuswait.go#L289-L291
Helm version
Helm Go SDK: helm.sh/helm/v4 v4.3.0
Kubernetes version
Client Version: v1.36.1
Kustomize Version: v5.8.1
Server Version: v1.37.0
Activity
banjoh commentedon Sep 21, 2026
@Boemeltrein thanks for raising this PR. Do you have a sample helm chart that can be used to reproduce this issue?
Boemeltrein commentedon Sep 21, 2026
It happened during the installation of this helm-release.
https://github.com/trueforge-org/clustertool/blob/main/embed/generic/kubernetes/observability/kube-prometheus-stack/app/helm-release.yaml
On a linux system it was ok, but on a windows system it was just to
quickso CRD's where not ready.AI made a complete script to test difference between Helm V3 and Helm V4.
Don't know if it was apricated to share that complete .zip file.
I can sent you that this evening if you want.
For now we change the deployment to --wait.
Maybe it is a correct behaviour change between v3 and v4, but though at least make the PR .
Boemeltrein commentedon Sep 21, 2026
helm3-helm4-crd-tests.zip
I've attached the standalone Helm 3 and Helm 4 SDK tests, including a README with instructions and the captured output.
Results over 10 runs per configuration:
The tests use unmodified Helm install and readiness implementations against a simulated Kubernetes API. They demonstrate the missing CRD wait, but are not a live-cluster reproduction.
Go 1.26+ is required; no Kubernetes cluster is needed. The Helm 4 test intentionally exits with code 1 because the hookOnly case fails the assertion.
fix(action): wait for CRD establishment under HookOnlyStrategy (#32672)
fix(action): wait for CRD establishment under HookOnlyStrategy (#32672)
fix(action): wait for CRD establishment under HookOnlyStrategy (helm#…