Skip to content

Commit

Permalink
Merge pull request #3 from amplify-education/1.17.3-remove-tcp-timeout
Browse files Browse the repository at this point in the history
Disable timeout
  • Loading branch information
rddimon authored Feb 27, 2024
2 parents 009041f + c08049f commit 40fea4b
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions agent/xds/listeners.go
Original file line number Diff line number Diff line change
Expand Up @@ -1803,16 +1803,19 @@ func (s *ResourceGenerator) makeFilterChainTerminatingGateway(cfgSnap *proxycfg.
// Lastly we setup the actual proxying component. For L4 this is a straight
// tcp proxy. For L7 this is a very hands-off HTTP proxy just to inject an
// HTTP filter to do intention checks here instead.
no_timeout := 0
opts := listenerFilterOpts{
protocol: tgtwyOpts.protocol,
filterName: fmt.Sprintf("%s.%s.%s.%s", tgtwyOpts.service.Name, tgtwyOpts.service.NamespaceOrDefault(), tgtwyOpts.service.PartitionOrDefault(), cfgSnap.Datacenter),
routeName: tgtwyOpts.cluster, // Set cluster name for route config since each will have its own
cluster: tgtwyOpts.cluster,
statPrefix: "upstream.",
routePath: "",
tracing: tracing,
accessLogs: &cfgSnap.Proxy.AccessLogs,
logger: s.Logger,
protocol: tgtwyOpts.protocol,
filterName: fmt.Sprintf("%s.%s.%s.%s", tgtwyOpts.service.Name, tgtwyOpts.service.NamespaceOrDefault(), tgtwyOpts.service.PartitionOrDefault(), cfgSnap.Datacenter),
routeName: tgtwyOpts.cluster, // Set cluster name for route config since each will have its own
cluster: tgtwyOpts.cluster,
statPrefix: "upstream.",
routePath: "",
tracing: tracing,
accessLogs: &cfgSnap.Proxy.AccessLogs,
logger: s.Logger,
idleTimeoutMs: &no_timeout,
requestTimeoutMs: &no_timeout,
}

if useHTTPFilter {
Expand Down Expand Up @@ -2398,6 +2401,7 @@ func makeTCPProxyFilter(opts listenerFilterOpts) (*envoy_listener_v3.Filter, err
AccessLog: accessLogs,
ClusterSpecifier: &envoy_tcp_proxy_v3.TcpProxy_Cluster{Cluster: opts.cluster},
StatPrefix: makeStatPrefix(opts.statPrefix, opts.filterName),
IdleTimeout: durationpb.New(time.Duration(0) * time.Millisecond),
}
return makeFilter("envoy.filters.network.tcp_proxy", cfg)
}
Expand Down

0 comments on commit 40fea4b

Please sign in to comment.