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: combine services across different httproutes for traditional routes #6711

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

Conversation

randmonkey
Copy link
Contributor

@randmonkey randmonkey commented Nov 22, 2024

What this PR does / why we need it:

Combine rules sharing the same backends cross HTTPRoutes in the same namespace into a single Kong gateway service.
This PR resolves the case for traditional routes (traditional or traditional_compatible router flavor).

Which issue this PR fixes:

fixes #6726
Special notes for your reviewer:

Moved part of code for translating HTTPRoute to the package subtranslator.
GenerateKongRouteFromTranslation is used by the validation server so this function and its dependencies are not touched.
backendref.go and backendref_test.go are copied into subtranslator package since the original one is still used by GRPCRoute translator. Will process them in the later PR.

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@randmonkey randmonkey requested a review from a team as a code owner November 22, 2024 10:02
@randmonkey randmonkey marked this pull request as draft November 22, 2024 10:02
@randmonkey randmonkey force-pushed the feat/combine_service_across_httproutes branch 3 times, most recently from 01ab6bc to ffa0d85 Compare November 25, 2024 09:15
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 80.86785% with 97 lines in your changes missing coverage. Please review.

Project coverage is 79.2%. Comparing base (cfe2f17) to head (6d266d3).

Files with missing lines Patch % Lines
...al/dataplane/translator/subtranslator/httproute.go 80.4% 66 Missing and 13 partials ⚠️
...l/dataplane/translator/subtranslator/backendref.go 84.6% 9 Missing and 3 partials ⚠️
...ternal/dataplane/translator/translate_httproute.go 76.0% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #6711     +/-   ##
=======================================
+ Coverage   78.0%   79.2%   +1.2%     
=======================================
  Files        204     205      +1     
  Lines      23870   24110    +240     
=======================================
+ Hits       18623   19105    +482     
+ Misses      4303    4043    -260     
- Partials     944     962     +18     

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

@randmonkey randmonkey force-pushed the feat/combine_service_across_httproutes branch from ffa0d85 to 3f8b4b8 Compare November 26, 2024 08:28
@randmonkey randmonkey marked this pull request as ready for review November 26, 2024 10:43
@randmonkey randmonkey changed the title [WIP] feat: combine services across different httproutes feat: combine services across different httproutes for traditional routes Nov 26, 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.

Combine Gateway services from different HTTPRoutes for traditional or traditional_compatible router
1 participant