Skip to content

Validating webhook handler should collect all errors, instead of returning the first one found #1119

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

Open
dlipovetsky opened this issue May 6, 2025 · 1 comment

Comments

@dlipovetsky
Copy link
Contributor

We're using controller-runtime's MultiValidatingHandler, which returns as soon as one validator reports an error*. That prevents other validators from running, and the user may get an incomplete picture of validation failures.

func NewValidator(client ctrlclient.Client, decoder admission.Decoder) admission.Handler {
return admission.MultiValidatingHandler(
NewClusterUUIDLabeler(client, decoder).Validator(),
NewNutanixValidator(client, decoder).Validator(),
)
}

@dlipovetsky
Copy link
Contributor Author

I'd like to fix this by replacing our use of MultiValidatingHandler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant