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

gateway2: allow route delegation using well known label #10561

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

shashankram
Copy link

Description

There is a product requirement to enable users to use a label to select HTTPRoutes to delegate to instead of GVK ref to other HTTPRoutes (includes wildcards).

To strike a balance between flexibility and performance, this change implements the proposal to use a well known label delegation.gateway.solo.io/label=<value> to allow users to delegate to other HTTPRoutes using a label. HTTPRoutes are indexed using this well known label key that enable O(1) lookups of routes matching this label value.

API changes

New delegation.gateway.solo.io/label label to select HTTPRoutes to delegate to.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation TODO
  • I have added tests that prove my fix is effective or that my feature works

@solo-changelog-bot
Copy link

Issues linked to changelog:
https://github.com/solo-io/solo-projects/issues/7626

@shashankram shashankram changed the title gateway2: allow route delegation using wellknown label gateway2: allow route delegation using well known label Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Visit the preview URL for this PR (updated for commit 24b6099):

https://gloo-edge--pr10561-shashankram-deleg-la-p5mpuwbn.web.app

(expires Fri, 17 Jan 2025 16:02:04 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 77c2b86e287749579b7ff9cadb81e099042ef677

Copy link
Member

@yuval-k yuval-k left a comment

Choose a reason for hiding this comment

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

over all looks good

There is a product requirement to enable users to use
a label to select HTTPRoutes to delegate to instead
of GVK ref to other HTTPRoutes (includes wildcards).

To strike a balance between flexibility and performance,
this change implements the proposal to use a well known
label `delegation.gateway.solo.io/label=<value>` to
allow users to delegate to other HTTPRoutes using a label.
HTTPRoutes are indexed using this well known label key that
enable O(1) lookups of routes matching this label value.

Also moves user-facing labels and annotations to the wellknown
pkg to consolidate them for visibility.

Signed-off-by: Shashank Ram <[email protected]>
@shashankram shashankram force-pushed the shashankram/deleg-label branch from da9989a to 24b6099 Compare January 10, 2025 15:49
Copy link
Member

@yuval-k yuval-k left a comment

Choose a reason for hiding this comment

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

lgtm

@soloio-bulldozer soloio-bulldozer bot merged commit 5b5e872 into main Jan 10, 2025
20 checks passed
@soloio-bulldozer soloio-bulldozer bot deleted the shashankram/deleg-label branch January 10, 2025 18:48
shashankram added a commit that referenced this pull request Jan 10, 2025
shashankram added a commit that referenced this pull request Jan 10, 2025
soloio-bulldozer bot pushed a commit that referenced this pull request Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants