Skip to content

Conversation

@hmilkovi
Copy link

This PR fixes Helm V4 issues.

Helm V4 is backward compatible with V3 helm charts and -c is not needed for V3 Helm (tested it).

This is fix for error I experience also #6013

Many thanks in advance for viewing this PR.

@k8s-ci-robot
Copy link
Contributor

Welcome @hmilkovi!

It looks like this is your first PR to kubernetes-sigs/kustomize 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kustomize has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 15, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 15, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @hmilkovi. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Nov 15, 2025
@k8s-ci-robot
Copy link
Contributor

This PR has multiple commits, and the default merge method is: merge.
You can request commits to be squashed using the label: tide/merge-method-squash

Details

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.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 15, 2025
@hmilkovi
Copy link
Author

hmilkovi commented Nov 15, 2025

I have changed tests to be done with V4. I was thinking if I should implement to run tests with both versions of Helm?

@koba1t
Copy link
Member

koba1t commented Nov 16, 2025

Considering that Helm v3 is likely installed in the environment, I believe we need code and tests that can support both v3 and v4 environments.

@koba1t
Copy link
Member

koba1t commented Nov 16, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 16, 2025
@koba1t
Copy link
Member

koba1t commented Nov 16, 2025

Helm V4 is backward compatible with V3 helm charts and -c is not needed for V3 Helm (tested it).

OK, I understand.
Please add tests for both v3 and v4 binaries.
This ensures backward compatibility in kustomize.

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 16, 2025
@hmilkovi
Copy link
Author

I agree as I didn't want to make it only Helm V4 as many people will still use V3 and that would be a breaking change.

I have added wrapper for Helm tests to be run for multiple versions in HelmChartInflationGenerator_test.go, example test logs:

--- PASS: TestHelmChartInflationGeneratorWithDebug (0.48s)
    --- PASS: TestHelmChartInflationGeneratorWithDebug/HelmV3 (0.24s)
    --- PASS: TestHelmChartInflationGeneratorWithDebug/HelmV4 (0.24s)

@hmilkovi
Copy link
Author

/retest

@hmilkovi
Copy link
Author

/retest-required

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hmilkovi, Skaronator
Once this PR has been reviewed and has the lgtm label, please assign varshaprasad96 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hmilkovi
Copy link
Author

@koba1t can you please check when you have time, sorry for direct ping

@tcaddy
Copy link

tcaddy commented Dec 15, 2025

What can be done to get this across the finish line? I'd like to see #6013 resolved. @hmilkovi can you please squash your commits? If there is anything else holding up the approved/LGTM labels, can someone comment about what else is needed?

… it does nothing

fix error text

migrate tests from Helm V3 to V4

run Helm tests for multiple Helm versions

fix lint issues

Update Makefile-tools.mk

Co-authored-by: Niklas Wagner <[email protected]>
@hmilkovi
Copy link
Author

hmilkovi commented Jan 2, 2026

/retest-required

@koba1t
Copy link
Member

koba1t commented Jan 3, 2026

@hmilkovi
Did you have any idea to fix this?

 === RUN   TestHelmChartInflationGeneratorOld
    helmchartinflationgenerator_test.go:171: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartInflationGeneratorOld (0.00s)
=== RUN   TestHelmChartNamespacePropagation
    helmchartinflationgenerator_test.go:190: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartNamespacePropagation (0.00s)
=== RUN   TestHelmChartInflationGenerator
    helmchartinflationgenerator_test.go:238: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartInflationGenerator (0.00s)
=== RUN   TestHelmChartInflationGeneratorWithOciRepository
    helmchartinflationgenerator_test.go:257: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartInflationGeneratorWithOciRepository (0.00s)
=== RUN   TestHelmChartInflationGeneratorWithOciRepositoryWithAppendSlash
    helmchartinflationgenerator_test.go:286: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartInflationGeneratorWithOciRepositoryWithAppendSlash (0.00s)
=== RUN   TestHelmChartProdVsDev
    helmchartinflationgenerator_test.go:317: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartProdVsDev (0.00s)
=== RUN   TestHelmChartInflationGeneratorMultipleValuesFiles
    helmchartinflationgenerator_test.go:537: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartInflationGeneratorMultipleValuesFiles (0.00s)
=== RUN   TestHelmChartInflationGeneratorApiVersions
    helmchartinflationgenerator_test.go:585: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartInflationGeneratorApiVersions (0.00s)
=== RUN   TestHelmChartInflationGeneratorSkipTests
    helmchartinflationgenerator_test.go:632: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartInflationGeneratorSkipTests (0.00s)
=== RUN   TestHelmChartInflationGeneratorNameTemplate
    helmchartinflationgenerator_test.go:671: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartInflationGeneratorNameTemplate (0.00s)
=== RUN   TestHelmChartInflationGeneratorForMultipleChartsDifferentVersion
    helmchartinflationgenerator_test.go:717: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartInflationGeneratorForMultipleChartsDifferentVersion (0.00s)
=== RUN   TestHelmChartInflationGeneratorForMultipleKubeVersions
    helmchartinflationgenerator_test.go:879: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartInflationGeneratorForMultipleKubeVersions (0.00s)
=== RUN   TestHelmChartNamespacePropagationViaResources
    helmchartinflationgenerator_test.go:1081: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartNamespacePropagationViaResources (0.00s)
=== RUN   TestHelmChartDifferentNamespaces
    helmchartinflationgenerator_test.go:1137: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartDifferentNamespaces (0.00s)
=== RUN   TestHelmChartSameNamespace
    helmchartinflationgenerator_test.go:1187: skipping: exec: "helmV4": executable file not found in $PATH
--- SKIP: TestHelmChartSameNamespace (0.00s)

@hmilkovi
Copy link
Author

hmilkovi commented Jan 3, 2026

To install locally both helm version:

make install-out-of-tree-tools

only helm v4:

make $(go env GOPATH)/bin/helmV4

I also have bumped now helm version to v4.0.4 as it fixes some CVE.

Good questions is if the plan is to keep testing current Helm major version plus previous in the future?
I ask as added code is written in a way that can be easy removed, more like a transition phase to v4, just checking.

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants