-
Notifications
You must be signed in to change notification settings - Fork 41
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
recursive schemas not supported #18
Comments
hi @alexzielenski I want to work on this issue and wanted to know if we need to block the validation of the resources against recursive schema or do we need to block the validation of the schema itself |
We would want to block validation of resources against a recursive schema. I think the tool should show a warning rather than fail the entire operation |
@alexzielenski if I am not wrong the schema to recursive it should have a $ref right ? |
Thats correct. CRDs have all inline schemas, so there are no $ref allowed. Native types sometimes use $ref in their schemas to refer to other types' schemas. If we have a circular $ref dependency anywhere then the schema is recursive. |
/assign |
hi @alexzielenski I have made a pr please can you review it |
The schema validator used by Kubernetes server and kubectl-validate does not support recursively defined schemas. This can be fixed but it would be a fairly big modification.
CRDs cannot be recursive, so this is not a concern for them.
There may be some native types that have a recursive schema. One example of this is CustomResourceDefinition itself. n this single case, we workaround this by using the handwritten validation code for CRDs since they are so common.
In general, we should detect and block validation of recursive schemas.
The text was updated successfully, but these errors were encountered: