-
Notifications
You must be signed in to change notification settings - Fork 829
api: add more timeout fields to ClientTimeout #9315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7417ab4
6cb9bc3
973a1b4
96aec06
ec646b9
041b9b9
67f6266
66191af
f8799b4
070b6b7
376aaad
d6fd61a
d0f259d
c4a8a31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -214,6 +214,7 @@ func (t *Translator) buildXdsTCPListener( | |
| listenerDetails *ir.CoreListenerDetails, | ||
| keepalive *ir.TCPKeepalive, | ||
| connection *ir.ClientConnection, | ||
| timeout *ir.ClientTimeout, | ||
| accesslog *ir.AccessLog, | ||
| ) (*listenerv3.Listener, error) { | ||
| socketOptions := buildTCPSocketOptions(keepalive) | ||
|
|
@@ -249,6 +250,10 @@ func (t *Translator) buildXdsTCPListener( | |
| socketAddress.Ipv4Compat = true | ||
| } | ||
|
|
||
| if timeout != nil && timeout.TCP != nil && timeout.TCP.ConnectionInspectionTimeout != nil { | ||
| listener.ListenerFiltersTimeout = durationpb.New(timeout.TCP.ConnectionInspectionTimeout.Duration) | ||
|
Comment on lines
+253
to
+254
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When multiple HTTPS or TLS listeners share an address and port, only the first IR listener creates the xDS listener; subsequent listeners reuse it without revisiting Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| return listener, nil | ||
| } | ||
|
|
||
|
|
@@ -440,6 +445,10 @@ func (t *Translator) addHCMToXDSListener( | |
| mgr.RequestTimeout = durationpb.New(irListener.Timeout.HTTP.RequestReceivedTimeout.Duration) | ||
| } | ||
|
|
||
| if irListener.Timeout.HTTP.RequestHeadersReceivedTimeout != nil { | ||
| mgr.RequestHeadersTimeout = durationpb.New(irListener.Timeout.HTTP.RequestHeadersReceivedTimeout.Duration) | ||
| } | ||
|
|
||
| if irListener.Timeout.HTTP.IdleTimeout != nil { | ||
| mgr.CommonHttpProtocolOptions.IdleTimeout = durationpb.New(irListener.Timeout.HTTP.IdleTimeout.Duration) | ||
| } | ||
|
|
@@ -508,6 +517,10 @@ func (t *Translator) addHCMToXDSListener( | |
| Filters: filters, | ||
| } | ||
|
|
||
| if irListener.Timeout != nil && irListener.Timeout.TCP != nil && irListener.Timeout.TCP.TLSHandshakeTimeout != nil { | ||
| filterChain.TransportSocketConnectTimeout = durationpb.New(irListener.Timeout.TCP.TLSHandshakeTimeout.Duration) | ||
| } | ||
|
|
||
| if irListener.TLS != nil { | ||
| var tSocket *corev3.TransportSocket | ||
|
|
||
|
|
@@ -805,10 +818,16 @@ func buildTCPFilterChain( | |
| return nil, err | ||
| } | ||
|
|
||
| return &listenerv3.FilterChain{ | ||
| filterChain := &listenerv3.FilterChain{ | ||
| Filters: filters, | ||
| Name: tlsListenerFilterChainName(irRoute), | ||
| }, nil | ||
| } | ||
|
|
||
| if timeout != nil && timeout.TCP != nil && timeout.TCP.TLSHandshakeTimeout != nil { | ||
| filterChain.TransportSocketConnectTimeout = durationpb.New(timeout.TCP.TLSHandshakeTimeout.Duration) | ||
| } | ||
|
|
||
| return filterChain, nil | ||
| } | ||
|
|
||
| func buildConnectionLimitFilter(statPrefix string, connection *ir.ClientConnection) *connection_limitv3.ConnectionLimit { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Add support for more client timeout settings. The settings are [`ConnectionInspectionTimeout`](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/listener/v3/listener.proto#envoy-v3-api-field-config-listener-v3-listener-listener-filters-timeout), [`RequestHeadersReceivedTimeout`](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto#envoy-v3-api-field-extensions-filters-network-http-connection-manager-v3-httpconnectionmanager-request-headers-timeout) and [`TLSHandshakeTimeout`](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/listener/v3/listener_components.proto.html#envoy-v3-api-field-config-listener-v3-filterchain-transport-socket-connect-timeout) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.