pub struct GrpcRouteBackendRef {
pub inner: BackendObjectReference,
pub filters: Option<Vec<GrpcRouteFilter>>,
pub weight: Option<u16>,
}
Expand description
GrpcBackendRef defines how a GrpcRoute forwards a gRPC request.
Note that when a namespace different from 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.
gateway:experimental:description
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.
</gateway:experimental:description>
Fields§
§inner: BackendObjectReference
BackendObjectReference references a Kubernetes object.
filters: Option<Vec<GrpcRouteFilter>>
Filters defined at this level MUST 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 GrpcRouteRule.)
weight: Option<u16>
Weight specifies the proportion of requests forwarded to the referenced backend. This is computed as weight/(sum of all weights in this BackendRefs list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. Weight is not a percentage and the sum of weights does not need to equal 100.
If only one backend is specified, and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weight is set to 0, no traffic should be forwarded for this entry. If unspecified, weight defaults to 1.
Support for this field varies based on the context where used.
Trait Implementations§
Source§impl Clone for GrpcRouteBackendRef
impl Clone for GrpcRouteBackendRef
Source§fn clone(&self) -> GrpcRouteBackendRef
fn clone(&self) -> GrpcRouteBackendRef
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for GrpcRouteBackendRef
impl Debug for GrpcRouteBackendRef
Source§impl<'de> Deserialize<'de> for GrpcRouteBackendRef
impl<'de> Deserialize<'de> for GrpcRouteBackendRef
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 From<GrpcRouteBackendRef> for HttpBackendRef
impl From<GrpcRouteBackendRef> for HttpBackendRef
Source§fn from(backend: GrpcRouteBackendRef) -> Self
fn from(backend: GrpcRouteBackendRef) -> Self
Source§impl JsonSchema for GrpcRouteBackendRef
impl JsonSchema for GrpcRouteBackendRef
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