Skip to content

Commit

Permalink
Improve webhook error message
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Schlotter <[email protected]>
  • Loading branch information
rikatz and chrischdi authored Jul 4, 2023
1 parent 3b311f5 commit 4c1451a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apis/v1beta1/vspherefailuredomain_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (r *VSphereFailureDomain) ValidateCreate() error {
}

if len(r.Spec.Topology.NetworkConfigurations) != 0 && len(r.Spec.Topology.Networks) != 0 {
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "Topology", "Networks"), "cannot be set if spec.Topology.NetworkConfigs is not empty"))
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "Topology", "Networks"), "cannot be set if spec.Topology.NetworkConfigs is already set"))
}

return aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs)
Expand Down

0 comments on commit 4c1451a

Please sign in to comment.