[schema, data/values] support specifying schema for data structures
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 167
- PR merge metrics
- No merged PRs in 30d
Description
motivating use cases:
- allow to provide schema for data values
- so that default values, types, descriptions, validations, examples could be provided
- allow to provide schema for documents (eg k8s resources) matching particular pattern (eg apiVersion/kind keys [1])
- so that ytt can be helpful when building data structures (eg checking key presence, validating values, etc.)
additional wants:
- allow to attach single schema to multiple documents
- allow to "package" schema into a ytt library (eg k8s-schema-lib) so that it could be imported
opens possibilities to:
- have overlay module rely on schema for more seamless "overlaying" behavior (eg key structure, defaults?, merging type)
- editor integration to support better error highlighting etc
- generate UI for data value configuration
possible backing mechanisms:
- json schema / openapi
- widely used including in k8s
- ytt annotation based
- waay more concise
[1] https://github.com/garethr/kubernetes-json-schema/blob/8aa572595b98d73b2b9415ca576f78e163381b10/v1.9.9-standalone-strict/cronjob.json#L4-L10
Contributor guide
Research direction
No files, tests, or entry points are named. Begin by turning the listed use cases and alternative backing mechanisms into a concrete design; done requires an agreed schema model that covers data values, documents, reuse, and library packaging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, openapi
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100