Skip to content

Commit

Permalink
react on library-go bump
Browse files Browse the repository at this point in the history
Signed-off-by: chiragkyal <[email protected]>
  • Loading branch information
chiragkyal committed Jul 22, 2024
1 parent dbbc097 commit 41a1750
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cmd/infra/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 41a1750

Please sign in to comment.