-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Based on conversation from #6 (comment)
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.jsonfile. /.../This schema will be applied to the values to validate it. Validation occurs when any of the following commands are invoked:
helm installhelm upgradehelm linthelm template
So in our values.yaml we have the following:
$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 fileWe 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.