Skip to content

feat!: upgrade to Helm 4#4350

Merged
AustinAbro321 merged 124 commits into
mainfrom
helm-4
Mar 12, 2026
Merged

feat!: upgrade to Helm 4#4350
AustinAbro321 merged 124 commits into
mainfrom
helm-4

Conversation

@AustinAbro321
Copy link
Copy Markdown
Member

@AustinAbro321 AustinAbro321 commented Nov 7, 2025

Description

User facing changes:

  • Helm 4 brings Server Side Apply. If it is a first time chart install then server side apply will be used by default. Upgrades default to the apply method that was used in the latest release. To control the apply method for a specific packaged chart, a new field .Charts[x].ServerSideApply has been introduced with possible values true, false, auto . Auto will follow the default Helm behavior.
    • A good example of how this could effect some charts can be seen in the init package registry deployment. Server side apply caught that replicas were set even when they were controlled by the autoscaler, which led to a conflict error. To solve this we conditionally set replicas when the autoscaler is not enabled.
    • SSA enforces stricter field validation, if a field does not pass schema validation, you will receive an error instead of a warning.
  • Helm now uses slog style logging.
  • zarf tools helm is now a true copy of the Helm CLI. Previously, this command was a quasi fork of a subset of the Helm CLI and was not updated automatically. Zarf maintainer contributed to make this functionality possible #13617
  • Helm's now uses kstatus as a backend for it's wait logic, since Zarf already used kstatus post Helm install the wait logic will be near identical to earlier Zarf versions. Zarf maintainers contributed this functionality to Helm in #13604

We will have to be very careful about merging this as there may be impacts to charts that we do not test for in the migration from Helm 3 to Helm 4. We want the experience to be seamless for users. I intend to make a R.C. release from this branch before merging into main.

Note that vendoring in the entirety of Helm instead of the current quasi fork bring binary size up about 5MB from 173M on main to 178M on this branch

Something interesting is that server side apply default to true during new installs, but "auto" during upgrades and rollbacks meaning that existing charts will use the existing strategy. I decided to add a new addition to the schema, serverSideApply, which accepts the field "true", "false", and "auto".

Related Issue

Fixes #2818
Fixes #2756
Fixes #4437

Checklist before merging

Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 7, 2025

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 4df00da
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/69b2a9a2499b82000846314c

Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 26.69173% with 195 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/internal/packager/helm/chart.go 1.17% 84 Missing ⚠️
src/internal/packager/helm/template.go 43.75% 15 Missing and 3 partials ⚠️
src/internal/packager/helm/repo.go 40.00% 15 Missing ⚠️
src/internal/packager/helm/common.go 40.90% 12 Missing and 1 partial ⚠️
src/internal/packager/helm/zarf.go 0.00% 11 Missing ⚠️
src/api/v1alpha1/component.go 0.00% 10 Missing ⚠️
src/cmd/helm.go 25.00% 7 Missing and 2 partials ⚠️
src/internal/packager/helm/destroy.go 0.00% 9 Missing ⚠️
src/pkg/packager/inspect.go 22.22% 6 Missing and 1 partial ⚠️
src/internal/packager/helm/post-render.go 0.00% 5 Missing ⚠️
... and 9 more
Files with missing lines Coverage Δ
src/pkg/packager/find_images.go 56.61% <100.00%> (ø)
src/cmd/initialize.go 26.64% <50.00%> (+0.44%) ⬆️
src/cmd/internal.go 34.49% <0.00%> (ø)
src/cmd/package.go 37.66% <50.00%> (+0.01%) ⬆️
src/cmd/zarf_tools.go 32.73% <50.00%> (+0.06%) ⬆️
src/pkg/packager/layout/assemble.go 43.26% <80.00%> (ø)
src/pkg/packager/remove.go 0.00% <0.00%> (ø)
src/internal/packager/helm/images.go 79.16% <71.42%> (ø)
src/pkg/cluster/zarf.go 20.15% <90.47%> (+2.94%) ⬆️
src/pkg/packager/deploy.go 0.00% <0.00%> (ø)
... and 10 more

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
@AustinAbro321 AustinAbro321 changed the title Helm 4 feat: upgrade to Helm 4 Nov 12, 2025
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
@AustinAbro321 AustinAbro321 mentioned this pull request Dec 2, 2025
2 tasks
Comment thread src/cmd/helm.go Outdated
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Copy link
Copy Markdown
Member

@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

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

Review nearly complete - working through the internals

Comment thread src/test/e2e/25_helm_test.go
Comment thread src/api/v1alpha1/component.go Outdated
Comment thread src/internal/packager/helm/template.go
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
brandtkeller
brandtkeller previously approved these changes Mar 11, 2026
Copy link
Copy Markdown
Member

@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

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

lgtm. I tested a variety of expected/edge cases and I think the handling of new install versus upgrades and the permutations between both is done well.

Signed-off-by: Austin Abro <[email protected]>
@AustinAbro321 AustinAbro321 added this pull request to the merge queue Mar 12, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 12, 2026
@AustinAbro321 AustinAbro321 added this pull request to the merge queue Mar 12, 2026
Merged via the queue into main with commit 505d1df Mar 12, 2026
42 checks passed
@AustinAbro321 AustinAbro321 deleted the helm-4 branch March 12, 2026 13:50
@github-project-automation github-project-automation Bot moved this from In progress to Done in Zarf Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Upgrade to Helm 4 Refactor helm embedding when Helm 4 is available Helm tool ignores errors

4 participants