Helm v3 has support for JSON schemas for its values.yaml. If we add this, we both get extra bit of validation, and for those who use a text editor with the YAML language server from Red Hat then they also get intellisense when editing.
Sometimes, a chart maintainer might want to define a structure on their values. This can be done by defining a schema in the values.schema.json file. /.../
This schema will be applied to the values to validate it. Validation occurs when any of the following commands are invoked:
$schema: https://raw.githubusercontent.com/iver-wharf/wharf-helm/wharf-helm-v1.0.0/charts/wharf-helm/values.schema.json
nameOverride: ""
fullnameOverride: ""
global:
url: wharf.example.org
## Used in RabbitMQ & Jenkins to multiplex jobs and messages on the same
## instances while keeping track of their origin.
instanceId: dev
## This flag is forwarded to the frontend where it can be used to show
## slightly different styling depending on if it's for production or not.
isProduction: false
web:
## Defaults to 1
replicaCount: 1
# ...and the rest of the YAML file
We might want to autogenerate it though, preferrably by using the same info that helm-docs take use of, as this would otherwise require us to maintain two separate files.
Helm v3 has support for JSON schemas for its values.yaml. If we add this, we both get extra bit of validation, and for those who use a text editor with the YAML language server from Red Hat then they also get intellisense when editing.
So in our
values.yaml
we have the following:We might want to autogenerate it though, preferrably by using the same info that helm-docs take use of, as this would otherwise require us to maintain two separate files.