-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
[wip] annotate PersistentVolume with schema validations #123163
base: master
Are you sure you want to change the base?
[wip] annotate PersistentVolume with schema validations #123163
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
PR needs rebase. 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. |
add3eb3
to
4153935
Compare
a0d5ed2
to
1070734
Compare
PR needs rebase. 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. |
1070734
to
664ed19
Compare
2bc5e1f
to
b2741f7
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alexzielenski The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
b2741f7
to
c2112e6
Compare
resolveRefs has the side effect that it clobbers extra schema information stored in the field which used the ref
additionalProperties makes sense to use in a NestedValueValidation, but it is currently forbidden. This change makes the treatment of additionalProperties more in line with the treatment of `items` or `properties` - so users can specify additional value validations for schemas which use `additionalProperties` structurally. This change also move XValidations so that it is allowed to be used inside an allOf in a CRD schema codegen: deepycopy-gen preserve errors for additionalProperties and xvalidations so the API surface stays the same Once this has had some soak time we can allow CRDs to use these abilities add allOf support into CEL validator preserve errors for additionalProperties and xvalidations so the API surface stays the same Once this has had some soak time we can allow CRDs to use these abilities
…tions pd pd pd pd
gen gen gen
c2112e6
to
0c33db6
Compare
@alexzielenski: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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-sigs/prow repository. I understand the commands that are listed here. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Updates kube-openapi dependency to bring in recent marker comment changes. and also annotates PersistentVolume with comments as well as instrumenting its validation unit tests with a framework to also test against versioned schemas.
Was able to get surprisingly far annotating persistentvolume, but we still have some gaps in our tooling preventing us from going faster/farther:
Outstanding issues discovered by this exploration (with corresponding failing unit tests in italics):
Kube-OpenAPI Bugs/Things that can be solved with kube-openapi
oneOf
to distinguish IntOrString types like Quantity without writingtype
in their schema. This causes problems with our CEL schema code written for CRDs which expect a non-emptytype
. This can be worked around by addingx-kubernetes-int-or-string: true
to any place we generate such a oneOf.CEL Library augmentations
Set
library or ability to efficiently detect duplicatesMore Complicated/Needs Design
FieldValueUnsupported
orFieldValueNotFound
as areason
on a Validation Rule./hold
Still exploring marker comments & their limits
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: