-
Notifications
You must be signed in to change notification settings - Fork 15
Upgrade to Helm v4 #381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Upgrade to Helm v4 #381
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
8882093 to
8bb417b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades cmctl from Helm v3 to Helm v4, addressing breaking changes introduced in the new version. The most significant change is that Helm v4 releases are now immutable, requiring a complete rewrite of the "safe uninstall" functionality that was introduced in PR #13.
Key changes:
- Updates Helm dependency from v3.19.4 to v4.0.4
- Rewrites CRD annotation logic to modify CRDs directly via Kubernetes API instead of modifying the Helm release manifest
- Migrates to Helm v4's new Accessor API pattern for accessing release and chart metadata
- Replaces deprecated Wait/Atomic/DryRun flags with new WaitStrategy, RollbackOnFailure, and DryRunStrategy patterns
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Updates Helm dependency to v4.0.4 and adds new transitive dependencies |
| go.sum | Updates checksums for Helm v4 and its new dependencies |
| pkg/uninstall/uninstall.go | Rewrites addCRDAnnotations to modify CRDs directly using dynamic client instead of modifying release manifest; migrates to WaitStrategy and Accessor APIs |
| pkg/install/install.go | Migrates to Helm v4 chart and release Accessor APIs; replaces DryRun/Wait/Atomic flags with new DryRunStrategy/WaitStrategy/RollbackOnFailure patterns |
| pkg/install/util.go | Updates Helm import paths to v4 |
| pkg/install/helm/settings.go | Removes logger callback from ActionConfiguration.Init (no longer supported in v4) |
| pkg/install/helm/resource.go | Updates Helm import path to v4 |
| pkg/install/helm/applycrd.go | Migrates to WaitStrategy pattern using GetWaiter method |
| test/integration/ctl_uninstall_test.go | Updates expected test output to match new uninstall behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e819bf6 to
ea0c881
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Erik Godding Boye <[email protected]>
Helm v4 contains quite a few breaking changes. In particular, releases are now immutable, forcing me to rewrite the "safe" uninstall introduced in #13.
I am not sure how to test these changes beyond what's covered by the integration tests run in CI. Any help in testing and verifying that this works as expected would be appreciated.