[][src]Struct openshift_openapi::api::route::v1::RouteSpec

pub struct RouteSpec {
    pub alternate_backends: Option<Vec<RouteTargetReference>>,
    pub host: String,
    pub path: Option<String>,
    pub port: Option<RoutePort>,
    pub tls: Option<TLSConfig>,
    pub to: RouteTargetReference,
    pub wildcard_policy: Option<String>,
}

RouteSpec describes the hostname or path the route exposes, any security information, and one to four backends (services) the route points to. Requests are distributed among the backends depending on the weights assigned to each backend. When using roundrobin scheduling the portion of requests that go to each backend is the backend weight divided by the sum of all of the backend weights. When the backend has more than one endpoint the requests that end up on the backend are roundrobin distributed among the endpoints. Weights are between 0 and 256 with default 1. Weight 0 causes no requests to the backend. If all weights are zero the route will be considered to have no backends and return a standard 503 response.

The tls field is optional and allows specific certificates or behavior for the route. Routers typically configure a default certificate on a wildcard domain to terminate routes without explicit certificates, but custom hostnames usually must choose passthrough (send traffic directly to the backend via the TLS Server-Name- Indication field) or provide a certificate.

Fields

alternate_backends: Option<Vec<RouteTargetReference>>

alternateBackends allows up to 3 additional backends to be assigned to the route. Only the Service kind is allowed, and it will be defaulted to Service. Use the weight field in RouteTargetReference object to specify relative preference.

host: String

host is an alias/DNS that points to the service. Optional. If not specified a route name will typically be automatically chosen. Must follow DNS952 subdomain conventions.

path: Option<String>

Path that the router watches for, to route traffic for to the service. Optional

port: Option<RoutePort>

If specified, the port to be used by the router. Most routers will use all endpoints exposed by the service by default - set this value to instruct routers which port to use.

tls: Option<TLSConfig>

The tls field provides the ability to configure certificates and termination for the route.

to: RouteTargetReference

to is an object the route should use as the primary backend. Only the Service kind is allowed, and it will be defaulted to Service. If the weight field (0-256 default 1) is set to zero, no traffic will be sent to this backend.

wildcard_policy: Option<String>

Wildcard policy if any for the route. Currently only 'Subdomain' or 'None' is allowed.

Trait Implementations

impl Clone for RouteSpec[src]

impl Debug for RouteSpec[src]

impl Default for RouteSpec[src]

impl<'de> Deserialize<'de> for RouteSpec[src]

impl PartialEq<RouteSpec> for RouteSpec[src]

impl Serialize for RouteSpec[src]

impl StructuralPartialEq for RouteSpec[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.