Skip to content

Commit fcbcb47

Browse files
committed
update GEP to match go types
1 parent 559f4d7 commit fcbcb47

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

geps/gep-1713/index.md

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

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

@@ -70,12 +69,21 @@ type ListenerNamespaces struct {
7069
// values are:
7170
//
7271
// * 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
73+
// * All: ListenerSets in all namespaces may be attached to this Gateway.
7374
// * None: Only listeners defined in the Gateway's spec are allowed
7475
//
7576
// +optional
7677
// +kubebuilder:default=None
77-
// +kubebuilder:validation:Enum=Same;None
78+
// +kubebuilder:validation:Enum=Same;None;Selector;All
7879
From *FromNamespaces `json:"from,omitempty"`
80+
81+
// Selector must be specified when From is set to "Selector". In that case,
82+
// only ListenerSets in Namespaces matching this Selector will be selected by this
83+
// Gateway. This field is ignored for other values of "From".
84+
//
85+
// +optional
86+
Selector *metav1.LabelSelector `json:"selector,omitempty"`
7987
}
8088

8189
// ListenerSet defines a set of additional listeners to attach to an existing Gateway.
@@ -93,7 +101,7 @@ type ListenerSet struct {
93101
// ListenerSetSpec defines the desired state of a ListenerSet.
94102
type ListenerSetSpec struct {
95103
// ParentRef references the Gateway that the listeners are attached to.
96-
ParentRef ParentGatewayReference `json:"parentRef,omitempty"`
104+
ParentRef ParentGatewayReference `json:"parentRef"`
97105

98106
// Listeners associated with this ListenerSet. Listeners define
99107
// logical endpoints that are bound on this referenced parent Gateway's addresses.
@@ -118,9 +126,11 @@ type ListenerSetSpec struct {
118126
// network connections.
119127
type ListenerEntry struct {
120128
// Name is the name of the Listener. This name MUST be unique within a
121-
// Gateway.
129+
// ListenerSet.
122130
//
123-
// Support: Core
131+
// Name is not required to be unique across a Gateway and ListenerSets.
132+
// Routes can attach to a Listener by having a ListenerSet as a parentRef
133+
// and setting the SectionName
124134
Name SectionName `json:"name"`
125135

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

@@ -309,6 +317,10 @@ type ParentGatewayReference struct {
309317

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

0 commit comments

Comments
 (0)