Skip to content

Commit 927d5f8

Browse files
committed
Fix some comments on GEP
1 parent 13f36cd commit 927d5f8

File tree

1 file changed

+43
-8
lines changed

1 file changed

+43
-8
lines changed

geps/gep-1713/index.md

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ type ListenerSetSpec struct {
109109
// Listeners in a `Gateway` and their attached `ListenerSets` are concatenated
110110
// as a list when programming the underlying infrastructure.
111111
//
112+
// <gateway:util:excludeFromCRD>
112113
// Listeners should be merged using the following precedence:
113114
//
114115
// 1. "parent" Gateway
@@ -118,12 +119,13 @@ type ListenerSetSpec struct {
118119
// Regarding Conflict Management, Listeners in a ListenerSet follow the same
119120
// rules of Listeners on a Gateway resource.
120121
//
121-
// This validation should happen within all of the ListenerSets attached to a
122+
// Listener validation should happen within all of the ListenerSets attached to a
122123
// Gateway, and the precedence of "parent Gateway" -> "oldest first" ->
123124
// "alphabetically ordered" should be respected.
124125
//
125126
// ListenerSets containing conflicting Listeners MUST set the Conflicted
126127
// Condition to true and clearly indicate which Listeners are conflicted.
128+
// </gateway:util:excludeFromCRD>
127129
//
128130
// +listType=map
129131
// +listMapKey=name
@@ -468,10 +470,41 @@ spec:
468470
sectionName: foo
469471
```
470472

471-
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`
473+
For instance, the following `HTTPRoute` attempts to attach to a listener defined in the parent `Gateway` using the sectionName `foo`, which also exists on a ListenerSet.
474+
This is not valid and the route's status `Accepted` condition should be set to `False`
472475

473476
```yaml
474477
apiVersion: gateway.networking.k8s.io/v1
478+
kind: Gateway
479+
metadata:
480+
name: parent-gateway
481+
spec:
482+
gatewayClassName: example
483+
allowedListeners:
484+
namespaces:
485+
from: Same
486+
listeners:
487+
- name: foo
488+
hostname: foo.com
489+
protocol: HTTP
490+
port: 80
491+
---
492+
apiVersion: gateway.networking.x-k8s.io/v1alpha1
493+
kind: ListenerSet
494+
metadata:
495+
name: first-workload-listeners
496+
spec:
497+
parentRef:
498+
name: parent-gateway
499+
kind: Gateway
500+
group: gateway.networking.k8s.io
501+
listeners:
502+
- name: foo
503+
hostname: first.foo.com
504+
protocol: HTTP
505+
port: 80
506+
---
507+
apiVersion: gateway.networking.k8s.io/v1
475508
kind: HTTPRoute
476509
metadata:
477510
name: httproute-example
@@ -481,9 +514,6 @@ spec:
481514
kind: Gateway
482515
sectionName: foo
483516
```
484-
>--- Ricardo - above is a bit confusing, maybe ask Dave some clarification
485-
486-
487517

488518
#### Optional Section Name
489519

@@ -570,12 +600,15 @@ ListenerSet conflicts should be managed similarly to [Gateway resource conflict]
570600
management.
571601

572602
With ListenerSet this validation should happen within the same ListenerSet resource,
573-
but MUST be validated also within a Gateway scope and all of the attached Listeners/ListenerSets.
603+
but MUST be validated also within a Gateway scope and all of the attached Listeners/ListenerSets. The SectionName field is an exception for this validation, and while
604+
it should not conflict within the same ListenerSet, it can be duplicated between
605+
different ListenerSets.
574606

575607
This means that the validation should happen now between distinct ListenerSets
576608
attached to the same Gateway, and in case of a conflict, the [Listener Precedence](#listener-precedence)
577-
should be respected, and the conflicting listener MUST have a `Conflicted` condition
578-
set to True and with an explicit reason on its message.
609+
should be respected, so the first Listener on the precedence list MUST be accepted,
610+
and should not have a `Conflicted` condition, while the conflicting listeners
611+
MUST have a `Conflicted` condition set to True and with an explicit reason on its message.
579612

580613
Following are some examples of a conflict situation:
581614

@@ -794,6 +827,8 @@ If a listener has a conflict, this should be reported in the `ListenerEntryStatu
794827

795828
Implementations SHOULD be cautious about what information from the parent or siblings are reported to avoid accidentally leaking sensitive information that the child would not otherwise have access to. This can include contents of secrets etc.
796829

830+
Conflicts are covered in the section [Listener and ListenerSet conflicts](#listener-and-listenerset-conflicts)
831+
797832
## Alternatives
798833

799834
### Re-using Gateway Resource

0 commit comments

Comments
 (0)