Skip to content

Conversation

AndiDog
Copy link
Contributor

@AndiDog AndiDog commented Oct 20, 2025

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 because helm 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 fix

User facing changes (remove if N/A)

  • Helm v2 won't work anymore
  • Helm v4 works now

Follow-up Work (remove if N/A)

  • I didn't change documentation yet. The PR is already large, so I'd like to check any Helm version hints in Skaffold docs later.
  • On arm64, I couldn't run make integration-in-kind and certain other targets. Maybe an integration smoke test for Helm v4 makes sense?

@AndiDog AndiDog requested a review from a team as a code owner October 20, 2025 20:17
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Helm v4 Support: Skaffold now supports Helm v4 for both rendering and deployment, addressing breaking changes in its post-renderer mechanism.
  • Helm v2 Deprecation: Support for Helm v2 rendering has been dropped due to the removal of the --client parameter in helm version in newer Helm versions.
  • Dynamic Helm Plugin Management: For Helm v4, Skaffold dynamically installs a temporary post-renderer plugin and cleans it up after use, bypassing the need for manual plugin registration.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

@AndiDog AndiDog force-pushed the helm-4-render-deploy branch 2 times, most recently from 8e8adb3 to 5031845 Compare October 20, 2025 21:16
// 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")
Copy link
Contributor

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.

Copy link
Contributor Author

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
@AndiDog AndiDog force-pushed the helm-4-render-deploy branch from 5031845 to e9c4a8d Compare October 21, 2025 18:45
@mattsanta
Copy link
Contributor

Could you address the failing checks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Helm v4 breaking change in helm template --post-renderer, Skaffold failing

2 participants