Skip to content

Commit 7239e0d

Browse files
committed
Improve some ListenetSet gep descriptions
1 parent bee090d commit 7239e0d

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

geps/gep-1713/index.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type GatewaySpec struct {
5959
}
6060

6161
type AllowedListeners struct {
62-
// +kubebuilder:default={from:Same}
62+
// +kubebuilder:default={from: None}
6363
Namespaces *ListenerNamespaces `json:"namespaces,omitempty"`
6464
}
6565

@@ -69,7 +69,7 @@ type ListenerNamespaces struct {
6969
// values are:
7070
//
7171
// * Same: Only ListenerSets in the same namespace may be attached to this Gateway.
72-
// * Selector: ListenerSets in namespaces selected by the selector may be attached to this Gateway.:w
72+
// * Selector: ListenerSets in namespaces selected by the selector may be attached to this Gateway.
7373
// * All: ListenerSets in all namespaces may be attached to this Gateway.
7474
// * None: Only listeners defined in the Gateway's spec are allowed
7575
//
@@ -332,13 +332,20 @@ type ParentGatewayReference struct {
332332

333333
The following example shows a `Gateway` with an HTTP listener and two child HTTPS `ListenerSets` with unique hostnames and certificates.
334334

335+
Only `ListenerSets` from the same namespace of the `Gateway` will be accepted:
336+
337+
338+
335339
```yaml
336340
apiVersion: gateway.networking.k8s.io/v1
337341
kind: Gateway
338342
metadata:
339343
name: parent-gateway
340344
spec:
341345
gatewayClassName: example
346+
allowedListeners:
347+
namespaces:
348+
from: Same
342349
listeners:
343350
- name: foo
344351
hostname: foo.com
@@ -417,7 +424,8 @@ metadata:
417424
name: parent-gateway
418425
spec:
419426
allowedListeners:
420-
- from: Same
427+
namespaces:
428+
from: Same
421429
```
422430

423431
### Route Attachment
@@ -438,35 +446,38 @@ spec:
438446
sectionName: second
439447
```
440448

441-
For instance, the following `HTTPRoute` attempts to attach to a listener defined in the parent `Gateway` using the sectionName `foo`. This is not valid and the route's status `Accepted` condition should be set to `False`
442-
449+
To attach to listeners in both a `Gateway` and `ListenerSet` the route MUST have two `parentRefs`:
443450
```yaml
444451
apiVersion: gateway.networking.k8s.io/v1
445452
kind: HTTPRoute
446453
metadata:
447454
name: httproute-example
448455
spec:
449456
parentRefs:
450-
- name: some-workload-listeners
457+
- name: second-workload-listeners
451458
kind: ListenerSet
459+
sectionName: second
460+
- name: parent-gateway
461+
kind: Gateway
452462
sectionName: foo
453463
```
454464

455-
To attach to listeners in both a `Gateway` and `ListenerSet` the route MUST have two `parentRefs`:
465+
For instance, the following `HTTPRoute` attempts to attach to a listener defined in the parent `Gateway` using the sectionName `foo`. This is not valid and the route's status `Accepted` condition should be set to `False`
466+
456467
```yaml
457468
apiVersion: gateway.networking.k8s.io/v1
458469
kind: HTTPRoute
459470
metadata:
460471
name: httproute-example
461472
spec:
462473
parentRefs:
463-
- name: second-workload-listeners
464-
kind: ListenerSet
465-
sectionName: second
466-
- name: parent-gateway
474+
- name: some-workload-listeners
467475
kind: Gateway
468476
sectionName: foo
469477
```
478+
>--- Ricardo - above is a bit confusing, maybe ask Dave some clarification
479+
480+
470481

471482
#### Optional Section Name
472483

0 commit comments

Comments
 (0)