Struct k8s_gateway_api::HttpBackendRef
source · pub struct HttpBackendRef {
pub backend_ref: Option<BackendRef>,
pub filters: Option<Vec<HttpRouteFilter>>,
}
Expand description
HTTPBackendRef defines how a HTTPRoute forwards a HTTP request.
Note that when a namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace’s owner to accept the reference. See the ReferenceGrant documentation for details.
When the BackendRef points to a Kubernetes Service, implementations SHOULD honor the appProtocol field if it is set for the target Service Port.
Implementations supporting appProtocol SHOULD recognize the Kubernetes Standard Application Protocols defined in KEP-3726.
If a Service appProtocol isn’t specified, an implementation MAY infer the backend protocol through its own means. Implementations MAY infer the protocol from the Route type referring to the backend Service.
If a Route is not able to send traffic to the backend using the specified protocol then the backend is considered invalid. Implementations MUST set the “ResolvedRefs” condition to “False” with the “UnsupportedProtocol” reason.
Fields§
§backend_ref: Option<BackendRef>
BackendRef is a reference to a backend to forward matched requests to.
A BackendRef can be invalid for the following reasons. In all cases, the
implementation MUST ensure the ResolvedRefs
Condition on the Route
is set to status: False
, with a Reason and Message that indicate
what is the cause of the error.
A BackendRef is invalid if:
-
It refers to an unknown or unsupported kind of resource. In this case, the Reason must be set to
InvalidKind
and Message of the Condition must explain which kind of resource is unknown or unsupported. -
It refers to a resource that does not exist. In this case, the Reason must be set to
BackendNotFound
and the Message of the Condition must explain which resource does not exist. -
It refers a resource in another namespace when the reference has not been explicitly allowed by a ReferenceGrant (or equivalent concept). In this case, the Reason must be set to
RefNotPermitted
and the Message of the Condition must explain which cross-namespace reference is not allowed. -
It refers to a Kubernetes Service that has an incompatible appProtocol for the given Route type
-
The BackendTLSPolicy object is installed in the cluster, a BackendTLSPolicy is present that refers to the Service, and the implementation is unable to meet the requirement. At the time of writing, BackendTLSPolicy is experimental, but once it becomes standard, this will become a MUST requirement.
Support: Core for Kubernetes Service
Support: Implementation-specific for any other resource
Support for weight: Core
Support for Kubernetes Service appProtocol: Extended
Support for BackendTLSPolicy: Experimental and ImplementationSpecific
filters: Option<Vec<HttpRouteFilter>>
Filters defined at this level should be executed if and only if the request is being forwarded to the backend defined here.
Support: Implementation-specific (For broader support of filters, use the Filters field in HTTPRouteRule.)
Trait Implementations§
source§impl Clone for HttpBackendRef
impl Clone for HttpBackendRef
source§fn clone(&self) -> HttpBackendRef
fn clone(&self) -> HttpBackendRef
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HttpBackendRef
impl Debug for HttpBackendRef
source§impl<'de> Deserialize<'de> for HttpBackendRef
impl<'de> Deserialize<'de> for HttpBackendRef
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 HttpBackendRef
impl JsonSchema for HttpBackendRef
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(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moresource§impl PartialEq for HttpBackendRef
impl PartialEq for HttpBackendRef
source§fn eq(&self, other: &HttpBackendRef) -> bool
fn eq(&self, other: &HttpBackendRef) -> bool
self
and other
values to be equal, and is used
by ==
.