route.proto

Package : devportal.solo.io

Top

route.proto

Table of Contents

RouteSpec

A RouteSpec defines the specification for an individual Route.

Field Type Label Description
disable bool Disable exposing this Route to API Consumers.
This is offered as means of easily disabling access to APIs without needing to remove the Route from an API Product.
backends []RoutingDestination repeated Destination services for serving Operation requests. if more than one provided, requests will be split across these backends by the provided weights. At least one backend must be provided in order to route traffic with this RouteConfig.
headerManipulation RouteSpec.HeaderManipulation manipulate headers for requests

RouteSpec.HeaderManipulation

Message headers can be manipulated when Envoy forwards requests to, or responses from, a destination service.

Field Type Label Description
request RouteSpec.HeaderManipulation.HeaderOperations Header manipulation rules to apply before forwarding a request to the destination service
response RouteSpec.HeaderManipulation.HeaderOperations Header manipulation rules to apply before returning a response to the caller

RouteSpec.HeaderManipulation.HeaderOperations

HeaderOperations Describes the header manipulations to apply

Field Type Label Description
set []RouteSpec.HeaderManipulation.HeaderOperations.SetEntry repeated Overwrite the headers specified by key with the given values
add []RouteSpec.HeaderManipulation.HeaderOperations.AddEntry repeated Append the given values to the headers specified by keys (will create a comma-separated list of values)
remove []string repeated Remove a the specified headers

RouteSpec.HeaderManipulation.HeaderOperations.AddEntry

Field Type Label Description
key string
value string

RouteSpec.HeaderManipulation.HeaderOperations.SetEntry

Field Type Label Description
key string
value string

RouteSpecifier

RouteSpecifier provides a generic way to specify a route as either a Ref to a route CR, or by directly inlining a RouteSpec. RouteSpecifiers can be defined in API Docs as well as API Products to control how routes exposed to those APIs will be configured.

Field Type Label Description
routeRef common.devportal.solo.io.ObjectRef a reference to a Route resource. This is useful for reusing routes across operations.
inlineRoute RouteSpec Provide a route specification directly on the Operation.

RouteStatus

status of the Route. contains a list of the locations where the Route is referenced

Field Type Label Description
observedGeneration int64 The observed generation of the Route. When this matches the Route’s metadata.generation, it indicates the status is up-to-date.
state common.devportal.solo.io.State The current state of the Route.
reason string A human-readable string explaining the error, if any.

RoutingDestination

RoutingDestination defines a backend (HTTP server) which serves API traffic

Field Type Label Description
kube RoutingDestination.KubernetesServiceDestination Route requests to a kubernetes service
consul RoutingDestination.ConsulServiceDestination Route requests to a consul service. Not supported in Istio. Not currently implemented.
lambda RoutingDestination.AWSLambdaFunctionDestination Route to a Lambda Function. Not supported in Istio. Not currently implemented.
static RoutingDestination.StaticDestination Route to a Static IP or Host. Not currently implemented.
weight uint32 optional weight for the destination. ignored if only one destination appears in the route.

RoutingDestination.AWSLambdaFunctionDestination

Identifies an AWS Lambda function to route requests to

Field Type Label Description
logicalName string the logical name gloo should associate with this function. if left empty, it will default to lambda_function_name+qualifier
lambdaFunctionName string The Name of the Lambda Function as it appears in the AWS Lambda Portal
qualifier string The Qualifier for the Lambda Function. Qualifiers act as a kind of version for Lambda Functions. See https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html for more info.
invocationStyle RoutingDestination.AWSLambdaFunctionDestination.InvocationStyle Can be either Sync or Async.
responseTransformation bool de-jsonify response bodies returned from aws lambda

RoutingDestination.ConsulServiceDestination

Identifies a Consul service to route traffic to. Multiple Consul services with the same name can present distinct sets of tags, listen of different ports, and live in multiple data centers (see an example here). You can target the desired subset of services via the fields in this configuration. Gloo Edge will detect the correspondent IP addresses and ports and load balance traffic between them.

Field Type Label Description
serviceName string The name of the target service. This field is required.
tags []string repeated If provided, load balance traffic only between services matching all the given tags.
dataCenters []string repeated If provided, load balance traffic only between services running in the given data centers.

RoutingDestination.KubernetesServiceDestination

Identifies a port on a kubernetes service to route traffic to.

Field Type Label Description
name string Name of the Kubernetes service
namespace string Namespace of the Kubernetes service
port uint32 The ServicePort to which to route traffic
subset []RoutingDestination.KubernetesServiceDestination.SubsetEntry repeated optional labels for defining a destination which is a subset of the service. not currently implemented.

RoutingDestination.KubernetesServiceDestination.SubsetEntry

Field Type Label Description
key string
value string

RoutingDestination.StaticDestination

a statically-defined destination for a Route

Field Type Label Description
hosts []RoutingDestination.StaticDestination.Host repeated A list of addresses and ports at least one must be specified

RoutingDestination.StaticDestination.Host

Represents a single instance of a static destination

Field Type Label Description
addr string Address (hostname or IP)
port uint32 Port the instance is listening on

RoutingDestination.AWSLambdaFunctionDestination.InvocationStyle

Name Number Description
SYNC 0
ASYNC 1