pub struct CommonRouteSpec {
pub parent_refs: Option<Vec<ParentReference>>,
}
Expand description
CommonRouteSpec defines the common attributes that all Routes MUST include within their spec.
Fields§
§parent_refs: Option<Vec<ParentReference>>
ParentRefs references the resources (usually Gateways) that a Route wants to be attached to. Note that the referenced parent resource needs to allow this for the attachment to be complete. For Gateways, that means the Gateway needs to allow attachment from Routes of this kind and namespace.
The only kind of parent resource with “Core” support is Gateway. This API may be extended in the future to support additional kinds of parent resources such as one of the route kinds.
It is invalid to reference an identical parent more than once. It is valid to reference multiple distinct sections within the same parent resource, such as 2 Listeners within a Gateway.
It is possible to separately reference multiple distinct objects that may be collapsed by an implementation. For example, some implementations may choose to merge compatible Gateway Listeners together. If that is the case, the list of routes attached to those resources should also be merged.
Note that for ParentRefs that cross namespace boundaries, there are specific rules. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example, Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable other kinds of cross-namespace reference.
ParentRefs from a Route to a Service in the same namespace are “producer” routes, which apply default routing rules to inbound connections from any namespace to the Service.
ParentRefs from a Route to a Service in a different namespace are “consumer” routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route.
Trait Implementations§
Source§impl Clone for CommonRouteSpec
impl Clone for CommonRouteSpec
Source§fn clone(&self) -> CommonRouteSpec
fn clone(&self) -> CommonRouteSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CommonRouteSpec
impl Debug for CommonRouteSpec
Source§impl Default for CommonRouteSpec
impl Default for CommonRouteSpec
Source§fn default() -> CommonRouteSpec
fn default() -> CommonRouteSpec
Source§impl<'de> Deserialize<'de> for CommonRouteSpec
impl<'de> Deserialize<'de> for CommonRouteSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for CommonRouteSpec
impl JsonSchema for CommonRouteSpec
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more