-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add RequestID to ClientTrafficPolicy for controlling X-Request-ID header behavior #5283
base: main
Are you sure you want to change the base?
Conversation
Need to adjust the true|false logic |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5283 +/- ##
==========================================
- Coverage 64.97% 64.96% -0.02%
==========================================
Files 214 214
Lines 33532 33548 +16
==========================================
+ Hits 21789 21795 +6
- Misses 10400 10409 +9
- Partials 1343 1344 +1 ☔ View full report in Codecov by Sentry. |
/retest |
1 similar comment
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall LGTM, not sure if we can improve the naming here.
internal/gatewayapi/testdata/clienttrafficpolicy-mtls-forward-client-cert.out.yaml
Outdated
Show resolved
Hide resolved
/retest |
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
141240c
to
ea676fc
Compare
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]> Signed-off-by: Isaac <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks !
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
Signed-off-by: jukie <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks !
@@ -132,10 +132,18 @@ type HeaderSettings struct { | |||
// PreserveXRequestID configures Envoy to keep the X-Request-ID header if passed for a request that is edge | |||
// (Edge request is the request from external clients to front Envoy) and not reset it, which is the current Envoy behaviour. | |||
// It defaults to false. | |||
// Deprecated: use RequestID instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to mention what happens when both are set. Or, we should validate only either of them is set at CEL validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also it'd be more user friendly how they can use RequestID to configure the same. (i.e. set Preserve
)
@@ -638,8 +647,14 @@ type HeaderSettings struct { | |||
// PreserveXRequestID configures whether Envoy will keep the x-request-id header if passed for a request that is edge | |||
// (Edge request is the request from external clients to front Envoy) and not reset it, which is the current Envoy behaviour. | |||
// It defaults to false. | |||
// Deprecated: use RequestID instead | |||
PreserveXRequestID bool `json:"preserveXRequestID,omitempty" yaml:"preserveXRequestID,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just delete this field and use only RequestID
internally? Do we usually avoid breaking changes at IR level as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yah +1 to cleaning this up, can also be done in a follow up
What type of PR is this?
feat: allow disabling
generate_request_id
What this PR does / why we need it:
This allows for disabling Envoy's default behavior of generating an X-request-id header for every request. Generating a random UUID4 is expensive so in high throughput scenarios it's desirable to disable this.
Which issue(s) this PR fixes:
Fixes #5281
Release Notes: Yes