pantsbuild / pants

The Pants Build System
https://www.pantsbuild.org
Apache License 2.0
3.26k stars 626 forks source link

Support multiple values.yaml files in helm_chart #21183

Open mschulman opened 1 month ago

mschulman commented 1 month ago

Often people will use multiple values.yaml files with helm to support things like multiple environments.

Think values.yaml as a base set of values but then values.dev.yaml as env specific values.

https://helm.sh/docs/chart_template_guide/values_files/ calls out the -f flag.

I think you all support this for unittests but would be great to support for charts and then pass both sets of files in for things like lint, kubeconform etc.

While in there it might make sense to support the --set option with a "values" option in the helm_chart()

thanks!

lilatomic commented 1 month ago

I think this works currently, the helm_deployment.sources field will be used for helm values files. By default this is all files in the directory containing the build file with the helm_deployment target ending in ".yaml" or ".yml".

We show the usecase of deploying to multiple environments in our docs. The --set option is supported with helm_deployments.values option, in our docs that's inline values.

I want to clarify that there are 2 different target types which can work together: