gateway_api/apis/experimental/
tlsroutes.rs

1// WARNING: generated by kopium - manual changes will be overwritten
2// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f -
3// kopium version: 0.21.2
4
5#[allow(unused_imports)]
6mod prelude {
7    pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
8    pub use kube::CustomResource;
9    pub use schemars::JsonSchema;
10    pub use serde::{Deserialize, Serialize};
11}
12use self::prelude::*;
13
14/// Spec defines the desired state of TLSRoute.
15#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
16#[kube(
17    group = "gateway.networking.k8s.io",
18    version = "v1alpha3",
19    kind = "TLSRoute",
20    plural = "tlsroutes"
21)]
22#[kube(namespaced)]
23#[kube(status = "TLSRouteStatus")]
24#[kube(derive = "Default")]
25#[kube(derive = "PartialEq")]
26pub struct TLSRouteSpec {
27    /// Hostnames defines a set of SNI hostnames that should match against the
28    /// SNI attribute of TLS ClientHello message in TLS handshake. This matches
29    /// the RFC 1123 definition of a hostname with 2 notable exceptions:
30    ///
31    /// 1. IPs are not allowed in SNI hostnames per RFC 6066.
32    /// 2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
33    ///    label must appear by itself as the first label.
34    ///
35    /// If a hostname is specified by both the Listener and TLSRoute, there
36    /// must be at least one intersecting hostname for the TLSRoute to be
37    /// attached to the Listener. For example:
38    ///
39    /// * A Listener with `test.example.com` as the hostname matches TLSRoutes
40    ///   that have specified at least one of `test.example.com` or
41    ///   `*.example.com`.
42    /// * A Listener with `*.example.com` as the hostname matches TLSRoutes
43    ///   that have specified at least one hostname that matches the Listener
44    ///   hostname. For example, `test.example.com` and `*.example.com` would both
45    ///   match. On the other hand, `example.com` and `test.example.net` would not
46    ///   match.
47    ///
48    /// If both the Listener and TLSRoute have specified hostnames, any
49    /// TLSRoute hostnames that do not match the Listener hostname MUST be
50    /// ignored. For example, if a Listener specified `*.example.com`, and the
51    /// TLSRoute specified `test.example.com` and `test.example.net`,
52    /// `test.example.net` must not be considered for a match.
53    ///
54    /// If both the Listener and TLSRoute have specified hostnames, and none
55    /// match with the criteria above, then the TLSRoute is not accepted. The
56    /// implementation must raise an 'Accepted' Condition with a status of
57    /// `False` in the corresponding RouteParentStatus.
58    ///
59    /// Support: Core
60    pub hostnames: Vec<String>,
61    /// ParentRefs references the resources (usually Gateways) that a Route wants
62    /// to be attached to. Note that the referenced parent resource needs to
63    /// allow this for the attachment to be complete. For Gateways, that means
64    /// the Gateway needs to allow attachment from Routes of this kind and
65    /// namespace. For Services, that means the Service must either be in the same
66    /// namespace for a "producer" route, or the mesh implementation must support
67    /// and allow "consumer" routes for the referenced Service. ReferenceGrant is
68    /// not applicable for governing ParentRefs to Services - it is not possible to
69    /// create a "producer" route for a Service in a different namespace from the
70    /// Route.
71    ///
72    /// There are two kinds of parent resources with "Core" support:
73    ///
74    /// * Gateway (Gateway conformance profile)
75    /// * Service (Mesh conformance profile, ClusterIP Services only)
76    ///
77    /// This API may be extended in the future to support additional kinds of parent
78    /// resources.
79    ///
80    /// ParentRefs must be _distinct_. This means either that:
81    ///
82    /// * They select different objects.  If this is the case, then parentRef
83    ///   entries are distinct. In terms of fields, this means that the
84    ///   multi-part key defined by `group`, `kind`, `namespace`, and `name` must
85    ///   be unique across all parentRef entries in the Route.
86    /// * They do not select different objects, but for each optional field used,
87    ///   each ParentRef that selects the same object must set the same set of
88    ///   optional fields to different values. If one ParentRef sets a
89    ///   combination of optional fields, all must set the same combination.
90    ///
91    /// Some examples:
92    ///
93    /// * If one ParentRef sets `sectionName`, all ParentRefs referencing the
94    ///   same object must also set `sectionName`.
95    /// * If one ParentRef sets `port`, all ParentRefs referencing the same
96    ///   object must also set `port`.
97    /// * If one ParentRef sets `sectionName` and `port`, all ParentRefs
98    ///   referencing the same object must also set `sectionName` and `port`.
99    ///
100    /// It is possible to separately reference multiple distinct objects that may
101    /// be collapsed by an implementation. For example, some implementations may
102    /// choose to merge compatible Gateway Listeners together. If that is the
103    /// case, the list of routes attached to those resources should also be
104    /// merged.
105    ///
106    /// Note that for ParentRefs that cross namespace boundaries, there are specific
107    /// rules. Cross-namespace references are only valid if they are explicitly
108    /// allowed by something in the namespace they are referring to. For example,
109    /// Gateway has the AllowedRoutes field, and ReferenceGrant provides a
110    /// generic way to enable other kinds of cross-namespace reference.
111    ///
112    ///
113    /// ParentRefs from a Route to a Service in the same namespace are "producer"
114    /// routes, which apply default routing rules to inbound connections from
115    /// any namespace to the Service.
116    ///
117    /// ParentRefs from a Route to a Service in a different namespace are
118    /// "consumer" routes, and these routing rules are only applied to outbound
119    /// connections originating from the same namespace as the Route, for which
120    /// the intended destination of the connections are a Service targeted as a
121    /// ParentRef of the Route.
122    #[serde(
123        default,
124        skip_serializing_if = "Option::is_none",
125        rename = "parentRefs"
126    )]
127    pub parent_refs: Option<Vec<TLSRouteParentRefs>>,
128    /// Rules are a list of actions.
129    pub rules: Vec<TLSRouteRules>,
130    /// UseDefaultGateways indicates the default Gateway scope to use for this
131    /// Route. If unset (the default) or set to None, the Route will not be
132    /// attached to any default Gateway; if set, it will be attached to any
133    /// default Gateway supporting the named scope, subject to the usual rules
134    /// about which Routes a Gateway is allowed to claim.
135    ///
136    /// Think carefully before using this functionality! The set of default
137    /// Gateways supporting the requested scope can change over time without
138    /// any notice to the Route author, and in many situations it will not be
139    /// appropriate to request a default Gateway for a given Route -- for
140    /// example, a Route with specific security requirements should almost
141    /// certainly not use a default Gateway.
142    #[serde(
143        default,
144        skip_serializing_if = "Option::is_none",
145        rename = "useDefaultGateways"
146    )]
147    pub use_default_gateways: Option<TLSRouteUseDefaultGateways>,
148}
149
150/// ParentReference identifies an API object (usually a Gateway) that can be considered
151/// a parent of this resource (usually a route). There are two kinds of parent resources
152/// with "Core" support:
153///
154/// * Gateway (Gateway conformance profile)
155/// * Service (Mesh conformance profile, ClusterIP Services only)
156///
157/// This API may be extended in the future to support additional kinds of parent
158/// resources.
159///
160/// The API object must be valid in the cluster; the Group and Kind must
161/// be registered in the cluster for this reference to be valid.
162#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
163pub struct TLSRouteParentRefs {
164    /// Group is the group of the referent.
165    /// When unspecified, "gateway.networking.k8s.io" is inferred.
166    /// To set the core API group (such as for a "Service" kind referent),
167    /// Group must be explicitly set to "" (empty string).
168    ///
169    /// Support: Core
170    #[serde(default, skip_serializing_if = "Option::is_none")]
171    pub group: Option<String>,
172    /// Kind is kind of the referent.
173    ///
174    /// There are two kinds of parent resources with "Core" support:
175    ///
176    /// * Gateway (Gateway conformance profile)
177    /// * Service (Mesh conformance profile, ClusterIP Services only)
178    ///
179    /// Support for other resources is Implementation-Specific.
180    #[serde(default, skip_serializing_if = "Option::is_none")]
181    pub kind: Option<String>,
182    /// Name is the name of the referent.
183    ///
184    /// Support: Core
185    pub name: String,
186    /// Namespace is the namespace of the referent. When unspecified, this refers
187    /// to the local namespace of the Route.
188    ///
189    /// Note that there are specific rules for ParentRefs which cross namespace
190    /// boundaries. Cross-namespace references are only valid if they are explicitly
191    /// allowed by something in the namespace they are referring to. For example:
192    /// Gateway has the AllowedRoutes field, and ReferenceGrant provides a
193    /// generic way to enable any other kind of cross-namespace reference.
194    ///
195    ///
196    /// ParentRefs from a Route to a Service in the same namespace are "producer"
197    /// routes, which apply default routing rules to inbound connections from
198    /// any namespace to the Service.
199    ///
200    /// ParentRefs from a Route to a Service in a different namespace are
201    /// "consumer" routes, and these routing rules are only applied to outbound
202    /// connections originating from the same namespace as the Route, for which
203    /// the intended destination of the connections are a Service targeted as a
204    /// ParentRef of the Route.
205    ///
206    ///
207    /// Support: Core
208    #[serde(default, skip_serializing_if = "Option::is_none")]
209    pub namespace: Option<String>,
210    /// Port is the network port this Route targets. It can be interpreted
211    /// differently based on the type of parent resource.
212    ///
213    /// When the parent resource is a Gateway, this targets all listeners
214    /// listening on the specified port that also support this kind of Route(and
215    /// select this Route). It's not recommended to set `Port` unless the
216    /// networking behaviors specified in a Route must apply to a specific port
217    /// as opposed to a listener(s) whose port(s) may be changed. When both Port
218    /// and SectionName are specified, the name and port of the selected listener
219    /// must match both specified values.
220    ///
221    ///
222    /// When the parent resource is a Service, this targets a specific port in the
223    /// Service spec. When both Port (experimental) and SectionName are specified,
224    /// the name and port of the selected port must match both specified values.
225    ///
226    ///
227    /// Implementations MAY choose to support other parent resources.
228    /// Implementations supporting other types of parent resources MUST clearly
229    /// document how/if Port is interpreted.
230    ///
231    /// For the purpose of status, an attachment is considered successful as
232    /// long as the parent resource accepts it partially. For example, Gateway
233    /// listeners can restrict which Routes can attach to them by Route kind,
234    /// namespace, or hostname. If 1 of 2 Gateway listeners accept attachment
235    /// from the referencing Route, the Route MUST be considered successfully
236    /// attached. If no Gateway listeners accept attachment from this Route,
237    /// the Route MUST be considered detached from the Gateway.
238    ///
239    /// Support: Extended
240    #[serde(default, skip_serializing_if = "Option::is_none")]
241    pub port: Option<i32>,
242    /// SectionName is the name of a section within the target resource. In the
243    /// following resources, SectionName is interpreted as the following:
244    ///
245    /// * Gateway: Listener name. When both Port (experimental) and SectionName
246    /// are specified, the name and port of the selected listener must match
247    /// both specified values.
248    /// * Service: Port name. When both Port (experimental) and SectionName
249    /// are specified, the name and port of the selected listener must match
250    /// both specified values.
251    ///
252    /// Implementations MAY choose to support attaching Routes to other resources.
253    /// If that is the case, they MUST clearly document how SectionName is
254    /// interpreted.
255    ///
256    /// When unspecified (empty string), this will reference the entire resource.
257    /// For the purpose of status, an attachment is considered successful if at
258    /// least one section in the parent resource accepts it. For example, Gateway
259    /// listeners can restrict which Routes can attach to them by Route kind,
260    /// namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from
261    /// the referencing Route, the Route MUST be considered successfully
262    /// attached. If no Gateway listeners accept attachment from this Route, the
263    /// Route MUST be considered detached from the Gateway.
264    ///
265    /// Support: Core
266    #[serde(
267        default,
268        skip_serializing_if = "Option::is_none",
269        rename = "sectionName"
270    )]
271    pub section_name: Option<String>,
272}
273
274/// TLSRouteRule is the configuration for a given rule.
275#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
276pub struct TLSRouteRules {
277    /// BackendRefs defines the backend(s) where matching requests should be
278    /// sent. If unspecified or invalid (refers to a nonexistent resource or
279    /// a Service with no endpoints), the rule performs no forwarding; if no
280    /// filters are specified that would result in a response being sent, the
281    /// underlying implementation must actively reject request attempts to this
282    /// backend, by rejecting the connection or returning a 500 status code.
283    /// Request rejections must respect weight; if an invalid backend is
284    /// requested to have 80% of requests, then 80% of requests must be rejected
285    /// instead.
286    ///
287    /// Support: Core for Kubernetes Service
288    ///
289    /// Support: Extended for Kubernetes ServiceImport
290    ///
291    /// Support: Implementation-specific for any other resource
292    ///
293    /// Support for weight: Extended
294    #[serde(rename = "backendRefs")]
295    pub backend_refs: Vec<TLSRouteRulesBackendRefs>,
296    /// Name is the name of the route rule. This name MUST be unique within a Route if it is set.
297    ///
298    /// Support: Extended
299    #[serde(default, skip_serializing_if = "Option::is_none")]
300    pub name: Option<String>,
301}
302
303/// BackendRef defines how a Route should forward a request to a Kubernetes
304/// resource.
305///
306/// Note that when a namespace different than the local namespace is specified, a
307/// ReferenceGrant object is required in the referent namespace to allow that
308/// namespace's owner to accept the reference. See the ReferenceGrant
309/// documentation for details.
310///
311///
312/// When the BackendRef points to a Kubernetes Service, implementations SHOULD
313/// honor the appProtocol field if it is set for the target Service Port.
314///
315/// Implementations supporting appProtocol SHOULD recognize the Kubernetes
316/// Standard Application Protocols defined in KEP-3726.
317///
318/// If a Service appProtocol isn't specified, an implementation MAY infer the
319/// backend protocol through its own means. Implementations MAY infer the
320/// protocol from the Route type referring to the backend Service.
321///
322/// If a Route is not able to send traffic to the backend using the specified
323/// protocol then the backend is considered invalid. Implementations MUST set the
324/// "ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.
325///
326///
327/// Note that when the BackendTLSPolicy object is enabled by the implementation,
328/// there are some extra rules about validity to consider here. See the fields
329/// where this struct is used for more information about the exact behavior.
330#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
331pub struct TLSRouteRulesBackendRefs {
332    /// Group is the group of the referent. For example, "gateway.networking.k8s.io".
333    /// When unspecified or empty string, core API group is inferred.
334    #[serde(default, skip_serializing_if = "Option::is_none")]
335    pub group: Option<String>,
336    /// Kind is the Kubernetes resource kind of the referent. For example
337    /// "Service".
338    ///
339    /// Defaults to "Service" when not specified.
340    ///
341    /// ExternalName services can refer to CNAME DNS records that may live
342    /// outside of the cluster and as such are difficult to reason about in
343    /// terms of conformance. They also may not be safe to forward to (see
344    /// CVE-2021-25740 for more information). Implementations SHOULD NOT
345    /// support ExternalName Services.
346    ///
347    /// Support: Core (Services with a type other than ExternalName)
348    ///
349    /// Support: Implementation-specific (Services with type ExternalName)
350    #[serde(default, skip_serializing_if = "Option::is_none")]
351    pub kind: Option<String>,
352    /// Name is the name of the referent.
353    pub name: String,
354    /// Namespace is the namespace of the backend. When unspecified, the local
355    /// namespace is inferred.
356    ///
357    /// Note that when a namespace different than the local namespace is specified,
358    /// a ReferenceGrant object is required in the referent namespace to allow that
359    /// namespace's owner to accept the reference. See the ReferenceGrant
360    /// documentation for details.
361    ///
362    /// Support: Core
363    #[serde(default, skip_serializing_if = "Option::is_none")]
364    pub namespace: Option<String>,
365    /// Port specifies the destination port number to use for this resource.
366    /// Port is required when the referent is a Kubernetes Service. In this
367    /// case, the port number is the service port number, not the target port.
368    /// For other resources, destination port might be derived from the referent
369    /// resource or this field.
370    #[serde(default, skip_serializing_if = "Option::is_none")]
371    pub port: Option<i32>,
372    /// Weight specifies the proportion of requests forwarded to the referenced
373    /// backend. This is computed as weight/(sum of all weights in this
374    /// BackendRefs list). For non-zero values, there may be some epsilon from
375    /// the exact proportion defined here depending on the precision an
376    /// implementation supports. Weight is not a percentage and the sum of
377    /// weights does not need to equal 100.
378    ///
379    /// If only one backend is specified and it has a weight greater than 0, 100%
380    /// of the traffic is forwarded to that backend. If weight is set to 0, no
381    /// traffic should be forwarded for this entry. If unspecified, weight
382    /// defaults to 1.
383    ///
384    /// Support for this field varies based on the context where used.
385    #[serde(default, skip_serializing_if = "Option::is_none")]
386    pub weight: Option<i32>,
387}
388
389/// Spec defines the desired state of TLSRoute.
390#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)]
391pub enum TLSRouteUseDefaultGateways {
392    All,
393    None,
394}
395
396/// Status defines the current state of TLSRoute.
397#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
398pub struct TLSRouteStatus {
399    /// Parents is a list of parent resources (usually Gateways) that are
400    /// associated with the route, and the status of the route with respect to
401    /// each parent. When this route attaches to a parent, the controller that
402    /// manages the parent must add an entry to this list when the controller
403    /// first sees the route and should update the entry as appropriate when the
404    /// route or gateway is modified.
405    ///
406    /// Note that parent references that cannot be resolved by an implementation
407    /// of this API will not be added to this list. Implementations of this API
408    /// can only populate Route status for the Gateways/parent resources they are
409    /// responsible for.
410    ///
411    /// A maximum of 32 Gateways will be represented in this list. An empty list
412    /// means the route has not been attached to any Gateway.
413    pub parents: Vec<TLSRouteStatusParents>,
414}
415
416/// RouteParentStatus describes the status of a route with respect to an
417/// associated Parent.
418#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
419pub struct TLSRouteStatusParents {
420    /// Conditions describes the status of the route with respect to the Gateway.
421    /// Note that the route's availability is also subject to the Gateway's own
422    /// status conditions and listener status.
423    ///
424    /// If the Route's ParentRef specifies an existing Gateway that supports
425    /// Routes of this kind AND that Gateway's controller has sufficient access,
426    /// then that Gateway's controller MUST set the "Accepted" condition on the
427    /// Route, to indicate whether the route has been accepted or rejected by the
428    /// Gateway, and why.
429    ///
430    /// A Route MUST be considered "Accepted" if at least one of the Route's
431    /// rules is implemented by the Gateway.
432    ///
433    /// There are a number of cases where the "Accepted" condition may not be set
434    /// due to lack of controller visibility, that includes when:
435    ///
436    /// * The Route refers to a nonexistent parent.
437    /// * The Route is of a type that the controller does not support.
438    /// * The Route is in a namespace the controller does not have access to.
439    pub conditions: Vec<Condition>,
440    /// ControllerName is a domain/path string that indicates the name of the
441    /// controller that wrote this status. This corresponds with the
442    /// controllerName field on GatewayClass.
443    ///
444    /// Example: "example.net/gateway-controller".
445    ///
446    /// The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are
447    /// valid Kubernetes names
448    /// (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
449    ///
450    /// Controllers MUST populate this field when writing status. Controllers should ensure that
451    /// entries to status populated with their ControllerName are cleaned up when they are no
452    /// longer necessary.
453    #[serde(rename = "controllerName")]
454    pub controller_name: String,
455    /// ParentRef corresponds with a ParentRef in the spec that this
456    /// RouteParentStatus struct describes the status of.
457    #[serde(rename = "parentRef")]
458    pub parent_ref: TLSRouteStatusParentsParentRef,
459}
460
461/// ParentRef corresponds with a ParentRef in the spec that this
462/// RouteParentStatus struct describes the status of.
463#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
464pub struct TLSRouteStatusParentsParentRef {
465    /// Group is the group of the referent.
466    /// When unspecified, "gateway.networking.k8s.io" is inferred.
467    /// To set the core API group (such as for a "Service" kind referent),
468    /// Group must be explicitly set to "" (empty string).
469    ///
470    /// Support: Core
471    #[serde(default, skip_serializing_if = "Option::is_none")]
472    pub group: Option<String>,
473    /// Kind is kind of the referent.
474    ///
475    /// There are two kinds of parent resources with "Core" support:
476    ///
477    /// * Gateway (Gateway conformance profile)
478    /// * Service (Mesh conformance profile, ClusterIP Services only)
479    ///
480    /// Support for other resources is Implementation-Specific.
481    #[serde(default, skip_serializing_if = "Option::is_none")]
482    pub kind: Option<String>,
483    /// Name is the name of the referent.
484    ///
485    /// Support: Core
486    pub name: String,
487    /// Namespace is the namespace of the referent. When unspecified, this refers
488    /// to the local namespace of the Route.
489    ///
490    /// Note that there are specific rules for ParentRefs which cross namespace
491    /// boundaries. Cross-namespace references are only valid if they are explicitly
492    /// allowed by something in the namespace they are referring to. For example:
493    /// Gateway has the AllowedRoutes field, and ReferenceGrant provides a
494    /// generic way to enable any other kind of cross-namespace reference.
495    ///
496    ///
497    /// ParentRefs from a Route to a Service in the same namespace are "producer"
498    /// routes, which apply default routing rules to inbound connections from
499    /// any namespace to the Service.
500    ///
501    /// ParentRefs from a Route to a Service in a different namespace are
502    /// "consumer" routes, and these routing rules are only applied to outbound
503    /// connections originating from the same namespace as the Route, for which
504    /// the intended destination of the connections are a Service targeted as a
505    /// ParentRef of the Route.
506    ///
507    ///
508    /// Support: Core
509    #[serde(default, skip_serializing_if = "Option::is_none")]
510    pub namespace: Option<String>,
511    /// Port is the network port this Route targets. It can be interpreted
512    /// differently based on the type of parent resource.
513    ///
514    /// When the parent resource is a Gateway, this targets all listeners
515    /// listening on the specified port that also support this kind of Route(and
516    /// select this Route). It's not recommended to set `Port` unless the
517    /// networking behaviors specified in a Route must apply to a specific port
518    /// as opposed to a listener(s) whose port(s) may be changed. When both Port
519    /// and SectionName are specified, the name and port of the selected listener
520    /// must match both specified values.
521    ///
522    ///
523    /// When the parent resource is a Service, this targets a specific port in the
524    /// Service spec. When both Port (experimental) and SectionName are specified,
525    /// the name and port of the selected port must match both specified values.
526    ///
527    ///
528    /// Implementations MAY choose to support other parent resources.
529    /// Implementations supporting other types of parent resources MUST clearly
530    /// document how/if Port is interpreted.
531    ///
532    /// For the purpose of status, an attachment is considered successful as
533    /// long as the parent resource accepts it partially. For example, Gateway
534    /// listeners can restrict which Routes can attach to them by Route kind,
535    /// namespace, or hostname. If 1 of 2 Gateway listeners accept attachment
536    /// from the referencing Route, the Route MUST be considered successfully
537    /// attached. If no Gateway listeners accept attachment from this Route,
538    /// the Route MUST be considered detached from the Gateway.
539    ///
540    /// Support: Extended
541    #[serde(default, skip_serializing_if = "Option::is_none")]
542    pub port: Option<i32>,
543    /// SectionName is the name of a section within the target resource. In the
544    /// following resources, SectionName is interpreted as the following:
545    ///
546    /// * Gateway: Listener name. When both Port (experimental) and SectionName
547    /// are specified, the name and port of the selected listener must match
548    /// both specified values.
549    /// * Service: Port name. When both Port (experimental) and SectionName
550    /// are specified, the name and port of the selected listener must match
551    /// both specified values.
552    ///
553    /// Implementations MAY choose to support attaching Routes to other resources.
554    /// If that is the case, they MUST clearly document how SectionName is
555    /// interpreted.
556    ///
557    /// When unspecified (empty string), this will reference the entire resource.
558    /// For the purpose of status, an attachment is considered successful if at
559    /// least one section in the parent resource accepts it. For example, Gateway
560    /// listeners can restrict which Routes can attach to them by Route kind,
561    /// namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from
562    /// the referencing Route, the Route MUST be considered successfully
563    /// attached. If no Gateway listeners accept attachment from this Route, the
564    /// Route MUST be considered detached from the Gateway.
565    ///
566    /// Support: Core
567    #[serde(
568        default,
569        skip_serializing_if = "Option::is_none",
570        rename = "sectionName"
571    )]
572    pub section_name: Option<String>,
573}