Skip to content

Commit 518e97e

Browse files
committed
update based on reviews
1 parent df7c72a commit 518e97e

File tree

2 files changed

+230
-256
lines changed

2 files changed

+230
-256
lines changed

internal/mode/static/state/graph/route_common.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,12 @@ func bindRoutesToListeners(
337337
bindL7RouteToListeners(r, gw, namespaces)
338338
}
339339

340-
l7routes := make([]*L7Route, 0, len(l7Routes))
340+
routes := make([]*L7Route, 0, len(l7Routes))
341341
for _, r := range l7Routes {
342-
l7routes = append(l7routes, r)
342+
routes = append(routes, r)
343343
}
344344

345-
isolateL7RouteListeners(l7routes, gw.Listeners)
345+
isolateL7RouteListeners(routes, gw.Listeners)
346346

347347
l4routes := make([]*L4Route, 0, len(l4Routes))
348348
for _, r := range l4Routes {
@@ -698,11 +698,6 @@ func tryToAttachL7RouteToListeners(
698698

699699
rk := CreateRouteKey(route.Source)
700700

701-
listenerHostnameMap := make(map[string]string, len(attachableListeners))
702-
for _, l := range attachableListeners {
703-
listenerHostnameMap[l.Name] = getHostname(l.Source.Hostname)
704-
}
705-
706701
bind := func(l *Listener) (allowed, attached bool) {
707702
if !isRouteNamespaceAllowedByListener(l, route.Source.GetNamespace(), gw.Source.Namespace, namespaces) {
708703
return false, false

0 commit comments

Comments
 (0)