-
Notifications
You must be signed in to change notification settings - Fork 561
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
Adopt CRD native validation #2951
Adopt CRD native validation #2951
Conversation
Skipping CI for Draft Pull Request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on the change - but I think we are over-complicating things. Great to have a test suite, but I don't think it needs to match 100% what the current validator does. If we can convert any tests the validator had to the new suite - it should be sufficient.
28eb25f
to
c96447a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does cue intergrate with kubebuilder
We no longer use Cue because it did not support this
…On Thu, Oct 12, 2023, 6:26 PM Zhonghu Xu ***@***.***> wrote:
***@***.**** commented on this pull request.
How does cue intergrate with kubebuilder
—
Reply to this email directly, view it on GitHub
<#2951 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEYGXNUVNIOMGEJ4Y6ITMDX7CKCTANCNFSM6AAAAAA5WNOCGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
// +kubebuilder:validation:MaxLength=256 | ||
// +kubebuilder:validation:MinLength=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: sometimes the min is before the max, sometimes its after.
Part of istio/istio#46151.
This is the first PR ramping up our CRD native validation. The intent here is to provide the same validation but without a webhook dependency.
To keep things small and start in a low-risk API, this PR introduces validation only for WasmPlugin. Most of this is pretty straightforward; the Go webhook validation logic is 1:1 mapped into native CRD concepts.
Testing this change (and future) ones has three levels:
blocked by: istio/tools#2687
blocked by: me running the fuzzer a bit locally to get confidence