-
Notifications
You must be signed in to change notification settings - Fork 538
Simplify Gateway Route Binding #594
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
Comments
listeners:
- protocol: HTTP
port: 80
from: Selector
selector:
http-gateway: yes
routes:
kind: HTTPRoute Should this instead be: listeners:
- protocol: HTTP
port: 80
routes:
from: Selector
selector:
http-gateway: yes
kind: HTTPRoute ? |
@howardjohn thanks for catching that! Updated examples above. |
This looks great! Great flexibility, and the defaults make sense too. Solid +1 from me. |
To clarify, we now have 4 selectors for the most verbose case:
Can someone verify if this understanding is correct? |
Yep, you're completely right, the most verbose case is both very verbose and complex. I think the most common case is quite simple though - Route owners select the Gateway(s) they want to bind to. In many cases, this would be based on labels provided to them by Gateway admins. I think the more verbose/complex combination you mentioned above would likely only be used by teams where Gateway admins and Route admins were on different teams. In that scenario, Gateway admins would describe where they wanted to accept Routes from, and potentially add different label selection per listener. Route admins would still select Gateways as normal. I agree that this is a pretty complex use case, but I think it's something at least some organizations would find useful. |
My gut feeling is that the most complex case with 4 selectors at the same time will be rarely used, maybe never. All other cases with a subset of 4 selectors do make a lot of sense and I think they will be used based on the organization design of our users. With that said, I'd like endorse the proposal. |
Just want to write out a use case this would not cover - allowing routes to select which listener is applied. It may or may not be something we care about. For example: kind: Gateway
listeners:
- port: 80
- port: 90
- port: 100 Currently, a route can only select all or none of the gateway. A gateway can extend its selector to allow a route to sort of implicitly select itself: kind: Gateway
listeners:
- port: 80
routes:
selector:
port: 80
- port: 90
- port: 100
---
kind: Route
metadata:
labels:
port: 80 But this is not great for a couple of reasons:
|
@howardjohn That's a good point. Maybe ports are more similar in concept to hostname in that they could be represented with a matcher on Routes. So instead of Gateway binding, this would become more of request matching, even if the end result is nearly identical. |
Closing in favor of continuing discussion in #724. /close |
@robscott: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
At our last community meeting, we talked about ways we could simplify Gateway Route binding. That was centered around a relatively lengthy doc I'd written covering a few different options. Thanks to some great feedback in that meeting and in the doc, I think we've reached an option that makes a lot of sense. I wanted to raised this as an issue just so we had a bit more visibility on this and could track progress towards v1alpha2.
Here are the key parts of this proposal:
from
field in both cases withAll
orSelector
options.from
toAll
on Gateway (bind to anything by default).from
toSelector
on Routes (don't bind to anything by default, selector needs to be specified).SameNamespace
is default on Gateway and new Routes.Simple Example
Multi-Listener Example
The text was updated successfully, but these errors were encountered: