-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Vanilla CRD OpenAPI Subset: Structural Schemas #2335
Comments
#2331 created for migrating the old keps into new template. |
/sig api-machinery |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Enhancement Description
Vanilla CRD OpenAPI Subset: Structural Schemas
The CRD validation schemas today support nearly the whole OpenAPI v3 schema language. Here, we propose to impose a restriction called structural schema to that language, which will
Schema generators (like crd-gen and openapi-gen) which recurse over API Golang types produce structural schemas naturally. Developers can enrich those structural schemas with nearly arbitrary value validation logic, usually using in-code
+kubebuilder
-like tags.The restriction is an API change of the CustomResourceDefinition kind in the
apiextensions.k8s.io/v1beta1
API group, but in the sense thatv1beta1
endpoints are not restricted such that existing CRDs keep working as before,v1beta1
endpoints have to conform to the new restrictions if they want to make use of new features.In the
v1
CustomResourceDefinition API we will enforce structural schemas on creation and do ratcheting validation on update (allow updates with non-structural schemas if the original schema was non-structural already).To communicate to the developer that a CRD does not follow the structural schema restriction and will therefore not benefit from future developments, we add a
NonStructuralSchema
condition to the CRD.#1002
k/enhancements
) update PR(s):k/k
) update PR(s):k/website
) update PR(s):Implementation History
Please keep this description up to date. This will help the Enhancement Team to track the evolution of the enhancement efficiently.
The text was updated successfully, but these errors were encountered: