Skip to content

api: add more timeout fields to ClientTimeout#9315

Open
HusseinKabbout wants to merge 2 commits into
envoyproxy:mainfrom
HusseinKabbout:support-more-timeouts
Open

api: add more timeout fields to ClientTimeout#9315
HusseinKabbout wants to merge 2 commits into
envoyproxy:mainfrom
HusseinKabbout:support-more-timeouts

Conversation

@HusseinKabbout

Copy link
Copy Markdown

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

Release Notes: Yes/No

Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
@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 6cb9bc3
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a3adacdb8e9a90008a60d7b
😎 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
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".

// 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 👍 / 👎.

// 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 👍 / 👎.

@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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.18%. Comparing base (0eb0d61) to head (6cb9bc3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9315      +/-   ##
==========================================
- Coverage   75.20%   75.18%   -0.02%     
==========================================
  Files         252      252              
  Lines       41049    41049              
==========================================
- Hits        30871    30864       -7     
- Misses       8085     8090       +5     
- Partials     2093     2095       +2     

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

Signed-off-by: kabbohus <hussein.kabbout@united-security-providers.ch>
@HusseinKabbout

Copy link
Copy Markdown
Author

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

Sure thing!

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

2 participants