Skip to content

api: add more timeout fields to ClientTimeout - #9315

Merged
zhaohuabing merged 12 commits into
envoyproxy:mainfrom
HusseinKabbout:support-more-timeouts
Aug 6, 2026
Merged

api: add more timeout fields to ClientTimeout#9315
zhaohuabing merged 12 commits into
envoyproxy:mainfrom
HusseinKabbout:support-more-timeouts

Conversation

@HusseinKabbout

@HusseinKabbout HusseinKabbout commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?
Feature + API (non-breaking)

What this PR does / why we need it:

This PR exposes new Envoy proxy timeout settings in ClientTrafficPolicy when dealing with untrusted downstreams. By tweaking these new exposed settings, DoS protection can be improved depending on the use case.

The settings are:

Which issue(s) this PR fixes:

Fixes #9254

PR Checklist

  • Authorship & ownership: Coding agents / AI assistants are welcome, but I have reviewed every change, understand how and why it works, can explain and maintain it, and take full responsibility for this PR. I have not submitted generated output I do not understand.
  • DCO: All commits are signed off (git commit -s). See DCO: Sign your work.
  • API agreed first: If this PR contains API changes (changes under /api), the API was discussed and agreed before the implementation. The API change can be in a separate PR, or in the same PR, but the API must be agreed before implementation. N/A if this PR does not contain API changes.
  • Required checks pass: make generate gen-check, make lint, and the unit-test/coverage build pass. (Flaky e2e failures are not considered breakages, but gen-check, lint, and coverage MUST pass.)
  • Tests added/updated: New/changed code is covered by appropriate tests. N/A if this PR does not contain code changes.
  • Docs: User-facing changes update the docs, either in this PR or a follow-up PR. N/A if this PR does not contain user-facing changes.
  • Release notes: For any non-trivial change, added a release-note fragment under release-notes/current/<section>/<pr-number>-<slug>.md (see release-notes/current/README.md for sections and naming). N/A if this PR does not contain non-trivial changes.
  • Generated files committed: Ran make gen-check and committed the result if API/helm charts/modules changed.
  • Scope & compatibility: The PR is reasonably scoped (no unrelated changes) and preserves backward compatibility, or any breaking change is called out above and documented in release-notes/current/breaking_changes/.
  • Codex review: Requested a Codex review and addressed all of its comments.
  • Copilot review: Requested a Copilot review and addressed all of its comments.

@HusseinKabbout
HusseinKabbout requested a review from a team as a code owner June 23, 2026 13:04
@netlify

netlify Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 1c9779f
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a73de671ea1340008742cf8
😎 Deploy Preview https://deploy-preview-9315--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.

@HusseinKabbout

Copy link
Copy Markdown
Contributor Author

As instructed, I have created a PR to propose the new API changes before implementing anything.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7417ab4412

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread api/v1alpha1/timeout_types.go Outdated
Comment thread api/v1alpha1/timeout_types.go Outdated
@jukie

jukie commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@HusseinKabbout can you run make generate and make gen-check to confirm, then commit the result?

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.37037% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.16%. Comparing base (4b553e3) to head (1c9779f).

Files with missing lines Patch % Lines
internal/gatewayapi/clienttrafficpolicy.go 60.00% 3 Missing and 3 partials ⚠️
internal/xds/translator/listener.go 80.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9315      +/-   ##
==========================================
- Coverage   76.17%   76.16%   -0.02%     
==========================================
  Files         261      261              
  Lines       43528    43553      +25     
==========================================
+ Hits        33159    33173      +14     
- Misses       8165     8171       +6     
- Partials     2204     2209       +5     

☔ 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.

@HusseinKabbout

Copy link
Copy Markdown
Contributor Author

@HusseinKabbout can you run make generate and make gen-check to confirm, then commit the result?

Sure thing!

@arkodg arkodg added this to the v1.9.0-rc.1 Release milestone Jul 20, 2026
Comment thread api/v1alpha1/timeout_types.go Outdated
@HusseinKabbout
HusseinKabbout force-pushed the support-more-timeouts branch from 4141323 to 96aec06 Compare July 20, 2026 07:10
Comment thread api/v1alpha1/timeout_types.go Outdated
Comment thread api/v1alpha1/timeout_types.go Outdated
@HusseinKabbout
HusseinKabbout force-pushed the support-more-timeouts branch 2 times, most recently from 4805145 to f8799b4 Compare July 30, 2026 10:20
@HusseinKabbout

Copy link
Copy Markdown
Contributor Author

Based on the discussion, I think the API looks OK now. I can still rename the attributes but I think their place in the API is settled.

I went ahead and implemented the timouts. One open question I have is how does EG handle defaults? Should I explicitly set default values when they make sense (they do here)?

@HusseinKabbout

Copy link
Copy Markdown
Contributor Author

Regarding e2e tests, I did not find any EG timeout tests, only a conformance test related to Gateway API timeouts.

@HusseinKabbout

HusseinKabbout commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

@arkodg Do you think this can get in v1.9.0-rc.1 Release or is it maybe too late?

@zhaohuabing

Copy link
Copy Markdown
Member

@arkodg Do you think this can get in v1.9.0-rc.1 Release or is it maybe too late?

Hi @HusseinKabbout could you please rename HandshakeTimeout to TLSHandshakeTimeout? We may still be able to land this in v1.9.0.

Comment thread internal/ir/xds.go Outdated
@zhaohuabing

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4a8a31eee

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/xds/translator/listener.go

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you add a test case for xds translator to show the result of these new knobs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have added xds translation tests but found out that we also have the same issues for filter chain specific settings. If for example two listeners with the same address / port have two different values for requestReceivedTimeout (already existing setting) then the resulting filter chain will only contain the settings of the first listener. I think it is the same issue with the handshake timeout.

zhaohuabing
zhaohuabing previously approved these changes Aug 4, 2026

@zhaohuabing zhaohuabing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks!

It would be good to add xds test golden files as @zirain suggested.

@zhaohuabing

Copy link
Copy Markdown
Member

/retest

@zhaohuabing
zhaohuabing requested review from arkodg and zirain August 5, 2026 01:04
kabbohus and others added 12 commits August 6, 2026 09:07
Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
Co-authored-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: kabbohus <hussein.kabbout@hotmail.com>
Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
@zirain
zirain force-pushed the support-more-timeouts branch from a9c006e to 1c9779f Compare August 6, 2026 01:07
@zhaohuabing

Copy link
Copy Markdown
Member

/retest

@zhaohuabing
zhaohuabing merged commit 68f8320 into envoyproxy:main Aug 6, 2026
58 of 70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support more timeout settings

5 participants