stackrox / kube-linter

KubeLinter is a static analysis tool that checks Kubernetes YAML files and Helm charts to ensure the applications represented in them adhere to best practices.
https://docs.kubelinter.io/
Apache License 2.0
2.97k stars 234 forks source link

[FEATURE_REQUEST] support dynamic helm values #197

Open cpvandehey opened 3 years ago

cpvandehey commented 3 years ago

Description of the problem/feature request I have a helm chart that I'd like to lint with your magical tool. The only problem is that I haven't found a way to dynamically pass in values with the kubelinter cli.

For example, this is how I generally invoke the helm linter: helm lint myhelm -f my-dynamic-values.yaml --strict -- The flag -f my-dynamic-values.yaml is a short yaml file of values that must be set in order for the chart to succeed in building. If those values are not properly set, my helm chart is designed to fail. This is a somewhat common helm pattern/design.

Description of the existing behavior vs. expected behavior If applicable, please paste in the existing KubeLinter output along with the input used, and point out which part should be modified (expected output). n/a

Additional context Add any other context or screenshots about the feature request here. I chatted with Viswajith Venugopal on slack about this feature.

eyarz commented 2 years ago

Until this is fixed, you can use the following workaround - use the command helm template + any other helm args (like -f) to generate a K8s manifest and run kube-linter against the generated manifest.

Maybe someone from the community can write a helm plugin like other solutions already have (disclaimer - I'm a maintainer in this project).