Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
redpanda: generate values.schema.json from go structs
This commit introduces a set of go structs that are now used to generate the values.schema.json files for the redpanda chart. This is being done to: - Ensure that values.schema.json is always up to date. - Allow correct and ergonomic go code to be written in place of helm templates. - Provide a more tenable way of defining, updating, and shaping the input values of the redpanda chart. Efforts were taken to minimize the diff between the original and now generated jsonschema but there is still a non-trivial diff due to many invalid entries within the original jsonschema. Future commits will slowly remove the hacks and shims once the initial generation hurdle has been cleared. Rather than reviewing a standard diff. It is recommended to instead view the diff output by: `dyff between -i --exclude-regexp '.*annotations|.*labels' (git show origin/main:charts/redpanda/values.schema.json | psub) ./charts/redpanda/values.schema.json` - `dyff` will simplify the overall diff. - `-i` ignores any change in the ordering of keys or elements within an array as neither are relevant in the context of a jsonschema. - `--exclude-regexp '.*annotations|.*labels'` many label and annotation fields did not have typed keys. As the Kubernetes API server would validate that all values are strings, this is now enforced at the schema level. For reviewers thereof, here is an explanation of the larger diffs: `properties.storage.properties.tiered.properties.credentialsSecretRef` was missing a `properties` key in the handwritten schema. `properties.statefulset.properties.sideCars.properties.configWatcher.controllers` was incorrectly nested within `configWatcher` _and_ missing a `properties` key. It's now been hoisted to the correct location within sideCars and formatted correctly. `properties.logging` used the key `parameters` instead of `properties`.
- Loading branch information