kubernetes-sigs/kubectl-validate

recursive schemas not supported

Open

#18 opened on May 4, 2023

View on GitHub
 (6 comments) (1 reaction) (1 assignee)Go (56 forks)auto 404
good first issue

Repository metrics

Stars
 (268 stars)
PR merge metrics
 (PR metrics pending)

Description

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.

Contributor guide