Feature Request: JSON Schema to validate k0sctl config
Hey k0sctl maintainers!
Big fan of the project, I was wondering if you'd be in having a jsonschema (https://json-schema.org/) generated and checked into the repo for the k0sctl.yaml config file.
It has integrations with a lot of tools to validate the structure of the config file and can be used by IDE's for code-completion.
There's a couple of golang libraries / build tools that could generate this for you using the go structs within the codebase: https://json-schema.org/tools?query=&sortBy=name&sortOrder=ascending&groupBy=languages&licenses=&languages=&drafts=&toolingTypes=&environments=&showObsolete=false#go
Would this be of interest to implement?
Related issue: https://github.com/k0sproject/k0s/issues/5668
As you mentioned in https://github.com/k0sproject/k0s/issues/5668 - it would be more useful if k0s had a schema and then the k0sctl's schema for spec.k0s.config should somehow adapt to spec.k0s.version (though, it hasn't changed much across versions). The schema tags also need to be defined in rig, which I have done in https://github.com/k0sproject/rig/pull/267 to see what it would be like.
Would be cool to have the schema support for both k0s and k0sctl, indeed!