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(translator): prefix TCP FilterChain name by irListener name #3738

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

aoledk
Copy link
Contributor

@aoledk aoledk commented Jul 3, 2024

What this PR does / why we need it:

Prefix TCP FilterChain name by irListener name, to let extension server can locate TCP FilterChain according to policy's targetRef(s).

xref #3461 (comment)

Signed-off-by: Dingkang Li <dingkang1743@gmail.com>
@aoledk aoledk requested a review from a team as a code owner July 3, 2024 07:48
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.91%. Comparing base (8be7e69) to head (562df20).
Report is 105 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3738      +/-   ##
==========================================
+ Coverage   67.89%   67.91%   +0.02%     
==========================================
  Files         187      187              
  Lines       23022    23022              
==========================================
+ Hits        15630    15635       +5     
+ Misses       6278     6273       -5     
  Partials     1114     1114              

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

@zhaohuabing
Copy link
Member

zhaohuabing commented Jul 5, 2024

No strong opinion on the filterchain name, but I think extension server should not make assumption on the structure of the filterchain name or any other names in the xDS. For example, assume the filterchain name will be in the form of "gateway name/listener name/routetype/route name".

This is just an implementation detail of the xDS translation. It's not part of the EG API. There's no guarantee that it won't change over time.

For EnvoyPatchPolicy, it's ok to use these names to find a specified field in the generated xDS, since it's made clear in the EG docs that EnvoyPatchPolicy' is unstable and the outcome may change across versions.

@aoledk
Copy link
Contributor Author

aoledk commented Jul 9, 2024

No strong opinion on the filterchain name, but I think extension server should not make assumption on the structure of the filterchain name or any other names in the xDS. For example, assume the filterchain name will be in the form of "gateway name/listener name/routetype/route name".

This is just an implementation detail of the xDS translation. It's not part of the EG API. There's no guarantee that it won't change over time.

For EnvoyPatchPolicy, it's ok to use these names to find a specified field in the generated xDS, since it's made clear in the EG docs that EnvoyPatchPolicy' is unstable and the outcome may change across versions.

You are correct, this proposal has coupled EG with Extension Server on very unreliable contracts. Perhaps we need to brainstorm other solutions to let Extension Server can detect which FilterChain should be targeted by policies.

Here is a new proposal by @modatwork #3461 (comment)

@modatwork
Copy link

This is just an implementation detail of the xDS translation. It's not part of the EG API. There's no guarantee that it won't change over time.

+1.

However, there is currently no stable method for the extension server to manage the SectionName within the policy API. Can we include this PR in the next release? It’s significant for extensibility.

zhaohuabing
zhaohuabing previously approved these changes Jul 22, 2024
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 with the caveat that FilterChain name is not a contract for extension severs.

@arkodg
Copy link
Contributor

arkodg commented Jul 30, 2024

can you instead update the IR name

func irTCPRouteName(route RouteContext) string {
?

@aoledk
Copy link
Contributor Author

aoledk commented Jul 30, 2024

can you instead update the IR name

func irTCPRouteName(route RouteContext) string {

?

Sure, I can do this since each new ir.TCPRoute or ir.UDPRoute is being attached to unique irListener.

Signed-off-by: Dingkang Li <dingkang1743@gmail.com>
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale label Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants