kubewarden / kubewarden-controller

Manage admission policies in your Kubernetes cluster with ease
https://kubewarden.io
Apache License 2.0
182 stars 30 forks source link

Validation webhook: use error list while validating `PolicyServer` CRD #712

Closed flavio closed 2 months ago

flavio commented 2 months ago

Currently the validation webhook implemented by the kubewarden-controller will reject the creation/update of a PolicyServer resource as soon as it finds something that is not valid.

We should instead populate a list of all the non-compliance issue of the analyzed PolicyServer resource and then return all of them while rejecting the creation/update.

This would improve the UX: the user would get all the "wrong things" immediately, instead of having to iterate over each one of them (loop: apply - > reject -> edit -> apply over and over).

Admission criteria