@@ -137,23 +137,33 @@ pub struct GRPCRouteSpec {
137137 /// connections originating from the same namespace as the Route, for which
138138 /// the intended destination of the connections are a Service targeted as a
139139 /// ParentRef of the Route.
140- ///
141- ///
142- ///
143- ///
144- ///
145- ///
146140 #[ serde(
147141 default ,
148142 skip_serializing_if = "Option::is_none" ,
149143 rename = "parentRefs"
150144 ) ]
151145 pub parent_refs : Option < Vec < GRPCRouteParentRefs > > ,
152146 /// Rules are a list of GRPC matchers, filters and actions.
153- ///
154- ///
155147 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
156148 pub rules : Option < Vec < GRPCRouteRules > > ,
149+ /// UseDefaultGateways indicates the default Gateway scope to use for this
150+ /// Route. If unset (the default) or set to None, the Route will not be
151+ /// attached to any default Gateway; if set, it will be attached to any
152+ /// default Gateway supporting the named scope, subject to the usual rules
153+ /// about which Routes a Gateway is allowed to claim.
154+ ///
155+ /// Think carefully before using this functionality! The set of default
156+ /// Gateways supporting the requested scope can change over time without
157+ /// any notice to the Route author, and in many situations it will not be
158+ /// appropriate to request a default Gateway for a given Route -- for
159+ /// example, a Route with specific security requirements should almost
160+ /// certainly not use a default Gateway.
161+ #[ serde(
162+ default ,
163+ skip_serializing_if = "Option::is_none" ,
164+ rename = "useDefaultGateways"
165+ ) ]
166+ pub use_default_gateways : Option < GRPCRouteUseDefaultGateways > ,
157167}
158168
159169/// ParentReference identifies an API object (usually a Gateway) that can be considered
@@ -336,7 +346,7 @@ pub struct GRPCRouteRules {
336346 /// Specifying the same filter multiple times is not supported unless explicitly
337347 /// indicated in the filter.
338348 ///
339- /// If an implementation can not support a combination of filters, it must clearly
349+ /// If an implementation cannot support a combination of filters, it must clearly
340350 /// document that limitation. In cases where incompatible or unsupported
341351 /// filters are specified and cause the `Accepted` condition to be set to status
342352 /// `False`, implementations may use the `IncompatibleFilters` reason to specify
@@ -399,15 +409,12 @@ pub struct GRPCRouteRules {
399409 /// Name is the name of the route rule. This name MUST be unique within a Route if it is set.
400410 ///
401411 /// Support: Extended
402- ///
403412 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
404413 pub name : Option < String > ,
405414 /// SessionPersistence defines and configures session persistence
406415 /// for the route rule.
407416 ///
408417 /// Support: Extended
409- ///
410- ///
411418 #[ serde(
412419 default ,
413420 skip_serializing_if = "Option::is_none" ,
@@ -423,7 +430,6 @@ pub struct GRPCRouteRules {
423430/// namespace's owner to accept the reference. See the ReferenceGrant
424431/// documentation for details.
425432///
426- /// <gateway:experimental:description>
427433///
428434/// When the BackendRef points to a Kubernetes Service, implementations SHOULD
429435/// honor the appProtocol field if it is set for the target Service Port.
@@ -438,8 +444,6 @@ pub struct GRPCRouteRules {
438444/// If a Route is not able to send traffic to the backend using the specified
439445/// protocol then the backend is considered invalid. Implementations MUST set the
440446/// "ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.
441- ///
442- /// </gateway:experimental:description>
443447#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
444448pub struct GRPCRouteRulesBackendRefs {
445449 /// Filters defined at this level MUST be executed if and only if the
@@ -547,8 +551,6 @@ pub struct GRPCRouteRulesBackendRefsFilters {
547551 /// backends.
548552 ///
549553 /// Support: Extended
550- ///
551- ///
552554 #[ serde(
553555 default ,
554556 skip_serializing_if = "Option::is_none" ,
@@ -589,8 +591,6 @@ pub struct GRPCRouteRulesBackendRefsFilters {
589591 /// If a reference to a custom filter type cannot be resolved, the filter
590592 /// MUST NOT be skipped. Instead, requests that would have been processed by
591593 /// that filter MUST receive a HTTP error response.
592- ///
593- ///
594594 #[ serde( rename = "type" ) ]
595595 pub r#type : GRPCRouteRulesBackendRefsFiltersType ,
596596}
@@ -680,7 +680,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersRequestHeaderModifier {
680680#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
681681pub struct GRPCRouteRulesBackendRefsFiltersRequestHeaderModifierAdd {
682682 /// Name is the name of the HTTP Header to be matched. Name matching MUST be
683- /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
683+ /// case- insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
684684 ///
685685 /// If multiple entries specify equivalent header names, the first entry with
686686 /// an equivalent name MUST be considered for a match. Subsequent entries
@@ -696,7 +696,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersRequestHeaderModifierAdd {
696696#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
697697pub struct GRPCRouteRulesBackendRefsFiltersRequestHeaderModifierSet {
698698 /// Name is the name of the HTTP Header to be matched. Name matching MUST be
699- /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
699+ /// case- insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
700700 ///
701701 /// If multiple entries specify equivalent header names, the first entry with
702702 /// an equivalent name MUST be considered for a match. Subsequent entries
@@ -717,8 +717,6 @@ pub struct GRPCRouteRulesBackendRefsFiltersRequestHeaderModifierSet {
717717/// backends.
718718///
719719/// Support: Extended
720- ///
721- ///
722720#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
723721pub struct GRPCRouteRulesBackendRefsFiltersRequestMirror {
724722 /// BackendRef references a resource where mirrored requests are sent.
@@ -751,8 +749,6 @@ pub struct GRPCRouteRulesBackendRefsFiltersRequestMirror {
751749 ///
752750 /// Only one of Fraction or Percent may be specified. If neither field
753751 /// is specified, 100% of requests will be mirrored.
754- ///
755- ///
756752 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
757753 pub fraction : Option < GRPCRouteRulesBackendRefsFiltersRequestMirrorFraction > ,
758754 /// Percent represents the percentage of requests that should be
@@ -761,8 +757,6 @@ pub struct GRPCRouteRulesBackendRefsFiltersRequestMirror {
761757 ///
762758 /// Only one of Fraction or Percent may be specified. If neither field
763759 /// is specified, 100% of requests will be mirrored.
764- ///
765- ///
766760 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
767761 pub percent : Option < i32 > ,
768762}
@@ -839,8 +833,6 @@ pub struct GRPCRouteRulesBackendRefsFiltersRequestMirrorBackendRef {
839833///
840834/// Only one of Fraction or Percent may be specified. If neither field
841835/// is specified, 100% of requests will be mirrored.
842- ///
843- ///
844836#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
845837pub struct GRPCRouteRulesBackendRefsFiltersRequestMirrorFraction {
846838 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
@@ -914,7 +906,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersResponseHeaderModifier {
914906#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
915907pub struct GRPCRouteRulesBackendRefsFiltersResponseHeaderModifierAdd {
916908 /// Name is the name of the HTTP Header to be matched. Name matching MUST be
917- /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
909+ /// case- insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
918910 ///
919911 /// If multiple entries specify equivalent header names, the first entry with
920912 /// an equivalent name MUST be considered for a match. Subsequent entries
@@ -930,7 +922,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersResponseHeaderModifierAdd {
930922#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
931923pub struct GRPCRouteRulesBackendRefsFiltersResponseHeaderModifierSet {
932924 /// Name is the name of the HTTP Header to be matched. Name matching MUST be
933- /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
925+ /// case- insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
934926 ///
935927 /// If multiple entries specify equivalent header names, the first entry with
936928 /// an equivalent name MUST be considered for a match. Subsequent entries
@@ -997,8 +989,6 @@ pub struct GRPCRouteRulesFilters {
997989 /// backends.
998990 ///
999991 /// Support: Extended
1000- ///
1001- ///
1002992 #[ serde(
1003993 default ,
1004994 skip_serializing_if = "Option::is_none" ,
@@ -1039,8 +1029,6 @@ pub struct GRPCRouteRulesFilters {
10391029 /// If a reference to a custom filter type cannot be resolved, the filter
10401030 /// MUST NOT be skipped. Instead, requests that would have been processed by
10411031 /// that filter MUST receive a HTTP error response.
1042- ///
1043- ///
10441032 #[ serde( rename = "type" ) ]
10451033 pub r#type : GRPCRouteRulesFiltersType ,
10461034}
@@ -1130,7 +1118,7 @@ pub struct GRPCRouteRulesFiltersRequestHeaderModifier {
11301118#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
11311119pub struct GRPCRouteRulesFiltersRequestHeaderModifierAdd {
11321120 /// Name is the name of the HTTP Header to be matched. Name matching MUST be
1133- /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
1121+ /// case- insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
11341122 ///
11351123 /// If multiple entries specify equivalent header names, the first entry with
11361124 /// an equivalent name MUST be considered for a match. Subsequent entries
@@ -1146,7 +1134,7 @@ pub struct GRPCRouteRulesFiltersRequestHeaderModifierAdd {
11461134#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
11471135pub struct GRPCRouteRulesFiltersRequestHeaderModifierSet {
11481136 /// Name is the name of the HTTP Header to be matched. Name matching MUST be
1149- /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
1137+ /// case- insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
11501138 ///
11511139 /// If multiple entries specify equivalent header names, the first entry with
11521140 /// an equivalent name MUST be considered for a match. Subsequent entries
@@ -1167,8 +1155,6 @@ pub struct GRPCRouteRulesFiltersRequestHeaderModifierSet {
11671155/// backends.
11681156///
11691157/// Support: Extended
1170- ///
1171- ///
11721158#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
11731159pub struct GRPCRouteRulesFiltersRequestMirror {
11741160 /// BackendRef references a resource where mirrored requests are sent.
@@ -1201,8 +1187,6 @@ pub struct GRPCRouteRulesFiltersRequestMirror {
12011187 ///
12021188 /// Only one of Fraction or Percent may be specified. If neither field
12031189 /// is specified, 100% of requests will be mirrored.
1204- ///
1205- ///
12061190 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
12071191 pub fraction : Option < GRPCRouteRulesFiltersRequestMirrorFraction > ,
12081192 /// Percent represents the percentage of requests that should be
@@ -1211,8 +1195,6 @@ pub struct GRPCRouteRulesFiltersRequestMirror {
12111195 ///
12121196 /// Only one of Fraction or Percent may be specified. If neither field
12131197 /// is specified, 100% of requests will be mirrored.
1214- ///
1215- ///
12161198 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
12171199 pub percent : Option < i32 > ,
12181200}
@@ -1289,8 +1271,6 @@ pub struct GRPCRouteRulesFiltersRequestMirrorBackendRef {
12891271///
12901272/// Only one of Fraction or Percent may be specified. If neither field
12911273/// is specified, 100% of requests will be mirrored.
1292- ///
1293- ///
12941274#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
12951275pub struct GRPCRouteRulesFiltersRequestMirrorFraction {
12961276 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
@@ -1364,7 +1344,7 @@ pub struct GRPCRouteRulesFiltersResponseHeaderModifier {
13641344#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
13651345pub struct GRPCRouteRulesFiltersResponseHeaderModifierAdd {
13661346 /// Name is the name of the HTTP Header to be matched. Name matching MUST be
1367- /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
1347+ /// case- insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
13681348 ///
13691349 /// If multiple entries specify equivalent header names, the first entry with
13701350 /// an equivalent name MUST be considered for a match. Subsequent entries
@@ -1380,7 +1360,7 @@ pub struct GRPCRouteRulesFiltersResponseHeaderModifierAdd {
13801360#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
13811361pub struct GRPCRouteRulesFiltersResponseHeaderModifierSet {
13821362 /// Name is the name of the HTTP Header to be matched. Name matching MUST be
1383- /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
1363+ /// case- insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
13841364 ///
13851365 /// If multiple entries specify equivalent header names, the first entry with
13861366 /// an equivalent name MUST be considered for a match. Subsequent entries
@@ -1501,8 +1481,6 @@ pub enum GRPCRouteRulesMatchesMethodType {
15011481/// for the route rule.
15021482///
15031483/// Support: Extended
1504- ///
1505- ///
15061484#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
15071485pub struct GRPCRouteRulesSessionPersistence {
15081486 /// AbsoluteTimeout defines the absolute timeout of the persistent
@@ -1580,6 +1558,8 @@ pub struct GRPCRouteRulesSessionPersistenceCookieConfig {
15801558 /// absolute lifetime of the cookie tracked by the gateway and
15811559 /// is optional.
15821560 ///
1561+ /// Defaults to "Session".
1562+ ///
15831563 /// Support: Core for "Session" type
15841564 ///
15851565 /// Support: Extended for "Permanent" type
@@ -1605,14 +1585,19 @@ pub enum GRPCRouteRulesSessionPersistenceCookieConfigLifetimeType {
16051585/// for the route rule.
16061586///
16071587/// Support: Extended
1608- ///
1609- ///
16101588#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , PartialEq ) ]
16111589pub enum GRPCRouteRulesSessionPersistenceType {
16121590 Cookie ,
16131591 Header ,
16141592}
16151593
1594+ /// Spec defines the desired state of GRPCRoute.
1595+ #[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , PartialEq ) ]
1596+ pub enum GRPCRouteUseDefaultGateways {
1597+ All ,
1598+ None ,
1599+ }
1600+
16161601/// Status defines the current state of GRPCRoute.
16171602#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
16181603pub struct GRPCRouteStatus {
@@ -1653,11 +1638,10 @@ pub struct GRPCRouteStatusParents {
16531638 /// There are a number of cases where the "Accepted" condition may not be set
16541639 /// due to lack of controller visibility, that includes when:
16551640 ///
1656- /// * The Route refers to a non-existent parent.
1641+ /// * The Route refers to a nonexistent parent.
16571642 /// * The Route is of a type that the controller does not support.
16581643 /// * The Route is in a namespace the controller does not have access to.
1659- #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
1660- pub conditions : Option < Vec < Condition > > ,
1644+ pub conditions : Vec < Condition > ,
16611645 /// ControllerName is a domain/path string that indicates the name of the
16621646 /// controller that wrote this status. This corresponds with the
16631647 /// controllerName field on GatewayClass.
0 commit comments