Merge pull request #90411 from johscheuer/improve-error-message

Improve error message when service cidr is to small
This commit is contained in:
Kubernetes Prow Robot 2020-04-24 03:16:21 -07:00 committed by GitHub
commit 9706b70213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -397,7 +397,7 @@ func ValidateIPNetFromString(subnetStr string, minAddrs int64, isDualStack bool,
for _, s := range subnets {
numAddresses := utilnet.RangeSize(s)
if numAddresses < minAddrs {
allErrs = append(allErrs, field.Invalid(fldPath, s, "subnet is too small"))
allErrs = append(allErrs, field.Invalid(fldPath, s.String(), "subnet is too small"))
}
}
return allErrs