Skip to content

Proposal: Warn about unused values in values file #6422

@kurczynski

Description

@kurczynski

When using a values file during a chart installation like helm install --values values.yaml my-chart, Helm doesn't tell me if I've specified values in values.yaml that are not consumed by the installation. For example, if I have the following values.yaml:

db:
  username: "admin"

and my Helm chart is looking for {{ .Values.db.user }}, the install continues without using what's in my values.yaml. Although this is expected behavior, it's been very difficult for me to track these errors down for charts with larger values files or subcharts.

Having Helm notify me if there were values in my values.yaml that were not consumed would help make the error more apparent. Using the example above, outputting something like:

Warning: value db.username not consumed

It would also be really nice if there was an option to fail the install if there were unused values. Again, using the example above:

helm install --strict-consume --values.yaml my-chart

would fail the installation.

Output of helm version:

Client: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}

Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:13:54Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.2", GitCommit:"f6278300bebbb750328ac16ee6dd3aa7d3549568", GitTreeState:"clean", BuildDate:"2019-08-05T09:15:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.):
AKS, Minikube

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions