-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix(rendered): Pass helm legacy deploy flags to render config #9682
base: main
Are you sure you want to change the base?
Conversation
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.
Hi team,
I'm currently reviewing this pull request and will provide my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly understand the changes:
This pull request addresses issue #9681. The goal is to fix an issue where Skaffold wasn't passing legacy Helm deploy flags during the rendering process. Specifically, the global
flag in Helm, which is intended to pass additional flags to every command, was not being correctly handled.
Changes:
- The primary change is in
pkg/skaffold/runner/renderer.go
. The code was modified to include thep.Deploy.LegacyHelmDeploy.Flags
in thelatest.RenderConfig
for Helm. This ensures that legacy Helm deploy flags are now passed correctly during rendering. The relevant lines are 67-73, where theFlags
field was added to thelatest.Helm
struct within theRenderConfig
.
--- a/pkg/skaffold/runner/renderer.go
+++ b/pkg/skaffold/runner/renderer.go
@@ -67,6 +67,7 @@ func GetRenderer(ctx context.Context, runCtx *runcontext.RunContext, hydrationDi
rCfg := latest.RenderConfig{
Generate: latest.Generate{
Helm: &latest.Helm{
+ Flags: p.Deploy.LegacyHelmDeploy.Flags,
Releases: legacyHelmReleases,
},
},
In short: This PR ensures that Skaffold correctly handles legacy Helm deploy flags, fixing a discrepancy in how the global
flag was being applied during the rendering stage.
A little haiku to lighten the mood:
Flags now take flight,
Rendering's path made clear and bright,
Skaffold's code takes flight.
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.
This pull request addresses issue #9681 by passing Helm legacy deploy flags to the render configuration. This ensures that global flags specified in the skaffold.yaml
are also applied during the rendering process. The change looks correct and straightforward. However, it would be beneficial to add a unit test to verify the change and update the documentation to reflect this new behavior.
I've summarized the style guide elements I referenced below:
- Go Code Review Comments: While there wasn't a specific style guide provided, I referenced general Go best practices and the Effective Go document when suggesting improvements.
I recommend addressing the documentation and testing suggestions before merging this PR.
Signed-off-by: Suleiman Dibirov <[email protected]>
Fixes: #9681
Description
The helm's flag 'global' says additional flags passed on every command https://skaffold.dev/docs/references/yaml/?version=v4beta12#manifests-helm-flags-global, but skaffold doesn't pass while rendering, fixed it