Skip to content

Commit fcf9377

Browse files
committed
[gateway] Fix missing upstream keepalives
1 parent 02ff73b commit fcf9377

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/gateway/gatewayapi/route.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@ func (t *Translator) processHTTPRouteRule(httpRoute *HTTPRouteContext, ruleIdx i
348348
Name: irRouteName(httpRoute, ruleIdx, matchIdx),
349349
}
350350
processTimeout(irRoute, rule)
351-
352351
// TODO(dilyevsky): Get this setting from the Proxy object. Put in reasonable defaults for now.
353352
// https://linear.app/apoxy/issue/APO-258/implement-tcpkeepalive-settting
354353
irRoute.TCPKeepalive = &ir.TCPKeepalive{
@@ -723,6 +722,7 @@ func (t *Translator) processHTTPRouteParentRefListener(route RouteContext, route
723722
Timeout: routeRoute.Timeout,
724723
Retry: routeRoute.Retry,
725724
IsHTTP2: routeRoute.IsHTTP2,
725+
TCPKeepalive: routeRoute.TCPKeepalive,
726726
}
727727
perHostRoutes = append(perHostRoutes, hostRoute)
728728
}

pkg/gateway/xds/translator/cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ func buildXdsClusterUpstreamOptions(tcpkeepalive *ir.TCPKeepalive) *clusterv3.Up
612612
ka.TcpKeepalive.KeepaliveProbes = wrapperspb.UInt32(*tcpkeepalive.Probes)
613613
}
614614

615-
if tcpkeepalive.Probes != nil {
615+
if tcpkeepalive.IdleTime != nil {
616616
ka.TcpKeepalive.KeepaliveTime = wrapperspb.UInt32(*tcpkeepalive.IdleTime)
617617
}
618618

0 commit comments

Comments
 (0)