@@ -155,15 +155,21 @@ type ParentReference struct {
155
155
Port * PortNumber `json:"port,omitempty"`
156
156
}
157
157
158
- // GatewayDefaultScope defines the set of default scopes that a Gateway can
159
- // claim, for configuring default Gateways and selecting default Gateways in
160
- // any Route type. At present the only supported scope is "All".
158
+ // GatewayDefaultScope defines the set of default scopes that a Gateway
159
+ // can claim, for use in any Route type. At present the only supported
160
+ // scopes are "All" and "None". "None" is a special scope which
161
+ // explicitly means that the Route MUST NOT be defaulted.
162
+ // +kubebuilder:validation:Enum=All;None
161
163
type GatewayDefaultScope string
162
164
163
165
const (
164
166
// GatewayDefaultScopeAll indicates that a Gateway can claim absolutely
165
167
// any Route asking for a default Gateway.
166
168
GatewayDefaultScopeAll GatewayDefaultScope = "All"
169
+
170
+ // GatewayDefaultScopeNone indicates that a Gateway MUST NOT claim
171
+ // any Route asking for a default Gateway.
172
+ GatewayDefaultScopeNone GatewayDefaultScope = "None"
167
173
)
168
174
169
175
// CommonRouteSpec defines the common attributes that all Routes MUST include
@@ -241,21 +247,22 @@ type CommonRouteSpec struct {
241
247
// <gateway:experimental:validation:XValidation:message="sectionName or port must be unique when parentRefs includes 2 or more references to the same parent",rule="self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || ( has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName)) && (((!has(p1.port) || p1.port == 0) && (!has(p2.port) || p2.port == 0)) || (has(p1.port) && has(p2.port) && p1.port == p2.port))))">
242
248
ParentRefs []ParentReference `json:"parentRefs,omitempty"`
243
249
244
- // UseDefaultGateway indicates the default Gateway scope to use for this
245
- // Route. If unset (the default), the Route will not be attached to any
246
- // default Gateway; if set, it will be attached to any default Gateway
247
- // supporting the named scope, subject to the usual rules about which
248
- // Routes a Gateway is allowed to claim.
250
+ // UseDefaultGateways indicates the default Gateway scope to use for this
251
+ // Route. If unset (the default), set to an empty string (`""`), or set to
252
+ // None, the Route will not be attached to any default Gateway; if set, it
253
+ // will be attached to any default Gateway supporting the named scope,
254
+ // subject to the usual rules about which Routes a Gateway is allowed to
255
+ // claim.
249
256
//
250
257
// Think carefully before using this functionality! The set of default
251
258
// Gateways supporting the requested scope can change over time without
252
259
// any notice to the Route author, and in many situations it will not be
253
260
// appropriate to request a default Gateway for a given Route -- for
254
- // example, a Route with specific security requirements should almost certainly
255
- // not use a default Gateway.
261
+ // example, a Route with specific security requirements should almost
262
+ // certainly not use a default Gateway.
256
263
//
257
264
// +optional <gateway:experimental>
258
- UseDefaultGateway GatewayDefaultScope `json:"useDefaultGateway ,omitempty"`
265
+ UseDefaultGateways GatewayDefaultScope `json:"useDefaultGateways ,omitempty"`
259
266
}
260
267
261
268
// PortNumber defines a network port.
0 commit comments