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

source§

fn clone(&self) -> HttpBackendRef

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HttpBackendRef

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for HttpBackendRef

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl JsonSchema for HttpBackendRef

source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
source§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
source§

impl PartialEq for HttpBackendRef

source§

fn eq(&self, other: &HttpBackendRef) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for HttpBackendRef

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for HttpBackendRef

source§

impl StructuralEq for HttpBackendRef

source§

impl StructuralPartialEq for HttpBackendRef

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,