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

proxy api: support destination ip/port matching #9485

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

Conversation

stevenctl
Copy link
Contributor

@stevenctl stevenctl commented May 14, 2024

Description

Allow filter chain matches to match on destination IP/port.

This bug fixes ... \ This new feature can be used to ...

API changes

In Matcher added:

  • uint32 destination_port
  • CidrRange[] prefix_ranges

(continuing to duplicate what envoy has)

Code changes

Implement the translation from Proxy to Envoy xDS for the new fields.
This was only done in the same places that SourcePrefixRanges were already uses.

Context

Related to #9471

Interesting decisions

We chose to do things this way because ...

Testing steps

I manually verified behavior by relying on it in an experimental fork.

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
  • I have added tests that prove my fix is effective or that my feature works

@stevenctl stevenctl requested a review from a team as a code owner May 14, 2024 21:23
@github-actions github-actions bot added the keep pr updated signals bulldozer to keep pr up to date with base branch label May 14, 2024
Copy link

github-actions bot commented May 14, 2024

Visit the preview URL for this PR (updated for commit 2c0ba48):

https://gloo-edge--pr9485-stevenctl-proxy-matc-1bxrsouj.web.app

(expires Fri, 07 Jun 2024 17:02:44 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 77c2b86e287749579b7ff9cadb81e099042ef677

Copy link
Contributor

@sam-heilbron sam-heilbron left a comment

Choose a reason for hiding this comment

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

Changes LGTM! Could we add some basic unit tests to demonstrate the new matching capabilities and perhaps an e2e test as well to show that the traffic is routed appropriately? https://github.com/solo-io/gloo/blob/main/test/e2e/hybrid_test.go#L172 Might be a good set of tests to build off of

@stevenctl
Copy link
Contributor Author

@sam-heilbron should be good to go

projects/gateway/api/v1/gateway.proto Outdated Show resolved Hide resolved
projects/gateway/api/v1/gateway.proto Outdated Show resolved Hide resolved
projects/gateway/api/v1/gateway.proto Outdated Show resolved Hide resolved
EItanya
EItanya previously approved these changes May 23, 2024
@stevenctl stevenctl enabled auto-merge (squash) May 23, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep pr updated signals bulldozer to keep pr up to date with base branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants