Skip to content

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

@dlipovetsky

Description

@dlipovetsky

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(),
)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions