Skip to content
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

[FEATURE_REQUEST] Merge arbitrary values.yaml when checking a helm chart #706

Open
josegomezr opened this issue Jan 29, 2024 · 2 comments
Open

Comments

@josegomezr
Copy link

Description of the problem/feature request
Allow kube-linter to receive an arbitrary amount of values.yaml files (just like helm upgrade does) when checking a helm chart.

Description of the existing behavior vs. expected behavior

We deploy several "variations" of the same workload across environments, and those variations we control via values.yaml.

We have a baseline behavior (no added values), and then with --values %the-file%.yml we enable/disable extra features for that environment.

We'd like to catch potential errors on the chart when using those special files too.

Additional context

Something like:

kube-linter lint --verbose --fail-if-no-objects-found --fail-on-invalid-resource --values "custom.yaml" helm-chart/

And that would load the default values.yaml inside the helm-chart directory as well as merging the values defined in custom.yaml on top of the aforementioned.

I'm open to contribute this change!

@meganwalker-ibm
Copy link

This would be of great benefit to us as well.

It would also be good to be able to set the Release Name and Release Namespace to something specific, as those can also be used in helm charts as part of feature gates, rather than having them hardcoded in

valuesToRender, err := chartutil.ToRenderValues(chrt, values, chartutil.ReleaseOptions{Name: "test-release", Namespace: "default"}, nil)

@josegomezr
Copy link
Author

For what is worth @meganwalker-ibm we kinda worked it around by using helm template [all helm flags] | kube-linter [all linter flags]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants