@@ -30,13 +30,8 @@ import (
30
30
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status`
31
31
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
32
32
33
- // Gateway represents an instantiation of a service-traffic handling
34
- // infrastructure by binding Listeners to a set of IP addresses.
35
- //
36
- // Implementations should add the `gateway-exists-finalizer.gateway.networking.k8s.io`
37
- // finalizer on the associated GatewayClass whenever Gateway(s) is running.
38
- // This ensures that a GatewayClass associated with a Gateway(s) is not
39
- // deleted while in use.
33
+ // Gateway represents an instance of a service-traffic handling infrastructure
34
+ // by binding Listeners to a set of IP addresses.
40
35
type Gateway struct {
41
36
metav1.TypeMeta `json:",inline"`
42
37
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -52,7 +47,7 @@ type Gateway struct {
52
47
53
48
// +kubebuilder:object:root=true
54
49
55
- // GatewayList contains a list of Gateway .
50
+ // GatewayList contains a list of Gateways .
56
51
type GatewayList struct {
57
52
metav1.TypeMeta `json:",inline"`
58
53
metav1.ListMeta `json:"metadata,omitempty"`
@@ -118,18 +113,17 @@ type GatewaySpec struct {
118
113
// +kubebuilder:validation:MaxItems=64
119
114
Listeners []Listener `json:"listeners"`
120
115
121
- // Addresses requested for this gateway. This is optional and
122
- // behavior can depend on the GatewayClass. If a value is set
123
- // in the spec and the requested address is invalid, the
124
- // GatewayClass MUST indicate this in the associated entry in
125
- // GatewayStatus.Addresses.
116
+ // Addresses requested for this Gateway. This is optional and behavior can
117
+ // depend on the implementation. If a value is set in the spec and the
118
+ // requested address is invalid or unavailable, the implementation MUST
119
+ // indicate this in the associated entry in GatewayStatus.Addresses.
126
120
//
127
- // If no Addresses are specified, the GatewayClass may
128
- // schedule the Gateway in an implementation-defined manner,
129
- // assigning an appropriate set of Addresses.
121
+ // If no Addresses are specified, the implementation MAY schedule the
122
+ // Gateway in an implementation-specific manner, assigning an appropriate
123
+ // set of Addresses.
130
124
//
131
- // The GatewayClass MUST bind all Listeners to every
132
- // GatewayAddress that it assigns to the Gateway.
125
+ // The implementation MUST bind all Listeners to every GatewayAddress that
126
+ // it assigns to the Gateway.
133
127
//
134
128
// Support: Core
135
129
//
@@ -151,18 +145,18 @@ type Listener struct {
151
145
Name SectionName `json:"name"`
152
146
153
147
// Hostname specifies the virtual hostname to match for protocol types that
154
- // define this concept. When unspecified, "", or `*`, all hostnames are
155
- // matched. This field can be omitted for protocols that don't require
156
- // hostname based matching.
157
- //
158
- // For HTTPRoute objects, there is an interaction with the
159
- // `spec.hostnames` array. When both listener and route specify hostnames,
160
- // there must be an intersection between the values for a Route to be admitted.
161
- // For example, a Gateway with `*.example.com` would admit a Route that included
148
+ // define this concept. When unspecified or `*`, all hostnames are matched.
149
+ // This field can be omitted for protocols that don't require hostname based
150
+ // matching.
151
+ //
152
+ // For HTTPRoute objects, there is an interaction with the `spec.hostnames`
153
+ // array. When both listener and route specify hostnames, there must be an
154
+ // intersection between the values for a Route to be admitted. For example,
155
+ // a Gateway with `*.example.com` would admit a Route that included
162
156
// `foo.example.com` as a hostname, but not a Route that *only* included
163
- // `foo.acme.io ` as a hostname. A Route that included both `foo.example.com`
164
- // and `foo.acme.io ` would be admitted, but the `foo.acme.io` hostname would
165
- // be silently ignored.
157
+ // `foo.example.net ` as a hostname. A Route that included both
158
+ // `foo.example.com` and `foo.example.net ` would be admitted, but the
159
+ // `foo.example.net` hostname would be silently ignored.
166
160
//
167
161
// Support: Core
168
162
//
@@ -207,7 +201,7 @@ type Listener struct {
207
201
// +optional
208
202
TLS * GatewayTLSConfig `json:"tls,omitempty"`
209
203
210
- // Routes specifies which Routes may be attached to this Listener.
204
+ // AllowedRoutes specifies which Routes may be attached to this Listener.
211
205
//
212
206
// Although a client request may technically match multiple route rules,
213
207
// only one rule may ultimately receive the request. Matching precedence
@@ -232,7 +226,7 @@ type Listener struct {
232
226
// Support: Core
233
227
// +kubebuilder:default={namespaces:{from: Same}}
234
228
// +optional
235
- Routes * ListenerRoutes `json:"routes ,omitempty"`
229
+ AllowedRoutes * AllowedRoutes `json:"allowedRoutes ,omitempty"`
236
230
}
237
231
238
232
// ProtocolType defines the application protocol accepted by a Listener.
@@ -293,7 +287,7 @@ type GatewayTLSConfig struct {
293
287
// References to a resource in different namespace are invalid UNLESS there
294
288
// is a ReferencePolicy in the target namespace that allows the certificate
295
289
// to be attached. If a ReferencePolicy does not allow this reference, the
296
- // "ResolvedRefs" condition MUST be set to false for this listener with the
290
+ // "ResolvedRefs" condition MUST be set to False for this listener with the
297
291
// "InvalidCertificateRef" reason.
298
292
//
299
293
// This field is required when mode is set to "Terminate" (default) and
@@ -339,8 +333,8 @@ const (
339
333
TLSModePassthrough TLSModeType = "Passthrough"
340
334
)
341
335
342
- // ListenerRoutes defines which Routes may be attached to this Listener.
343
- type ListenerRoutes struct {
336
+ // AllowedRoutes defines which Routes may be attached to this Listener.
337
+ type AllowedRoutes struct {
344
338
// Namespaces indicates which namespaces Routes may be attached to this
345
339
// Listener from. This is restricted to the namespace of this Gateway by
346
340
// default.
@@ -358,7 +352,7 @@ type ListenerRoutes struct {
358
352
// A RouteGroupKind MUST correspond to kinds of Routes that are compatible
359
353
// with the application protocol specified in the Listener's Protocol field.
360
354
// If an implementation does not support or recognize this resource type, it
361
- // MUST set the "ResolvedRefs" condition to false for this Listener with the
355
+ // MUST set the "ResolvedRefs" condition to False for this Listener with the
362
356
// "InvalidRoutesRef" reason.
363
357
//
364
358
// Support: Core
@@ -532,10 +526,9 @@ const (
532
526
//
533
527
// * "Scheduled"
534
528
//
535
- // Possible reasons for this condition to be false are:
529
+ // Possible reasons for this condition to be False are:
536
530
//
537
531
// * "NotReconciled"
538
- // * "NoSuchGatewayClass"
539
532
// * "NoResources"
540
533
//
541
534
// Controllers may raise this condition with other reasons,
@@ -551,13 +544,6 @@ const (
551
544
// been recently created and no controller has reconciled it yet.
552
545
GatewayReasonNotReconciled GatewayConditionReason = "NotReconciled"
553
546
554
- // This reason is used with the "Scheduled" condition when the Gateway is
555
- // not scheduled because there is no controller that recognizes the
556
- // GatewayClassName. This reason has been deprecated and will be removed in
557
- // a future release.
558
- // +deprecated
559
- GatewayReasonNoSuchGatewayClass GatewayConditionReason = "NoSuchGatewayClass"
560
-
561
547
// This reason is used with the "Scheduled" condition when the
562
548
// Gateway is not scheduled because insufficient infrastructure
563
549
// resources are available.
@@ -579,7 +565,7 @@ const (
579
565
//
580
566
// * "Ready"
581
567
//
582
- // Possible reasons for this condition to be false are:
568
+ // Possible reasons for this condition to be False are:
583
569
//
584
570
// * "ListenersNotValid"
585
571
// * "ListenersNotReady"
@@ -614,9 +600,7 @@ const (
614
600
615
601
// ListenerStatus is the status associated with a Listener.
616
602
type ListenerStatus struct {
617
- // Name is the name of the Listener. If the Gateway has more than one
618
- // Listener present, each ListenerStatus MUST specify a name. The names of
619
- // ListenerStatus objects MUST be unique within a Gateway.
603
+ // Name is the name of the Listener that this status corresponds to.
620
604
Name SectionName `json:"name"`
621
605
622
606
// SupportedKinds is the list indicating the Kinds supported by this
@@ -662,7 +646,7 @@ const (
662
646
// * "ProtocolConflict"
663
647
// * "RouteConflict"
664
648
//
665
- // Possible reasons for this condition to be false are:
649
+ // Possible reasons for this condition to be False are:
666
650
//
667
651
// * "NoConflicts"
668
652
//
@@ -690,7 +674,7 @@ const (
690
674
ListenerReasonRouteConflict ListenerConditionReason = "RouteConflict"
691
675
692
676
// This reason is used with the "Conflicted" condition when the condition
693
- // is false .
677
+ // is False .
694
678
ListenerReasonNoConflicts ListenerConditionReason = "NoConflicts"
695
679
)
696
680
@@ -712,7 +696,7 @@ const (
712
696
// * "UnsupportedProtocol"
713
697
// * "UnsupportedAddress"
714
698
//
715
- // Possible reasons for this condition to be false are:
699
+ // Possible reasons for this condition to be False are:
716
700
//
717
701
// * "Attached"
718
702
//
@@ -742,7 +726,7 @@ const (
742
726
ListenerReasonUnsupportedAddress ListenerConditionReason = "UnsupportedAddress"
743
727
744
728
// This reason is used with the "Detached" condition when the condition is
745
- // false .
729
+ // False .
746
730
ListenerReasonAttached ListenerConditionReason = "Attached"
747
731
)
748
732
@@ -754,7 +738,7 @@ const (
754
738
//
755
739
// * "ResolvedRefs"
756
740
//
757
- // Possible reasons for this condition to be false are:
741
+ // Possible reasons for this condition to be False are:
758
742
//
759
743
// * "DegradedRoutes"
760
744
// * "InvalidCertificateRef"
@@ -770,10 +754,10 @@ const (
770
754
// is true.
771
755
ListenerReasonResolvedRefs ListenerConditionReason = "ResolvedRefs"
772
756
773
- // This reason is used with the "ResolvedRefs" condition
774
- // when not all of the routes selected by this Listener could be
775
- // configured. The specific reason for the degraded route should
776
- // be indicated in the route's .Status.Conditions field .
757
+ // This reason is used with the "ResolvedRefs" condition when not all of the
758
+ // routes selected by this Listener could be configured. The specific reason
759
+ // for the degraded route should be indicated in the Conditions field of the
760
+ // appropriate entry of the route's .Status.Parents .
777
761
ListenerReasonDegradedRoutes ListenerConditionReason = "DegradedRoutes"
778
762
779
763
// This reason is used with the "ResolvedRefs" condition when the
@@ -803,7 +787,7 @@ const (
803
787
//
804
788
// * "Ready"
805
789
//
806
- // Possible reasons for this condition to be false are:
790
+ // Possible reasons for this condition to be False are:
807
791
//
808
792
// * "Invalid"
809
793
// * "Pending"
0 commit comments