Skip to content

Allow users to specify non-default values for Helm charts #48

@viswajithiii

Description

@viswajithiii

Currently, Helm charts are rendered using the values.yaml file next to Chart.yaml. We need to support a way for users to test with other values. More generally, we want people to be able to specify a bunch of different combinations of values that kube-linter checks their configurations against.

There are two ways we can do this, which are not mutually exclusive:

  1. Support Helm's -f and --set flags. However, this only makes sense if you lint one chart, so will require a separate lint-helm command or similar, which strictly takes the path to a Helm chart. In this case, the user will be responsible for calling kube-linter lint-helm multiple times, for each set of -f and --set arguments they want to lint against.
  2. One way to do this might be to allow a .kubelinterrc directory in every Helm chart directory, where users specify this. We need to be careful about how we design this, because we want to ensure that:
    1. users can specify multiple renders of Helm charts -- ie, they should be able to specify a few different sets of values, have the chart be rendered with each set of values, and have each set of rendered YAML files linted independently.
    2. users can specify multiple values in each render. That is, just like helm install supports multiple -f arguments, users should be able to specify multiple values.yaml files, and the order in which they are applied, for each render. Importantly, if one of these is the values.yaml file in the Chart's root directory, it should be possible for the user to specify that without having to duplicate its contents.

Finally, we should ensure that if values are specified like this, we render the chart in strict code, and actually fail if required values are not specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds designIndicates that the proposed enhancement needs more thought on design

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions