capact icon indicating copy to clipboard operation
capact copied to clipboard

Not all values from values.yaml are in Helm generated Manifests

Open lukaszo opened this issue 3 years ago • 2 comments

Description

In case of the Redis chart, not all values from values.yaml are defined in values.schema.json - see https://github.com/bitnami/charts/tree/master/bitnami/redis

Expected behavior

It should be possible to validate all additional input passed to the Implementation.

Actual behavior

Only values in the schema are validated.

Steps to reproduce

Follow the steps from the doc https://github.com/capactio/website/pull/73

lukaszo avatar Oct 07 '21 22:10 lukaszo

New AC:

  • report bug for bitnami/redis chart that they have out of sync the JSONSchema for Redis values.yaml.

  • research about adding schemas for sub-charts in the same way as Helm does:

    Furthermore, the final .Values object is checked against all subchart schemas. This means that restrictions on a subchart can't be circumvented by a parent chart. This also works backwards - if a subchart has a requirement that is not met in the subchart's values.yaml file, the parent chart must satisfy those restrictions in order to be valid.

    source: https://helm.sh/docs/topics/charts/#schema-files

mszostok avatar Oct 08 '21 09:10 mszostok

json.schema files are not generated in bitnami charts, so each one is maintained manually. There is a project bitnami-labs/readme-generator-for-helm which also can generate JSON schema but currently it's not used.

lukaszo avatar Oct 13 '21 23:10 lukaszo