feat: add transportSocketConnectTimeout on ListenerPolicy#14058
Merged
Conversation
Signed-off-by: Lahiru De Silva <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds transportSocketConnectTimeout support to ListenerPolicy, allowing configured timeouts to propagate to Envoy filter chains after listener filter chains are built.
Changes:
- Adds the API field, deepcopy support, and CRD schema entries.
- Adds a post-listener translation hook and invokes it after filter chain construction.
- Implements ListenerPolicy propagation/merge behavior and adds a translator golden test.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
api/v1alpha1/kgateway/listener_policy_types.go |
Adds the new ListenerPolicy field and validation. |
api/v1alpha1/kgateway/zz_generated.deepcopy.go |
Adds deepcopy handling for the new duration field. |
install/helm/kgateway-crds/templates/gateway.kgateway.dev_listenerpolicies.yaml |
Updates CRD schemas for default and per-port configs. |
pkg/pluginsdk/ir/iface.go |
Adds the post-listener translation hook. |
pkg/kgateway/translator/irtranslator/gateway.go |
Runs post-listener plugins after filter chains are built. |
pkg/kgateway/extensions2/plugins/listenerpolicy/listener_plugin.go |
Stores and applies the timeout to all listener filter chains. |
pkg/kgateway/extensions2/plugins/listenerpolicy/merge.go |
Adds merge support for the new field. |
pkg/kgateway/translator/gateway/gateway_translator_test.go |
Adds the translator test case. |
pkg/kgateway/translator/gateway/testutils/inputs/listener-policy/transport-socket-connect-timeout.yaml |
Adds test input manifests. |
pkg/kgateway/translator/gateway/testutils/outputs/listener-policy/transport-socket-connect-timeout.yaml |
Adds expected translated output. |
Files not reviewed (1)
- api/v1alpha1/kgateway/zz_generated.deepcopy.go: Language not supported
Comment on lines
+136
to
+140
| // ApplyPostListener is called 1 time per listener, after FilterChains are built. | ||
| ApplyPostListener( | ||
| pCtx *ListenerContext, | ||
| out *envoylistenerv3.Listener, | ||
| ) |
NomadXD
marked this pull request as draft
May 19, 2026 10:04
Contributor
|
@NomadXD This PR looks reasonable but can you add more tests to cover the scenario where you |
NomadXD
marked this pull request as ready for review
June 2, 2026 02:15
Signed-off-by: Lahiru De Silva <[email protected]>
Signed-off-by: Lahiru De Silva <[email protected]>
andy-fong
approved these changes
Jun 25, 2026
# Conflicts: # pkg/kgateway/extensions2/plugins/listenerpolicy/merge.go
andy-fong
approved these changes
Jul 13, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 13, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 13, 2026
Contributor
|
@NomadXD can you please update to the latest main and regenerate the golden yamls ? |
Signed-off-by: Lahiru De Silva <[email protected]>
Contributor
Author
|
/retest |
davidjumani
approved these changes
Jul 15, 2026
sheidkamp
pushed a commit
to sheidkamp/kgateway
that referenced
this pull request
Jul 16, 2026
…ev#14058) Signed-off-by: Lahiru De Silva <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
transportSocketConnectTimeouton ListenerPolicy which gets propagated toFilterChain.transport_socket_connect_timeouton every filter chain of each matched listener. Envoy uses this to limit the time it waits for a TLS handshake to complete after accepting a connection which protects the listener from clients that open connections and never finish the handshake.Fixes #13919
Change Type
Changelog
Additional Notes
ApplyPostListener) to thepluginsdk/ir.ProxyTranslationPassinterface. Plugins that embedUnimplementedProxyTranslationPassare unaffected. Any plugin implementing the interface directly will need a no-op method.