-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(helm): Support Helm v4 for rendering and deployment, drop Helm v2 support for rendering since helm version --client
parameter is not supported anymore in v4
#9892
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?
Conversation
Summary of ChangesHello @AndiDog, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates Skaffold's Helm integration to be compatible with Helm v4, which introduced significant changes to how post-renderers are handled. It also removes support for older Helm v2 versions, streamlining the codebase and ensuring compatibility with modern Helm practices. The core change involves adapting Skaffold to manage Helm v4's new plugin-based post-renderer system on the fly, ensuring a smooth user experience without requiring manual plugin installation. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces support for Helm v4 by adapting to its new post-renderer plugin system, and as a consequence, drops support for Helm v2. The changes are well-structured, with the new logic for handling Helm v4 plugins encapsulated in PreparePostRenderer
. The codebase is also improved by renaming variables for clarity (e.g., bV
to helmVersion
) and updating tests and documentation accordingly.
My review focuses on the new plugin handling logic. I've found a couple of issues in the implementation of the temporary plugin creation and cleanup that could lead to resource leaks or confusing error messages. I've also pointed out corresponding corrections needed in the test files. Overall, this is a great contribution to keep Skaffold up-to-date with the Helm ecosystem.
8e8adb3
to
5031845
Compare
pkg/skaffold/helm/bin.go
Outdated
// Helm4PostRendererVersion represents the version cut-off for Helm v4's | ||
// introduction of post-renderer plugins, not supporting | ||
// `--post-renderer <executable>` anymore | ||
var Helm4PostRendererVersion = semver.MustParse("4.0.0") |
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.
Need to update to v4.0.0-beta.1
otherwise it still won't work for the prerelease version.
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.
Done, thx
…2 support for rendering since `helm version --client` parameter is not supported anymore in v4
5031845
to
e9c4a8d
Compare
Could you address the failing checks? |
Fixes: #9871
Related: n/a
Merge before/after: n/a
Description
Using the Helm v4 prerelease builds doesn't work right now due to breaking changes in the post-renderer support. Instead of passing
--post-renderer /path/to/skaffold
, a plugin must be registered (see #9871). This PR supports Helm v4 by adding v3-vs-v4 distinction code. Along the way, since deployer code already needs a minimum of Helm v3.1, I drop support for Helm v2 in the render code becausehelm version
doesn't support--client
as parameter anymore.Since 1) multiple Skaffold binaries could be installed on a system, particularly development builds, and 2) package managers like homebrew won't require helm and install a post-renderer plugin manifest, I opted to instead have Skaffold do the needed
helm plugin install UNIQUE_PLUGIN_NAME
call on the fly (and clean up after every use).Minor stuff: consistent variable naming
helmVersion
, tiny docs typo fixUser facing changes (remove if N/A)
Follow-up Work (remove if N/A)
make integration-in-kind
and certain other targets. Maybe an integration smoke test for Helm v4 makes sense?