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(), |
|
) |
|
} |
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.
cluster-api-runtime-extensions-nutanix/pkg/webhook/cluster/validator.go
Lines 11 to 16 in ffb7bb2