Skip to content
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(policy): Add CTP support for TCP/TLS listeners #3337

Merged
merged 13 commits into from
May 22, 2024

Conversation

aoledk
Copy link
Contributor

@aoledk aoledk commented May 7, 2024

What this PR does / why we need it:

Enable user to attach ClientTrafficPolicy 1 to TCP/TLS listeners, available fields are:

Which issue(s) this PR fixes:

Fixes #3163

Footnotes

  1. https://gateway.envoyproxy.io/v1.0.1/api/extension_types/#clienttrafficpolicyspec

  2. https://gateway.envoyproxy.io/latest/api/extension_types/#clienttimeout

Signed-off-by: Dingkang Li <dingkang1743@gmail.com>
@aoledk aoledk marked this pull request as ready for review May 8, 2024 06:40
@aoledk aoledk requested a review from a team as a code owner May 8, 2024 06:40
aoledk added 4 commits May 8, 2024 15:51
Signed-off-by: Dingkang Li <dingkang1743@gmail.com>
Signed-off-by: Dingkang Li <dingkang1743@gmail.com>
Signed-off-by: Dingkang Li <dingkang1743@gmail.com>
@aoledk
Copy link
Contributor Author

aoledk commented May 11, 2024

/retest

aoledk added 2 commits May 13, 2024 10:54
Signed-off-by: Dingkang Li <dingkang1743@gmail.com>
@aoledk
Copy link
Contributor Author

aoledk commented May 15, 2024

/retest

@@ -327,6 +324,14 @@ func validatePortOverlapForClientTrafficPolicy(l *ListenerContext, xds *ir.Xds,
}
}

var tcpIR *ir.TCPListener
Copy link
Contributor

Choose a reason for hiding this comment

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

tcpIR is unused here, lets add it when needed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure.

@aoledk
Copy link
Contributor Author

aoledk commented May 16, 2024

/retest

@aoledk
Copy link
Contributor Author

aoledk commented May 17, 2024

/retest

@aoledk aoledk requested a review from arkodg May 20, 2024 07:38
Copy link

codecov bot commented May 20, 2024

Codecov Report

Attention: Patch coverage is 80.45977% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 67.43%. Comparing base (8206e11) to head (926a50b).

Files Patch % Lines
internal/gatewayapi/clienttrafficpolicy.go 77.92% 14 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3337      +/-   ##
==========================================
+ Coverage   67.41%   67.43%   +0.02%     
==========================================
  Files         166      166              
  Lines       19186    19214      +28     
==========================================
+ Hits        12934    12957      +23     
- Misses       5322     5325       +3     
- Partials      930      932       +2     

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

@aoledk
Copy link
Contributor Author

aoledk commented May 22, 2024

@arkodg Do you think whether it's necessary to split this big PR to multiple small PRs for easier review ? Each small PR for single field in CTP.

@arkodg
Copy link
Contributor

arkodg commented May 22, 2024

@arkodg Do you think whether it's necessary to split this big PR to multiple small PRs for easier review ? Each small PR for single field in CTP.

sorry for the delay in reviewing this one, on it !

Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM thanks !

@arkodg arkodg requested a review from a team May 22, 2024 22:06
@arkodg arkodg requested a review from a team May 22, 2024 22:06
Copy link
Member

@zhaohuabing zhaohuabing left a comment

Choose a reason for hiding this comment

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

LGTM thanks for adding this!

@arkodg arkodg merged commit 99f9132 into envoyproxy:main May 22, 2024
23 checks passed
@aoledk aoledk deleted the ctp-for-tcp branch May 23, 2024 01:47
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 ClientTrafficPolicy for TCP Listener
3 participants