Skip to content

feat: add UDP client idle timeout to ClientTrafficPolicy - #10111

Open
zhaohuabing wants to merge 22 commits into
envoyproxy:mainfrom
zhaohuabing:udp-idle-timeout
Open

zhaohuabing wants to merge 22 commits into
envoyproxy:mainfrom
zhaohuabing:udp-idle-timeout

Conversation

@zhaohuabing

@zhaohuabing zhaohuabing commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Adds ClientTrafficPolicy.spec.timeout.udp.idleTimeout, which sets idle_timeout on the UDP proxy filter. Envoy Gateway never set it, so every UDP session used Envoy's 60s default.

This follows #10110. Once the shutdown manager waits on active UDP sessions, this timeout decides how soon UDP traffic goes quiet during a drain. Lowering drainTimeout also shortens the wait, but it cuts off TCP and HTTP connections too.

@netlify

netlify Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cerulean-figolla-1f9435 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 7fd870f
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6b0d00b1a7db866b8ad05ca6
😎 Deploy Preview https://deploy-preview-10111--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@zhaohuabing
zhaohuabing force-pushed the udp-idle-timeout branch 2 times, most recently from ed2335e to cc46215 Compare September 25, 2026 14:27
@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.86%. Comparing base (a50bb96) to head (7fd870f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10111      +/-   ##
==========================================
+ Coverage   82.84%   82.86%   +0.02%     
==========================================
  Files         279      279              
  Lines       44687    44704      +17     
==========================================
+ Hits        37019    37043      +24     
+ Misses       7667     7660       -7     
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zhaohuabing zhaohuabing changed the title api: add UDP client idle timeout to ClientTrafficPolicy feat: add UDP client idle timeout to ClientTrafficPolicy Oct 16, 2026
@zhaohuabing
zhaohuabing marked this pull request as ready for review October 16, 2026 07:14
@zhaohuabing
zhaohuabing requested a review from a team as a code owner October 16, 2026 07:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-30T04:51:06.495170Z 7fd870f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@zhaohuabing
zhaohuabing marked this pull request as draft October 16, 2026 08:14
@zhaohuabing

Copy link
Copy Markdown
Member Author

/retest

@zhaohuabing
zhaohuabing marked this pull request as ready for review November 11, 2026 01:51
@zhaohuabing zhaohuabing added this to the v1.11.0-rc.1 Release milestone Nov 11, 2026
@github-actions github-actions Bot added the area/api API-related issues label Nov 11, 2026
@zhaohuabing
zhaohuabing force-pushed the udp-idle-timeout branch 4 times, most recently from afca2b1 to e3befda Compare November 14, 2026 04:53
zhaohuabing and others added 9 commits November 16, 2026 04:47
Adds ClientTrafficPolicy.spec.timeout.udp.idleTimeout so operators can
tune the idle timeout of UDP sessions on a UDP listener. Envoy Gateway
never set idle_timeout on the udp_proxy filter, so UDP sessions always
used Envoy's built-in 1 minute default.

The new field is plumbed from the API through the UDP listener IR into
UdpProxyConfig.idle_timeout.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
An invalid ClientTrafficPolicy no longer drops the UDP route. UDP
listeners only use the timeout, so errors in TCP-only fields such as
keepalive are reported without cutting off UDP traffic. Also cover a
Gateway-wide policy on TCP and UDP listeners and regenerate the CRD
helm test output.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
A bad keepalive or connection setting on the same policy used to block the UDP idle timeout too. Now only a bad UDP timeout skips it, and the other errors still show on the policy status.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Only the UDP listener builds the UDP idle timeout now, so a bad UDP value no
longer breaks HTTP or TCP listeners, and their IR no longer carries an unused
UDP block. The API docs also say the setting doesn't apply to HTTP/3.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
The unit test already covers how invalid UDP timeouts are handled, so the
extra golden fixture isn't needed.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
@zhaohuabing
zhaohuabing requested a review from a team November 16, 2026 07:47
@zhaohuabing
zhaohuabing requested a review from a team November 27, 2026 02:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api API-related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants