@@ -502,28 +502,12 @@ func hcmStatPrefix(irListener *ir.HTTPListener, nameSchemeV2 bool) string {
502502 return fmt .Sprintf ("%s-%d" , statPrefix , irListener .Port )
503503}
504504
505+ // use the same name for the route config as the filter chain name, as they're 1:1 mapping.
505506func routeConfigName (irListener * ir.HTTPListener , nameSchemeV2 bool ) string {
506507 if irListener .TLS != nil {
507- return httpsListenerRouteConfigName (irListener )
508+ return httpsListenerFilterChainName (irListener )
508509 }
509- return httpListenerRouteConfigName (irListener , nameSchemeV2 )
510- }
511-
512- // port value is used for the route config name for HTTP listeners. as multiple HTTP listeners on the same port are
513- // using the same route config.
514- func httpListenerRouteConfigName (irListener * ir.HTTPListener , nameSchemeV2 bool ) string {
515- if nameSchemeV2 {
516- return fmt .Sprint (irListener .ExternalPort )
517- }
518- // For backward compatibility, we use the listener name as the route config name.
519- return irListener .Name
520- }
521-
522- // irListener name is used as the route config name for HTTPS listener, as HTTPS Listener is 1:1 mapping to the filter chain,
523- // and the HCM in each filter chain uses a unique route config.
524- // The Gateway API layer ensures that each listener has a unique combination of hostname and port.
525- func httpsListenerRouteConfigName (irListener * ir.HTTPListener ) string {
526- return irListener .Name
510+ return httpListenerDefaultFilterChainName (irListener , nameSchemeV2 )
527511}
528512
529513// port value is used for the default filter chain name for HTTP listeners, as multiple HTTP listeners are merged into
0 commit comments