File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -556,7 +556,7 @@ func GetNameForHost(name string) string {
556
556
func GetSafeRouteName (name string ) string {
557
557
if IsGeneratedRouteName (name ) {
558
558
// The name of a route generated from an ingress path will contain '/', which
559
- // isn't compatible with HAproxy.
559
+ // isn't compatible with HAproxy or F5 .
560
560
return strings .Replace (name , "/" , "_" , - 1 )
561
561
}
562
562
return name
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
10
10
"k8s.io/kubernetes/pkg/watch"
11
11
12
12
routeapi "github.com/openshift/origin/pkg/route/api"
13
+ "github.com/openshift/origin/pkg/router/controller"
13
14
"github.com/openshift/origin/pkg/util/netutils"
14
15
)
15
16
@@ -320,7 +321,8 @@ func (p *F5Plugin) HandleEndpoints(eventType watch.EventType,
320
321
// routeName returns a string that can be used as a rule name in F5 BIG-IP and
321
322
// is distinct for the given route.
322
323
func routeName (route routeapi.Route ) string {
323
- return fmt .Sprintf ("openshift_route_%s_%s" , route .Namespace , route .Name )
324
+ name := controller .GetSafeRouteName (route .Name )
325
+ return fmt .Sprintf ("openshift_route_%s_%s" , route .Namespace , name )
324
326
}
325
327
326
328
// In order to map OpenShift routes to F5 objects, we must divide routes into
You can’t perform that action at this time.
0 commit comments