Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Schemas as json #922

Open
userbradley opened this issue Apr 5, 2024 · 2 comments
Open

Export Schemas as json #922

userbradley opened this issue Apr 5, 2024 · 2 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@userbradley
Copy link

I am trying to use Kubeconform with the CRD's from this repo, but I cant find the schema json files.

Please can you publish them similar to https://github.com/fluxcd-community/flux2-schemas

Thanks

@bwplotka
Copy link
Collaborator

bwplotka commented Apr 5, 2024

👋🏽 Hello

Nice! First time I see https://github.com/yannh/kubeconform -- I assume it allows to validate your configuration on CI e.g. before your GitOps just by fetching local definitions.

Also checked Prometheus Operator for reference, they don't have such thing yet, but have some requests for it: prometheus-operator/prometheus-operator#4713 and prometheus-operator/prometheus-operator#4259

The work that needs to be done is similar to what's explained in prometheus-operator/prometheus-operator#4259 (comment)

Apply some modifications: add // +k8s:openapi-gen=true comment to the apis/externalsecrets/v1alpha1 and apis/meta/v1 packages
Using kube-openapi we are generating OpenAPI specs
Using openapi2jsonschema we are generating Json Schema definitions and insert them to our Helm Charts schemas.

I think we could consider that, adding extra deps to our CI are not ideal, but maybe it's not too bad.

This is an OSS project, so contributions welcome! Help wanted, not sure when maintainers will have time to develop this.

@bwplotka bwplotka added the help wanted Extra attention is needed label Apr 5, 2024
@userbradley
Copy link
Author

Thanks for getting back to me @bwplotka! I'd be more than happy to help create a PR.

I'm still quite new to the CRD side of Kubernetes, and then the extra layer of generating the schemas in Go.

Would you be able to point me to a single file where I need to add those comments, then I can figure it out from there?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants