-
Notifications
You must be signed in to change notification settings - Fork 205
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
Feature: Make json-schema files available #1411
Comments
@bjartek - I'm not super familiar with kubeval, but their documentation on CRDs says:
Since all ASO resources are CRDs, it seems validating them using kubeval isn't supported? The schemas for the CRDs are the CRDs themselves, which are really OpenAPI schemas and should adhere to the Kubernetes structural schema. |
That documentation is wrong. I will get them to fix it. Here is how the flux ppl do it https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/scripts/validate.sh |
I see, and they generate those schemas by running an action which you can see defined here. Specifically they seem to be executing this python script to extract the JSON schema from the OpenAPI specification. To workaround our lack of schemas right now you can just transform the CRD YAMLs into JSON schemas yourself by using that same script/Dockerfile. The YAMLs are in included in the ASO release in the I'm a bit surprised that Kubeval doesn't just understand how to do that itself though - it seems awkward to require CRD authors to do what amounts to some simple transformations on the CRDs they're publishing. Kubeval could just as easily do those transforms on their side and it'd work for every CRD out of the box. Actually I see that even others have pointed this out in this issue (this issue also has some docs around how to do the conversions). |
Awesome research! I will look into this :) |
This discussion seems to have resolved the original request; closing the issue. |
We are using https://kubeval.instrumenta.dev/ to validate kubernetes manifests against their schema. Currently we are skipping kinds that does not have a schema since we do not have access to the AZO schema files. Can you make them available in the release in github or in some other way?
The text was updated successfully, but these errors were encountered: