Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions api/v1alpha1/timeout_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ type ClientTimeout struct {
//
// +optional
HTTP *HTTPClientTimeout `json:"http,omitempty"`

// ListenerFiltersTimeout is the duration envoy waits for all listener filters to complete operation.
// If the timeout is reached, the accepted socket is closed without a connection being created.
// Specify 0 to disable the timeout.
// Default: 15 seconds.
//
// +optional
ListenerFiltersTimeout *gwapiv1.Duration `json:"listenerFiltersTimeout,omitempty"`
}

// TCPClientTimeout only provides timeout configuration on the listener whose protocol is TCP or TLS.
Expand All @@ -81,6 +89,13 @@ type TCPClientTimeout struct {
//
// +optional
IdleTimeout *gwapiv1.Duration `json:"idleTimeout,omitempty"`

// TransportSocketConnectTimeout is the duration envoy waits for incoming connections to complete any transport socket negotiations.
// If this expires before the transport reports connection establishment, the connection is summarily closed.
// Default: 5 seconds.
//
// +optional
TransportSocketConnectTimeout *gwapiv1.Duration `json:"transportSocketConnectTimeout,omitempty"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Regenerate CRDs for the new timeout fields

The generated CRDs were not updated for these API additions: the shipped ClientTrafficPolicy schema still lists only the old timeout properties under charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_clienttrafficpolicies.yaml:1298-1333, and repo-wide search finds the new JSON names only in this Go file. With those manifests installed, Kubernetes will drop or reject listenerFiltersTimeout, transportSocketConnectTimeout, and requestHeadersTimeout, so users cannot actually configure the new API fields.

Useful? React with 👍 / 👎.

}

type HTTPClientTimeout struct {
Expand All @@ -101,4 +116,13 @@ type HTTPClientTimeout struct {
//
// +optional
StreamIdleTimeout *gwapiv1.Duration `json:"streamIdleTimeout,omitempty"`

// RequestHeadersTimeout is the duration envoy waits for the request headers to arrive.
// The timer is activated when the first byte of the headers is received,
// and is disarmed when the last byte of the headers has been received.
// Specify 0 to disable the timeout.
// Default: 10 seconds.
//
// +optional
RequestHeadersTimeout *gwapiv1.Duration `json:"requestHeadersTimeout,omitempty"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Propagate the new timeout fields into xDS

These newly exposed ClientTrafficPolicy fields are never read by the controller: buildClientTimeout still only copies TCP idleTimeout and HTTP requestReceivedTimeout/idleTimeout/streamIdleTimeout into IR (internal/gatewayapi/clienttrafficpolicy.go:850-887), and the IR/translator only has those existing fields. In any cluster where a user sets requestHeadersTimeout, listenerFiltersTimeout, or transportSocketConnectTimeout, the accepted value produces unchanged Envoy config, so the API silently has no effect.

Useful? React with 👍 / 👎.

}
15 changes: 15 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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
Expand Up @@ -1307,6 +1307,15 @@ spec:
Default: 1 hour.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
requestHeadersTimeout:
description: |-
RequestHeadersTimeout is the duration envoy waits for the request headers to arrive.
The timer is activated when the first byte of the headers is received,
and is disarmed when the last byte of the headers has been received.
Specify 0 to disable the timeout.
Default: 10 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
requestReceivedTimeout:
description: |-
RequestReceivedTimeout is the duration envoy waits for the complete request reception. This timer starts upon request
Expand All @@ -1320,6 +1329,14 @@ spec:
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
listenerFiltersTimeout:
description: |-
ListenerFiltersTimeout is the duration envoy waits for all listener filters to complete operation.
If the timeout is reached, the accepted socket is closed without a connection being created.
Specify 0 to disable the timeout.
Default: 15 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
tcp:
description: Timeout settings for TCP.
properties:
Expand All @@ -1330,6 +1347,13 @@ spec:
Default: 1 hour.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
transportSocketConnectTimeout:
description: |-
TransportSocketConnectTimeout is the duration envoy waits for incoming connections to complete any transport socket negotiations.
If this expires before the transport reports connection establishment, the connection is summarily closed.
Default: 5 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
type: object
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,15 @@ spec:
Default: 1 hour.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
requestHeadersTimeout:
description: |-
RequestHeadersTimeout is the duration envoy waits for the request headers to arrive.
The timer is activated when the first byte of the headers is received,
and is disarmed when the last byte of the headers has been received.
Specify 0 to disable the timeout.
Default: 10 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
requestReceivedTimeout:
description: |-
RequestReceivedTimeout is the duration envoy waits for the complete request reception. This timer starts upon request
Expand All @@ -1319,6 +1328,14 @@ spec:
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
listenerFiltersTimeout:
description: |-
ListenerFiltersTimeout is the duration envoy waits for all listener filters to complete operation.
If the timeout is reached, the accepted socket is closed without a connection being created.
Specify 0 to disable the timeout.
Default: 15 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
tcp:
description: Timeout settings for TCP.
properties:
Expand All @@ -1329,6 +1346,13 @@ spec:
Default: 1 hour.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
transportSocketConnectTimeout:
description: |-
TransportSocketConnectTimeout is the duration envoy waits for incoming connections to complete any transport socket negotiations.
If this expires before the transport reports connection establishment, the connection is summarily closed.
Default: 5 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
type: object
tls:
Expand Down
3 changes: 3 additions & 0 deletions site/content/en/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,7 @@ _Appears in:_
| --- | --- | --- | --- | --- |
| `tcp` | _[TCPClientTimeout](#tcpclienttimeout)_ | false | | Timeout settings for TCP. |
| `http` | _[HTTPClientTimeout](#httpclienttimeout)_ | false | | Timeout settings for HTTP. |
| `listenerFiltersTimeout` | _[Duration](https://gateway-api.sigs.k8s.io/reference/api-spec/1.5/spec/#duration)_ | false | | ListenerFiltersTimeout is the duration envoy waits for all listener filters to complete operation.<br />If the timeout is reached, the accepted socket is closed without a connection being created.<br />Specify 0 to disable the timeout.<br />Default: 15 seconds. |


#### ClientTrafficPolicy
Expand Down Expand Up @@ -2967,6 +2968,7 @@ _Appears in:_
| `requestReceivedTimeout` | _[Duration](https://gateway-api.sigs.k8s.io/reference/api-spec/1.5/spec/#duration)_ | false | | RequestReceivedTimeout is the duration envoy waits for the complete request reception. This timer starts upon request<br />initiation and stops when either the last byte of the request is sent upstream or when the response begins. |
| `idleTimeout` | _[Duration](https://gateway-api.sigs.k8s.io/reference/api-spec/1.5/spec/#duration)_ | false | | IdleTimeout for an HTTP connection. Idle time is defined as a period in which there are no active requests in the connection.<br />Default: 1 hour. |
| `streamIdleTimeout` | _[Duration](https://gateway-api.sigs.k8s.io/reference/api-spec/1.5/spec/#duration)_ | false | | The stream idle timeout defines the amount of time a stream can exist without any upstream or downstream activity.<br /> Default: 5 minutes. |
| `requestHeadersTimeout` | _[Duration](https://gateway-api.sigs.k8s.io/reference/api-spec/1.5/spec/#duration)_ | false | | RequestHeadersTimeout is the duration envoy waits for the request headers to arrive.<br />The timer is activated when the first byte of the headers is received,<br />and is disarmed when the last byte of the headers has been received.<br />Specify 0 to disable the timeout.<br />Default: 10 seconds. |


#### HTTPCookieMatch
Expand Down Expand Up @@ -6094,6 +6096,7 @@ _Appears in:_
| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `idleTimeout` | _[Duration](https://gateway-api.sigs.k8s.io/reference/api-spec/1.5/spec/#duration)_ | false | | IdleTimeout for a TCP connection. Idle time is defined as a period in which there are no<br />bytes sent or received on either the upstream or downstream connection.<br />Default: 1 hour. |
| `transportSocketConnectTimeout` | _[Duration](https://gateway-api.sigs.k8s.io/reference/api-spec/1.5/spec/#duration)_ | false | | TransportSocketConnectTimeout is the duration envoy waits for incoming connections to complete any transport socket negotiations.<br />If this expires before the transport reports connection establishment, the connection is summarily closed.<br />Default: 5 seconds. |


#### TCPKeepalive
Expand Down
24 changes: 24 additions & 0 deletions test/helm/gateway-crds-helm/all.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27589,6 +27589,15 @@ spec:
Default: 1 hour.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
requestHeadersTimeout:
description: |-
RequestHeadersTimeout is the duration envoy waits for the request headers to arrive.
The timer is activated when the first byte of the headers is received,
and is disarmed when the last byte of the headers has been received.
Specify 0 to disable the timeout.
Default: 10 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
requestReceivedTimeout:
description: |-
RequestReceivedTimeout is the duration envoy waits for the complete request reception. This timer starts upon request
Expand All @@ -27602,6 +27611,14 @@ spec:
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
listenerFiltersTimeout:
description: |-
ListenerFiltersTimeout is the duration envoy waits for all listener filters to complete operation.
If the timeout is reached, the accepted socket is closed without a connection being created.
Specify 0 to disable the timeout.
Default: 15 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
tcp:
description: Timeout settings for TCP.
properties:
Expand All @@ -27612,6 +27629,13 @@ spec:
Default: 1 hour.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
transportSocketConnectTimeout:
description: |-
TransportSocketConnectTimeout is the duration envoy waits for incoming connections to complete any transport socket negotiations.
If this expires before the transport reports connection establishment, the connection is summarily closed.
Default: 5 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
type: object
tls:
Expand Down
24 changes: 24 additions & 0 deletions test/helm/gateway-crds-helm/e2e.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5562,6 +5562,15 @@ spec:
Default: 1 hour.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
requestHeadersTimeout:
description: |-
RequestHeadersTimeout is the duration envoy waits for the request headers to arrive.
The timer is activated when the first byte of the headers is received,
and is disarmed when the last byte of the headers has been received.
Specify 0 to disable the timeout.
Default: 10 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
requestReceivedTimeout:
description: |-
RequestReceivedTimeout is the duration envoy waits for the complete request reception. This timer starts upon request
Expand All @@ -5575,6 +5584,14 @@ spec:
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
listenerFiltersTimeout:
description: |-
ListenerFiltersTimeout is the duration envoy waits for all listener filters to complete operation.
If the timeout is reached, the accepted socket is closed without a connection being created.
Specify 0 to disable the timeout.
Default: 15 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
tcp:
description: Timeout settings for TCP.
properties:
Expand All @@ -5585,6 +5602,13 @@ spec:
Default: 1 hour.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
transportSocketConnectTimeout:
description: |-
TransportSocketConnectTimeout is the duration envoy waits for incoming connections to complete any transport socket negotiations.
If this expires before the transport reports connection establishment, the connection is summarily closed.
Default: 5 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
type: object
tls:
Expand Down
24 changes: 24 additions & 0 deletions test/helm/gateway-crds-helm/envoy-gateway-crds.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5562,6 +5562,15 @@ spec:
Default: 1 hour.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
requestHeadersTimeout:
description: |-
RequestHeadersTimeout is the duration envoy waits for the request headers to arrive.
The timer is activated when the first byte of the headers is received,
and is disarmed when the last byte of the headers has been received.
Specify 0 to disable the timeout.
Default: 10 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
requestReceivedTimeout:
description: |-
RequestReceivedTimeout is the duration envoy waits for the complete request reception. This timer starts upon request
Expand All @@ -5575,6 +5584,14 @@ spec:
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
listenerFiltersTimeout:
description: |-
ListenerFiltersTimeout is the duration envoy waits for all listener filters to complete operation.
If the timeout is reached, the accepted socket is closed without a connection being created.
Specify 0 to disable the timeout.
Default: 15 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
tcp:
description: Timeout settings for TCP.
properties:
Expand All @@ -5585,6 +5602,13 @@ spec:
Default: 1 hour.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
transportSocketConnectTimeout:
description: |-
TransportSocketConnectTimeout is the duration envoy waits for incoming connections to complete any transport socket negotiations.
If this expires before the transport reports connection establishment, the connection is summarily closed.
Default: 5 seconds.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
type: object
tls:
Expand Down
Loading