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
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.
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
…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? |
|
@mattsanta Tests look green now. I had to introduce another test-related override variable to ensure that no real |
|
@mattsanta now that Helm v4 is officially released, can Skaffold also be released? |
|
Yep, working on it. @AndiDog |
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 versiondoesn't support--clientas 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_NAMEcall 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-kindand certain other targets. Maybe an integration smoke test for Helm v4 makes sense?