Conversation
HelmApplication and HelmClusterAddon take spec.timeout, shaped like the flux HelmRelease field and bounded to above zero and at most 2h, and pass it to the internal HelmRelease, including while the release is being deleted so a stuck uninstall can be given more time. Signed-off-by: Ilya Drey <ilya.drey@flant.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HelmApplicationandHelmClusterAddonnow takespec.timeout, the time to wait for any individual Kubernetes operation (like Jobs for hooks) during a Helm action. It is passed as is tospec.timeoutof the internalHelmRelease, which helm-controller uses as the default for every action — install, upgrade, uninstall, rollback and test.Why
The timeout was fixed at helm-controller's default of 5m, so a chart whose hooks or rollout take longer could not be installed, upgraded or removed through the module at all.
Key changes
API —
api/v1alpha1/helm_application.go,api/v1alpha1/helm_cluster_addon.goHelmReleaseone:*metav1.Duration, a string with the same duration pattern, optional.0s) and at most2h.HelmReleasefield unset and helm-controller's default applies, so the value can be changed later without every stored object carrying the old one. The description states the current default of 5m.Controller —
internal/source/release.go,internal/adapter/*_release.go,internal/services/release_service.gosource.ReleasegainsTimeout(), read by both adapters.applyHelmReleaseSpecsets it on every pass, so removing it from the spec removes it from theHelmReleasetoo.SyncReleaseSpecsets it while the release is being deleted: the timeout bounds the uninstall, and raising it is how a stuck uninstall is let through.Review focus / risks
release_service_test.go). The CEL rules were checked against the generated CRDs with theapiextensions-apiserverv0.35.1 validator — the CRDs pass admission validation, including the CEL cost estimate, and values such as0s,0.0s,2h0m1s,121mare rejected while1ms,1.5h,2hare accepted. Neither the rules nor the rollout has been run on a live cluster.HelmReleasespec and generation. I expect helm-controller to apply the new value to the next action without an upgrade of its own, since chart and values are unchanged, but this is not verified.🤖 Generated with Claude Code