1
0
Fork 0

Support HTTPRoute destination port matching

This commit is contained in:
Kevin Pollet 2024-09-27 12:12:05 +02:00 committed by GitHub
parent eccfcc0924
commit d317cd90fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 28 additions and 25 deletions

View file

@ -49,12 +49,11 @@ func (p *Provider) loadTCPRoutes(ctx context.Context, gatewayListeners []gateway
}
for _, listener := range gatewayListeners {
if !matchListener(listener, route.Namespace, parentRef) {
continue
}
accepted := true
if !allowRoute(listener, route.Namespace, kindTCPRoute) {
if !matchListener(listener, route.Namespace, parentRef) {
accepted = false
}
if accepted && !allowRoute(listener, route.Namespace, kindTCPRoute) {
parentStatus.Conditions = updateRouteConditionAccepted(parentStatus.Conditions, string(gatev1.RouteReasonNotAllowedByListeners))
accepted = false
}