diff --git a/pkg/cmd/infra/router/router.go b/pkg/cmd/infra/router/router.go index 4bc9503fc..3a778bda6 100644 --- a/pkg/cmd/infra/router/router.go +++ b/pkg/cmd/infra/router/router.go @@ -15,6 +15,7 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" + "k8s.io/apimachinery/pkg/util/validation/field" kclientset "k8s.io/client-go/kubernetes" routev1 "github.com/openshift/api/route/v1" @@ -254,7 +255,8 @@ func (o *RouterSelection) Complete() error { if errs := validation.IsDNS1123Subdomain(routerCanonicalHostname); len(errs) != 0 { return fmt.Errorf("invalid canonical hostname: %s", routerCanonicalHostname) } - if errs := validation.IsValidIP(routerCanonicalHostname); len(errs) == 0 { + // TODO: correct field path here + if errs := validation.IsValidIP(field.NewPath("TODO"), routerCanonicalHostname); len(errs) == 0 { return fmt.Errorf("canonical hostname must not be an IP address: %s", routerCanonicalHostname) } }