Skip to content

Commit e42ef96

Browse files
committed
update GEP to match go types
1 parent e9ddc25 commit e42ef96

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

geps/gep-1713/index.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# GEP-1713: ListenerSets - Standard Mechanism to Merge Multiple Gateways
22

33
* Issue: [#1713](/kubernetes-sigs/gateway-api/issues/1713)
4-
* Status: Provisional
4+
* Status: Experimental
55

66
((See status definitions [here](/geps/overview/#gep-states).)
77

@@ -60,8 +60,7 @@ type GatewaySpec struct {
6060
}
6161

6262
type AllowedListeners struct {
63-
// TODO - discuss changing this to Same in the future
64-
// +kubebuilder:default={from: None}
63+
// +kubebuilder:default={from:Same}
6564
Namespaces *ListenerNamespaces `json:"namespaces,omitempty"`
6665
}
6766

@@ -71,12 +70,21 @@ type ListenerNamespaces struct {
7170
// values are:
7271
//
7372
// * Same: Only ListenerSets in the same namespace may be attached to this Gateway.
73+
// * Selector: ListenerSets in namespaces selected by the selector may be attached to this Gateway.:w
74+
// * All: ListenerSets in all namespaces may be attached to this Gateway.
7475
// * None: Only listeners defined in the Gateway's spec are allowed
7576
//
7677
// +optional
7778
// +kubebuilder:default=None
78-
// +kubebuilder:validation:Enum=Same;None
79+
// +kubebuilder:validation:Enum=Same;None;Selector;All
7980
From *FromNamespaces `json:"from,omitempty"`
81+
82+
// Selector must be specified when From is set to "Selector". In that case,
83+
// only ListenerSets in Namespaces matching this Selector will be selected by this
84+
// Gateway. This field is ignored for other values of "From".
85+
//
86+
// +optional
87+
Selector *metav1.LabelSelector `json:"selector,omitempty"`
8088
}
8189

8290
// ListenerSet defines a set of additional listeners to attach to an existing Gateway.
@@ -94,7 +102,7 @@ type ListenerSet struct {
94102
// ListenerSetSpec defines the desired state of a ListenerSet.
95103
type ListenerSetSpec struct {
96104
// ParentRef references the Gateway that the listeners are attached to.
97-
ParentRef ParentGatewayReference `json:"parentRef,omitempty"`
105+
ParentRef ParentGatewayReference `json:"parentRef"`
98106

99107
// Listeners associated with this ListenerSet. Listeners define
100108
// logical endpoints that are bound on this referenced parent Gateway's addresses.
@@ -119,9 +127,11 @@ type ListenerSetSpec struct {
119127
// network connections.
120128
type ListenerEntry struct {
121129
// Name is the name of the Listener. This name MUST be unique within a
122-
// Gateway.
130+
// ListenerSet.
123131
//
124-
// Support: Core
132+
// Name is not required to be unique across a Gateway and ListenerSets.
133+
// Routes can attach to a Listener by having a ListenerSet as a parentRef
134+
// and setting the SectionName
125135
Name SectionName `json:"name"`
126136

127137
// Hostname specifies the virtual hostname to match for protocol types that
@@ -149,8 +159,6 @@ type ListenerEntry struct {
149159
// as a suffix match. That means that a match for `*.example.com` would match
150160
// both `test.example.com`, and `foo.test.example.com`, but not `example.com`.
151161
//
152-
// Support: Core
153-
//
154162
// +optional
155163
Hostname *Hostname `json:"hostname,omitempty"`
156164

@@ -310,6 +318,10 @@ type ParentGatewayReference struct {
310318

311319
// Name is the name of the referent.
312320
Name ObjectName `json:"name"`
321+
322+
// Namespace is the name of the referent.
323+
// +optional
324+
Name *ObjectName `json:"namespace"`
313325
}
314326
```
315327

0 commit comments

Comments
 (0)