diff --git a/pkg/kube/wrappers/ingress-wrapper.go b/pkg/kube/wrappers/ingress-wrapper.go index f8926c5e..621669a3 100644 --- a/pkg/kube/wrappers/ingress-wrapper.go +++ b/pkg/kube/wrappers/ingress-wrapper.go @@ -65,7 +65,7 @@ func (iw *IngressWrapper) getIngressPort() string { rule := iw.Ingress.Spec.Rules[0] if rule.HTTP != nil { if rule.HTTP.Paths != nil && len(rule.HTTP.Paths) > 0 { - if reflect.TypeOf(rule.HTTP.Paths[0].Backend.ServicePort) == "string" { + if reflect.TypeOf(rule.HTTP.Paths[0].Backend.ServicePort).Kind() == request.String { return "80" } else { return rule.HTTP.Paths[0].Backend.ServicePort.StrVal @@ -119,7 +119,7 @@ func (iw *IngressWrapper) GetURL() string { // Append port + ingressSubPath ingressSubPathWithPort := iw.getIngressSubPathWithPort() u.Path = u.Path + ":" + strings.Split(ingressSubPathWithPort, "/")[0] - u.Path = path.Join(u.Path, strings.Join(strings.Split(iw, getIngressSubPathWithPort(), "/")[1:], "/")) + u.Path = path.Join(u.Path, strings.Join(strings.Split(iw.getIngressSubPathWithPort(), "/")[1:], "/")) // Find pod by backtracking ingress -> service -> pod healthEndpoint, exists := iw.tryGetHealthEndpointFromIngress()