-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix helm valuesInline merge failure when types differ #6026
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: master
Are you sure you want to change the base?
Fix helm valuesInline merge failure when types differ #6026
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: denysvitali 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 |
|
|
|
Welcome @denysvitali! |
|
Hi @denysvitali. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
0f91d1c to
abe83c3
Compare
|
/retest |
|
@denysvitali: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
When using valuesInline with helm charts, kustomize would fail with
"wrong node kind" errors when the chart's values.yaml had a different
type than what the user provided. For example:
- Chart has `topologySpreadConstraints: {}` but user provides a list
- Chart has `githubConfigSecret: {github_token: ""}` but user provides
a string
This adds an AllowKindChange option to MergeOptions that allows the
source value to completely replace the destination when their YAML
node kinds differ (e.g., map vs list, map vs scalar).
The HelmChartInflationGenerator now enables this option when merging
values, fixing the regression introduced in kustomize 5.4.0.
Fixes kubernetes-sigs#5766
Fixes actions/actions-runner-controller#3819
abe83c3 to
3a8f63c
Compare
Warning
All the code was generated by Opus 4.5 - but it's remarkably good!
When using valuesInline with helm charts, kustomize would fail with "wrong node kind" errors when the chart's values.yaml had a different type than what the user provided. For example:
topologySpreadConstraints: {}but user provides a listgithubConfigSecret: {github_token: ""}but user provides a stringThis adds an AllowKindChange option to MergeOptions that allows the source value to completely replace the destination when their YAML node kinds differ (e.g., map vs list, map vs scalar).
The HelmChartInflationGenerator now enables this option when merging values, fixing the regression introduced in kustomize 5.4.0.
Fixes #5766 and actions/actions-runner-controller#3819