Improve error message when service cidr is to small

This commit is contained in:
Johannes M. Scheuermann 2020-04-23 20:18:13 +02:00
parent 775feed217
commit 4211c2dccc

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