The plugin description reads: "The plugin provides several actions to generate JSON schemas for values of Helm charts."
Looking at the code (e.g. generateValuesJsonSchema), the method name suggests that a schema is generated from values. However, I could not find any place in the code where values.yaml is actually read from the file system, which makes the description misleading.
Feature Request
I would like to have an option to generate a values.schema.json from either:
- a
values.yaml file, or
- the templates in the Helm chart (e.g. by analysing
.Values.* references)
Example
Given the following values.yaml:
postgresDb:
enabled: true
instances:
- name: mydb
dbName: sampledatabase
and a template like this in templates/_postgresdb.yaml:
{{- if .Values.postgresDb.enabled }}
{{- range $_, $db := .Values.postgresDb.instances }}
Both representations allow deducing that postgresDb is an object with an enabled property and an instances array, which could be translated into a JSON schema automatically.
It would also be useful to support comments in values.yaml or the template that get rendered as description fields in the resulting schema.
Question
Is there a public sample repository showing the intended use of this plugin?
The plugin description reads: "The plugin provides several actions to generate JSON schemas for values of Helm charts."
Looking at the code (e.g.
generateValuesJsonSchema), the method name suggests that a schema is generated from values. However, I could not find any place in the code wherevalues.yamlis actually read from the file system, which makes the description misleading.Feature Request
I would like to have an option to generate a
values.schema.jsonfrom either:values.yamlfile, or.Values.*references)Example
Given the following
values.yaml:and a template like this in
templates/_postgresdb.yaml:Both representations allow deducing that
postgresDbis an object with anenabledproperty and aninstancesarray, which could be translated into a JSON schema automatically.It would also be useful to support comments in
values.yamlor the template that get rendered as description fields in the resulting schema.Question
Is there a public sample repository showing the intended use of this plugin?