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 5 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 82.14936% with 98 lines in your changes missing coverage. Please review.

Project coverage is 78.2%. Comparing base (f187f31) to head (ffa3bbf).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...al/dataplane/translator/subtranslator/httproute.go 81.3% 66 Missing and 14 partials ⚠️
...l/dataplane/translator/subtranslator/backendref.go 84.6% 9 Missing and 3 partials ⚠️
...ternal/dataplane/translator/translate_httproute.go 76.9% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #6711     +/-   ##
=======================================
+ Coverage   77.8%   78.2%   +0.3%     
=======================================
  Files        204     205      +1     
  Lines      23870   24238    +368     
=======================================
+ Hits       18590   18965    +375     
+ Misses      4337    4318     -19     
- Partials     943     955     +12     

☔ 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
@randmonkey randmonkey force-pushed the feat/combine_service_across_httproutes branch from 6d266d3 to 6176841 Compare November 27, 2024 06:48
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
internal/dataplane/translator/translate_httproute.go Outdated Show resolved Hide resolved
internal/dataplane/translator/subtranslator/httproute.go Outdated Show resolved Hide resolved
@randmonkey randmonkey force-pushed the feat/combine_service_across_httproutes branch from 80affc6 to ffa3bbf Compare November 29, 2024 12:54
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
3 participants