Closed mogottsch closed 1 year ago
I moved this from the Hackathon board to our board.
Notes from the meeting (marian & moritz):
In order to construct values.yaml
we will traverse all properties in the values.schema.json
.
We won't traverse into the items of arrays, as we expect arrays to declare default items directly at the level of the array.
Comments in the values.yaml
are not the priority, therefore if that is hard to accomplish we will leave it out.
The use-case of generating a default payload from a JSON schema seems to be very general. Therefore, we will check whether such a tool already exists.
I found no library that generates a payload from the defaults in a JSON schema.
There is a python library "jsonschema-default", however, it generates a whole sample paylaod, not just the defaults.
rjsf implements the logic of getting defaults from a form. As rjsf is intended for another purpose (or at least it has a much wider scope), I suggest to implement the default payload generation ourselves.
This is implemented in https://github.com/giantswarm/helm-values-gen.
Concerning the helm plugin part:
Currently, there is no need to provide helm-values-gen
as a helm plugin rather than a simple go CLI.
Helm does not provide any possibilities to find "the" helm charts in a repository, nor does not help to provide a better update experience.
With https://github.com/giantswarm/roadmap/issues/1733 we want to add a lot more information to our
values.schema.json
files. Usinghelm schema-gen
in its current state will overwrite/erase most schema information.One solution to this worklow problem could be to turn it around: Generate
values.yaml
fromvalues.schema.json
. In theory, the schema could contain all information required.Details:
title
anddescription
key in schema. Challenge: find Golang library that allows marshalling of YAML including comments.default
key.examples
and regex patterns could be added to property comments.Illustration
From
make