mirror of https://github.com/kubernetes/kops.git
Change error to InernalError
This commit is contained in:
parent
b983af231e
commit
de1d082bc5
|
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
package validation
|
package validation
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
@ -643,7 +644,7 @@ func validateCalicoAutoDetectionMethod(fldPath *field.Path, runtime string, vers
|
||||||
return utilvalidation.IsValidIPv6Address(fldPath, destStr)
|
return utilvalidation.IsValidIPv6Address(fldPath, destStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
return field.ErrorList{field.Invalid(fldPath, runtime, "IP version is incorrect")}
|
return field.ErrorList{field.InternalError(fldPath, errors.New("IP version is incorrect"))}
|
||||||
case "interface":
|
case "interface":
|
||||||
ifRegexes := regexp.MustCompile(`\s*,\s*`).Split(method[1], -1)
|
ifRegexes := regexp.MustCompile(`\s*,\s*`).Split(method[1], -1)
|
||||||
if len(ifRegexes) == 0 || ifRegexes[0] == "" {
|
if len(ifRegexes) == 0 || ifRegexes[0] == "" {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue