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

Add Implementation-specific Path Match type #3717

Open
mlavacca opened this issue Mar 27, 2025 · 6 comments
Open

Add Implementation-specific Path Match type #3717

mlavacca opened this issue Mar 27, 2025 · 6 comments
Assignees
Labels
triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@mlavacca
Copy link
Member

mlavacca commented Mar 27, 2025

Problem Statement

There are currently three types of HTTPRoute path match:

  • Exact - core
  • PathPrefix (default) - core
  • RegularExpression - implementation-specific

The only reason for RegularExpression to be implementation-specific is the lack of a shared standard for regex.
What's missing here, though, is a real implementation-specific possibility such as the one provided by ingress:
https://github.com/kubernetes/kubernetes/blob/83bb5d570580a3f477737fec5c24ba8fc3554264/pkg/apis/networking/types.go#L546-L550.

Use case

At Kong, we have the need for this kind of path matching as the router can use a custom language that we would like to leverage in HTTPRoutes as well. This can be useful for other implementations as well.

@robscott
Copy link
Member

@mlavacca What if we supported a domain-prefixed match type (ie konghq.com/foo) that would allow implementation to support arbitrary matches as necessary?

@youngnick
Copy link
Contributor

domain-prefixed type seems like the way to go here, agreed.

@shaneutt shaneutt added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Mar 27, 2025
@shaneutt shaneutt moved this to Backlog in Gateway API Pipeline Mar 27, 2025
@shaneutt shaneutt added triage/needs-information Indicates an issue needs more information in order to work on it. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Mar 27, 2025
@shaneutt shaneutt moved this to Triage in Gateway API Pipeline Mar 27, 2025
@mlavacca
Copy link
Member Author

@mlavacca What if we supported a domain-prefixed match type (ie konghq.com/foo) that would allow implementation to support arbitrary matches as necessary?

Yep, that would certainly work. I like the idea.

@programmer04
Copy link
Contributor

The idea is to be able to support gateway-specific DSL in case something like that exists. For instance, for Kong, it looks like that expressions-language and sometimes its semantics do not fit well into PathPrefix or RegularExpression. It'd a way for power users to achieve whatever they want

@debuggedme
Copy link

There are some common requirements such as semver-based routing, which can be matched with regular expressions, but it would be better if custom capabilities were open.

@mlavacca mlavacca added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed triage/needs-information Indicates an issue needs more information in order to work on it. labels Apr 3, 2025
@mlavacca
Copy link
Member Author

mlavacca commented Apr 3, 2025

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: Triage
Development

No branches or pull requests

6 participants