Skip to content

Add post-render strategy support and conditional defaults#1470

Merged
matheuscscp merged 1 commit intofluxcd:mainfrom
vocarista:enhancement/1469
Apr 24, 2026
Merged

Add post-render strategy support and conditional defaults#1470
matheuscscp merged 1 commit intofluxcd:mainfrom
vocarista:enhancement/1469

Conversation

@vocarista
Copy link
Copy Markdown
Contributor

@vocarista vocarista commented Apr 24, 2026

Fixes #1469

⚠️ Breaking change: From Flux 2.8.0 to 2.8.5 the default was combined (Helm 4 breaking change), then in Flux 2.8.6 we fixed the regression (changed the behavior to nohooks). In Flux 2.9 (through this PR) we are changing this default back to combined for honoring the feature gate UseHelm3Defaults, which defaults to the Helm 4 defaults when the gate is false, and to the Helm 3 defaults when the gate is true. We are sustaining our decision to keep aligned with Helm's defaults throughout Flux's and Helm's lives. This commitment implies shipping breaking changes whenever Helm changes default functionality in major versions.

The behavior can also be pinned to a specific value directly in the HelmRelease object through the field introduced in this PR.

Adds support for Helm's post-render strategies (nohooks, combined, separate) being introduced in Helm 4.2. The new spec.postRenderStrategy field allows users to configure how hooks are sent to post-renderers.

Changes:

  • Add PostRenderStrategy enum with values: nohooks, combined, separate
  • Add spec.postRenderStrategy field to HelmReleaseSpec
  • Add toHelmPostRenderStrategy() mapping function in action package
  • Update install and upgrade actions to use the configured strategy
  • Add unit tests for default behaviour and all strategy values

Default behavior:

  • Defaults to combined to align with upstream Helm
  • Respects UseHelm3Defaults feature gate by switching to nohooks when enabled

Copy link
Copy Markdown
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit, otherwise LGTM! 🚀

Comment thread internal/action/ssa.go Outdated
@matheuscscp
Copy link
Copy Markdown
Member

matheuscscp commented Apr 24, 2026

@vocarista Sorry, I forgot something very important, please add the field docs to docs/spec/v2/helmreleases.md 🙏

@matheuscscp
Copy link
Copy Markdown
Member

Then please squash the commits into one and force-push 🙏

@vocarista vocarista force-pushed the enhancement/1469 branch 2 times, most recently from 56c06b6 to 697a947 Compare April 24, 2026 17:58
@vocarista
Copy link
Copy Markdown
Contributor Author

Squashed 👾

@matheuscscp
Copy link
Copy Markdown
Member

@vocarista Can you please open a PR here too? https://github.com/fluxcd/website/blob/main/content/en/flux/components/helm/options.md?plain=1#L67

Then a second PR here (highlighting the breaking change):
https://github.com/fluxcd/website/blob/main/content/en/roadmap.md?plain=1#L41

They have to be two separate PRs because the second one will go live immediately

@vocarista
Copy link
Copy Markdown
Contributor Author

@matheuscscp I've opened the PRs on fluxcd/website

Comment thread internal/action/post_render.go
Signed-off-by: Kumar Piyush <kr.piyush888@gmail.com>
Assisted By: Cascade/SWE-1.6:
Copy link
Copy Markdown
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@vocarista Thanks very much!

@matheuscscp matheuscscp merged commit e40b60f into fluxcd:main Apr 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support all the post-render strategies available in the Helm SDK

3 participants