Description
The prevailing convention in Kubernetes resource validation is to report all validation errors, not only the first discovered error. The built-in API types follow this convention (example). The OpenAPI and CEL rule validation follows this convention, too. Most webhooks I have seen also follow it.
We provide a utility function for webhook authors that executes multiple validators:
controller-runtime/pkg/webhook/admission/multi.go
Lines 90 to 95 in 6ad5c1d
It returns as soon as one validator fails. That means that subsequent validators are not called, and any errors they might discover are not reported.
I think we should provide an alternative implementation that calls all validators, even if some fail, and aggregates their errors.
Also, because the existing utility function does not follow the convention, I think we should consider deprecating it.