generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 597
Closed
Labels
breaking-changekind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Milestone
Description
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:
- Expand Gateway selection config in Routes to mirror Route selection config from Gateways.
- Introduce a new
from
field in both cases withAll
orSelector
options. - Empty selector does not select anything.
- Default
from
toAll
on Gateway (bind to anything by default). - 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
kind: Gateway
metadata:
name: simple-gateway
labels:
gateway: xlb
spec:
gatewayClassName: acme-lb
listeners:
- protocol: HTTP
port: 80
routes:
kind: HTTPRoute
---
kind: HTTPRoute
metadata:
name: simple-route
namespace: gateway-api-example-ns2
spec:
gateways:
from: Selector
selector:
gateway: xlb
rules:
- matches:
- path:
type: Prefix
value: /
forwardTo:
- serviceName: my-bar-service1
port: 8080
Multi-Listener Example
kind: Gateway
metadata:
name: simple-gateway
labels:
gateway: xlb
spec:
gatewayClassName: acme-lb
listeners:
- protocol: HTTP
port: 80
routes:
kind: HTTPRoute
from: Selector
selector:
http-gateway: yes
- protocol: HTTPS
port: 443
routes:
kind: HTTPRoute
from: Selector
selector:
https-gateway: yes
---
kind: HTTPRoute
metadata:
name: simple-route
namespace: gateway-api-example-ns2
labels:
http-gateway: yes
spec:
gateways:
from: Selector
selector:
gateway: xlb
rules:
- matches:
- path:
type: Prefix
value: /
forwardTo:
- serviceName: my-bar-service1
port: 8080
<
5C0C
/div>
Metadata
Metadata
Assignees
Labels
breaking-changekind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.