enterprise-helm icon indicating copy to clipboard operation
enterprise-helm copied to clipboard

Initial json schema, still very loose

Open Emyrk opened this issue 3 years ago • 4 comments

This is a start.

@coadler @deansheather If you guys want to add tighter validation, I can hop on a call and peer code this json schema to enforce minimums, regex patterns, exclusive fields, etc

Future Work

  • Tighter validation
  • More descriptions

Emyrk avatar Apr 19 '21 20:04 Emyrk

Could you add a make target for generating this?

It is not generated. There are tools to generate a loose json schema, but hand crafting it is always going to make it the "tightest" on validation.

Emyrk avatar Apr 19 '21 21:04 Emyrk

@coadler My thought is that we should invert things, we would update the schema (with descriptions) and use the schema to generate our docs (instead of helm-docs) and optionally the values file (with comments, if we want to keep those). I think just the values files without descriptions would be OK too, personally, because someone can run helm lint to validate their values file (which they cannot do today). Structured JSON is a lot easier for programs to work with as compared to parsing YAML comments :vomiting_face:

jawnsy avatar Apr 19 '21 21:04 jawnsy

@coadler My thought is that we should invert things, we would update the schema (with descriptions) and use the schema to generate our docs (instead of helm-docs) and optionally the values file (with comments, if we want to keep those). I think just the values files without descriptions would be OK too, personally, because someone can run helm lint to validate their values file (which they cannot do today). Structured JSON is a lot easier for programs to work with as compared to parsing YAML comments

Something to note, you can include example values and default values in the schema. So you can generate the values.yaml file from the schema.

Emyrk avatar Apr 19 '21 21:04 Emyrk

This is way too old

Emyrk avatar Dec 21 '22 16:12 Emyrk