Skip to content
Closed
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
8 changes: 8 additions & 0 deletions api/v1alpha1/timeout_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ type HTTPTimeout struct {
//
// +optional
RequestTimeout *gwapiv1.Duration `json:"requestTimeout,omitempty" yaml:"requestTimeout,omitempty"`

// StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
// When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
// This is particularly useful for gRPC streaming calls.
// Default: inherited from RequestTimeout.
//
// +optional
StreamTimeout *gwapiv1.Duration `json:"streamTimeout,omitempty"`
Comment on lines +48 to +55
Copy link
Contributor

Choose a reason for hiding this comment

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

RequestTimeout doesn't currently get evaluated for GRPCRoutes at all. What do you think about merging the two and treating RequestTimeout like this for GRPCRoutes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think keeping RequestTimeout and StreamTimeout separate is clearer for users, since unary and streaming gRPC calls often need different timeouts. Merging them could cause confusion or accidental misconfiguration. Explicit fields make the API more intuitive and safer for production use.

Copy link
Contributor

Choose a reason for hiding this comment

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

From the docs I'm a bit confused as to where the different timeouts intersect. It seems like the overall Route Timeout (which for HTTPRoutes get implemented via RequestTimeout) takes precedence over the Stream Timeout value but that might be irrelevant of your change here.

https://www.envoyproxy.io/docs/envoy/latest/faq/configuration/timeouts#route-timeouts

The route idle_timeout allows overriding of the HTTP connection manager stream_idle_timeout and does the same thing.

I agree they should stay separate, thanks!

}

type ClientTimeout struct {
Expand Down
5 changes: 5 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 @@ -1980,6 +1980,14 @@ spec:
response is received from the upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for TCP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,14 @@ spec:
entire response is received from the upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for TCP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11586,6 +11586,14 @@ spec:
upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for
Expand Down Expand Up @@ -12666,6 +12674,14 @@ spec:
upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for
Expand Down Expand Up @@ -13823,6 +13839,14 @@ spec:
from the upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for TCP.
Expand Down Expand Up @@ -14903,6 +14927,14 @@ spec:
upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for TCP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1489,6 +1489,14 @@ spec:
which entire response is received from the upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for TCP.
Expand Down Expand Up @@ -2467,6 +2475,14 @@ spec:
which entire response is received from the upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for TCP.
Expand Down Expand Up @@ -3653,6 +3669,14 @@ spec:
from the upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for TCP.
Expand Down Expand Up @@ -4870,6 +4894,14 @@ spec:
which entire response is received from the upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for TCP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,14 @@ spec:
response is received from the upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for TCP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,14 @@ spec:
entire response is received from the upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for TCP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11585,6 +11585,14 @@ spec:
upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for
Expand Down Expand Up @@ -12665,6 +12673,14 @@ spec:
upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for
Expand Down Expand Up @@ -13822,6 +13838,14 @@ spec:
from the upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for TCP.
Expand Down Expand Up @@ -14902,6 +14926,14 @@ spec:
upstream.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
streamTimeout:
description: |-
StreamTimeout is the timeout for streaming requests. This timeout does not apply to non-streaming requests.
When set to "0s", the timeout is disabled for streaming requests, allowing them to run indefinitely.
This is particularly useful for gRPC streaming calls.
Default: inherited from RequestTimeout.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
tcp:
description: Timeout settings for TCP.
Expand Down
Loading
Loading