pub struct ParentReference {
pub group: Option<Group>,
pub kind: Option<Kind>,
pub namespace: Option<Namespace>,
pub name: ObjectName,
pub section_name: Option<SectionName>,
pub port: Option<PortNumber>,
}
Expand description
ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually a route). 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 HTTPRoute.
The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid.
Fields§
§group: Option<Group>
Group is the group of the referent.
Support: Core
kind: Option<Kind>
Kind is kind of the referent.
Support: Core (Gateway) Support: Custom (Other Resources)
namespace: Option<Namespace>
Namespace is the namespace of the referent. When unspecified (or empty string), this refers to the local namespace of the Route.
Support: Core
name: ObjectName
Name is the name of the referent.
Support: Core
section_name: Option<SectionName>
SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following:
- Gateway: Listener Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values.
Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted.
When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
Support: Core
port: Option<PortNumber>
Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource:
- Gateway: All listeners listening on the specified port that also
support this kind of Route(and select this Route). It’s not recommended
to set
Port
unless the networking behaviors specified in a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match both specified values.
Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted.
For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
Support: Extended
Trait Implementations§
Source§impl Clone for ParentReference
impl Clone for ParentReference
Source§fn clone(&self) -> ParentReference
fn clone(&self) -> ParentReference
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ParentReference
impl Debug for ParentReference
Source§impl<'de> Deserialize<'de> for ParentReference
impl<'de> Deserialize<'de> for ParentReference
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 ParentReference
impl JsonSchema for ParentReference
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