Skip to content

Commit 1752499

Browse files
committed
Refactor conditions
1 parent b4f3574 commit 1752499

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pkg/kube/util/url.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,10 @@ func discoverURLFromRefs(client client.Client, ingressMonitor *endpointmonitorv1
6969
// if routeRef is mentioned in openshift cluster
7070
return discoverURLFromRouteRef(client, urlFrom.RouteRef, ingressMonitor.Namespace, ingressMonitor.Spec.ForceHTTPS, ingressMonitor.Spec.HealthEndpoint)
7171

72-
} else if !kube.IsOpenshift && urlFrom.RouteRef != nil {
73-
// if routeRef is mentioned in non openshift cluster
74-
log.V(1).Info("RouteRef is mentioned in kubernetes version: " + ingressMonitor.Name)
75-
7672
}
7773

78-
log.V(1).Info("Unsupported Ref set on ingressMonitor: " + ingressMonitor.Name)
74+
// if routeRef is mentioned in non openshift cluster
75+
log.V(1).Info("RouteRef is not supported for kubernetes version: " + ingressMonitor.Name)
76+
7977
return "", errors.New("Unsupported Ref set on ingressMonitor: " + ingressMonitor.Name)
8078
}

0 commit comments

Comments
 (0)