v1alpha1

package
v0.0.0-...-2d182f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoadBalancing_SimpleLBPolicy_name = map[int32]string{
	0: "ROUND_ROBIN",
	1: "LEAST_CONN",
	2: "RANDOM",
}
View Source
var LoadBalancing_SimpleLBPolicy_value = map[string]int32{
	"ROUND_ROBIN": 0,
	"LEAST_CONN":  1,
	"RANDOM":      2,
}

Functions

This section is empty.

Types

type CircuitBreaker

type CircuitBreaker struct {
	// Types that are valid to be assigned to CbPolicy:
	//	*CircuitBreaker_SimpleCb
	//	*CircuitBreaker_Custom
	CbPolicy             isCircuitBreaker_CbPolicy `protobuf_oneof:"cb_policy"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

Circuit breaker configuration for Envoy. The circuit breaker implementation is fine-grained in that it tracks the success/failure rates of individual hosts in the load balancing pool. Hosts that continually return errors for API calls are ejected from the pool for a pre-defined period of time. See Envoy's [circuit breaker](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/circuit_breaking) and [outlier detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/outlier) for more details.

func (*CircuitBreaker) Descriptor

func (*CircuitBreaker) Descriptor() ([]byte, []int)

func (*CircuitBreaker) GetCbPolicy

func (m *CircuitBreaker) GetCbPolicy() isCircuitBreaker_CbPolicy

func (*CircuitBreaker) GetCustom

func (m *CircuitBreaker) GetCustom() *any.Any

func (*CircuitBreaker) GetSimpleCb

func (*CircuitBreaker) ProtoMessage

func (*CircuitBreaker) ProtoMessage()

func (*CircuitBreaker) Reset

func (m *CircuitBreaker) Reset()

func (*CircuitBreaker) String

func (m *CircuitBreaker) String() string

func (*CircuitBreaker) XXX_DiscardUnknown

func (m *CircuitBreaker) XXX_DiscardUnknown()

func (*CircuitBreaker) XXX_Marshal

func (m *CircuitBreaker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CircuitBreaker) XXX_Merge

func (dst *CircuitBreaker) XXX_Merge(src proto.Message)

func (*CircuitBreaker) XXX_OneofFuncs

func (*CircuitBreaker) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*CircuitBreaker) XXX_Size

func (m *CircuitBreaker) XXX_Size() int

func (*CircuitBreaker) XXX_Unmarshal

func (m *CircuitBreaker) XXX_Unmarshal(b []byte) error

type CircuitBreaker_Custom

type CircuitBreaker_Custom struct {
	Custom *any.Any `protobuf:"bytes,2,opt,name=custom,proto3,oneof"`
}

type CircuitBreaker_SimpleCb

type CircuitBreaker_SimpleCb struct {
	SimpleCb *CircuitBreaker_SimpleCircuitBreakerPolicy `protobuf:"bytes,1,opt,name=simple_cb,json=simpleCb,proto3,oneof"`
}

type CircuitBreaker_SimpleCircuitBreakerPolicy

type CircuitBreaker_SimpleCircuitBreakerPolicy struct {
	// Maximum number of connections to a backend.
	MaxConnections int32 `protobuf:"varint,1,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"`
	// Maximum number of pending requests to a backend. Default 1024
	HttpMaxPendingRequests int32 `` /* 132-byte string literal not displayed */
	// Maximum number of requests to a backend. Default 1024
	HttpMaxRequests int32 `protobuf:"varint,3,opt,name=http_max_requests,json=httpMaxRequests,proto3" json:"http_max_requests,omitempty"`
	// Minimum time the circuit will be open. format: 1h/1m/1s/1ms. MUST
	// BE >=1ms. Default is 30s.
	SleepWindow *duration.Duration `protobuf:"bytes,4,opt,name=sleep_window,json=sleepWindow,proto3" json:"sleep_window,omitempty"`
	// Number of 5XX errors before circuit is opened. Defaults to 5.
	HttpConsecutiveErrors int32 `` /* 127-byte string literal not displayed */
	// Time interval between ejection sweep analysis. format:
	// 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
	HttpDetectionInterval *duration.Duration `` /* 126-byte string literal not displayed */
	// Maximum number of requests per connection to a backend. Setting this
	// parameter to 1 disables keep alive.
	HttpMaxRequestsPerConnection int32 `` /* 152-byte string literal not displayed */
	// Maximum % of hosts in the load balancing pool for the destination
	// service that can be ejected by the circuit breaker. Defaults to
	// 10%.
	HttpMaxEjectionPercent int32 `` /* 132-byte string literal not displayed */
	// Maximum number of retries that can be outstanding to all hosts in a
	// cluster at a given time. Defaults to 3.
	HttpMaxRetries       int32    `protobuf:"varint,9,opt,name=http_max_retries,json=httpMaxRetries,proto3" json:"http_max_retries,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A simple circuit breaker can be set based on a number of criteria such as connection and request limits. For example, the following destination policy sets a limit of 100 connections to "reviews" service version "v1" backends.

```yaml metadata:

name: reviews-cb-policy
namespace: default

spec:

destination:
  name: reviews
  labels:
    version: v1
circuitBreaker:
  simpleCb:
    maxConnections: 100

```

The following destination policy sets a limit of 100 connections and 1000 concurrent requests, with no more than 10 req/connection to "reviews" service version "v1" backends. In addition, it configures hosts to be scanned every 5 mins, such that any host that fails 7 consecutive times with 5XX error code will be ejected for 15 minutes.

```yaml metadata:

name: reviews-cb-policy
namespace: default

spec:

destination:
  name: reviews
  labels:
    version: v1
circuitBreaker:
  simpleCb:
    maxConnections: 100
    httpMaxRequests: 1000
    httpMaxRequestsPerConnection: 10
    httpConsecutiveErrors: 7
    sleepWindow: 15m
    httpDetectionInterval: 5m

```

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) Descriptor

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) Descriptor() ([]byte, []int)

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpConsecutiveErrors

func (m *CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpConsecutiveErrors() int32

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpDetectionInterval

func (m *CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpDetectionInterval() *duration.Duration

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpMaxEjectionPercent

func (m *CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpMaxEjectionPercent() int32

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpMaxPendingRequests

func (m *CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpMaxPendingRequests() int32

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpMaxRequests

func (m *CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpMaxRequests() int32

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpMaxRequestsPerConnection

func (m *CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpMaxRequestsPerConnection() int32

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpMaxRetries

func (m *CircuitBreaker_SimpleCircuitBreakerPolicy) GetHttpMaxRetries() int32

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) GetMaxConnections

func (m *CircuitBreaker_SimpleCircuitBreakerPolicy) GetMaxConnections() int32

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) GetSleepWindow

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) ProtoMessage

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) Reset

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) String

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) XXX_DiscardUnknown

func (m *CircuitBreaker_SimpleCircuitBreakerPolicy) XXX_DiscardUnknown()

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) XXX_Marshal

func (m *CircuitBreaker_SimpleCircuitBreakerPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) XXX_Merge

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) XXX_Size

func (*CircuitBreaker_SimpleCircuitBreakerPolicy) XXX_Unmarshal

type CorsPolicy

type CorsPolicy struct {
	// The list of origins that are allowed to perform CORS requests. The content will
	// be serialized into the Access-Control-Allow-Origin header. Wildcard * will allow
	// all origins.
	AllowOrigin []string `protobuf:"bytes,1,rep,name=allow_origin,json=allowOrigin,proto3" json:"allow_origin,omitempty"`
	// List of HTTP methods allowed to access the resource. The content will
	// be serialized into the Access-Control-Allow-Methods header.
	AllowMethods []string `protobuf:"bytes,2,rep,name=allow_methods,json=allowMethods,proto3" json:"allow_methods,omitempty"`
	// List of HTTP headers that can be used when requesting the
	// resource. Serialized to Access-Control-Allow-Methods header.
	AllowHeaders []string `protobuf:"bytes,3,rep,name=allow_headers,json=allowHeaders,proto3" json:"allow_headers,omitempty"`
	// A white list of HTTP headers that the browsers are allowed to
	// access. Serialized into Access-Control-Expose-Headers header.
	ExposeHeaders []string `protobuf:"bytes,4,rep,name=expose_headers,json=exposeHeaders,proto3" json:"expose_headers,omitempty"`
	// Specifies how long the the results of a preflight request can be
	// cached. Translates to the Access-Control-Max-Age header.
	MaxAge *duration.Duration `protobuf:"bytes,5,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"`
	// Indicates whether the caller is allowed to send the actual request
	// (not the preflight) using credentials. Translates to
	// Access-Control-Allow-Credentials header.
	AllowCredentials     *wrappers.BoolValue `protobuf:"bytes,6,opt,name=allow_credentials,json=allowCredentials,proto3" json:"allow_credentials,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

Describes the Cross-Origin Resource Sharing (CORS) policy, for a given service. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS for further details about cross origin resource sharing. For example, the following rule restricts cross origin requests to those originating from example.com domain using HTTP POST/GET, and sets the Access-Control-Allow-Credentials header to false. In addition, it only exposes X-Foo-bar header and sets an expiry period of 1 day.

metadata:
  name: my-rule
  namespace: default
spec:
  destination:
    name: ratings
  route:
  - labels:
      version: v1
  corsPolicy:
    allowOrigin:
    - example.com
    allowMethods:
    - POST
    - GET
    allowCredentials: false
    allowHeaders:
    - X-Foo-Bar
    maxAge: "1d"

func (*CorsPolicy) Descriptor

func (*CorsPolicy) Descriptor() ([]byte, []int)

func (*CorsPolicy) GetAllowCredentials

func (m *CorsPolicy) GetAllowCredentials() *wrappers.BoolValue

func (*CorsPolicy) GetAllowHeaders

func (m *CorsPolicy) GetAllowHeaders() []string

func (*CorsPolicy) GetAllowMethods

func (m *CorsPolicy) GetAllowMethods() []string

func (*CorsPolicy) GetAllowOrigin

func (m *CorsPolicy) GetAllowOrigin() []string

func (*CorsPolicy) GetExposeHeaders

func (m *CorsPolicy) GetExposeHeaders() []string

func (*CorsPolicy) GetMaxAge

func (m *CorsPolicy) GetMaxAge() *duration.Duration

func (*CorsPolicy) ProtoMessage

func (*CorsPolicy) ProtoMessage()

func (*CorsPolicy) Reset

func (m *CorsPolicy) Reset()

func (*CorsPolicy) String

func (m *CorsPolicy) String() string

func (*CorsPolicy) XXX_DiscardUnknown

func (m *CorsPolicy) XXX_DiscardUnknown()

func (*CorsPolicy) XXX_Marshal

func (m *CorsPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CorsPolicy) XXX_Merge

func (dst *CorsPolicy) XXX_Merge(src proto.Message)

func (*CorsPolicy) XXX_Size

func (m *CorsPolicy) XXX_Size() int

func (*CorsPolicy) XXX_Unmarshal

func (m *CorsPolicy) XXX_Unmarshal(b []byte) error

type DestinationPolicy

type DestinationPolicy struct {
	// Optional: Destination uniquely identifies the destination service associated
	// with this policy.
	Destination *IstioService `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
	// Optional: Source uniquely identifies the source service associated
	// with this policy.
	Source *IstioService `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
	// Load balancing policy.
	LoadBalancing *LoadBalancing `protobuf:"bytes,3,opt,name=load_balancing,json=loadBalancing,proto3" json:"load_balancing,omitempty"`
	// Circuit breaker policy.
	CircuitBreaker *CircuitBreaker `protobuf:"bytes,4,opt,name=circuit_breaker,json=circuitBreaker,proto3" json:"circuit_breaker,omitempty"`
	// (-- Other custom policy implementations --)
	Custom               *any.Any `protobuf:"bytes,100,opt,name=custom,proto3" json:"custom,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

DestinationPolicy defines client/caller-side policies that determine how to handle traffic bound to a particular destination service. The policy specifies configuration for load balancing and circuit breakers. For example, a simple load balancing policy for the ratings service would look as follows:

metadata:
  name: ratings-lb-policy
  namespace: default # optional (default is "default")
spec:
  destination:
    name: ratings
  loadBalancing:
    name: ROUND_ROBIN

The FQDN of the destination service is composed from the destination name and meta namespace fields, along with a platform-specific domain suffix (e.g. on Kubernetes, "reviews" + "default" + "svc.cluster.local" -> "reviews.default.svc.cluster.local").

A destination policy can be restricted to a particular version of a service or applied to all versions. It can also be restricted to calls from a particular source. For example, the following load balancing policy applies to version v1 of the ratings service running in the prod environment but only when called from version v2 of the reviews service:

metadata:
  name: ratings-lb-policy
  namespace: default
spec:
  source:
    name: reviews
    labels:
      version: v2
  destination:
    name: ratings
    labels:
      env: prod
      version: v1
  loadBalancing:
    name: ROUND_ROBIN

*Note:* Destination policies will be applied only if the corresponding tagged instances are explicitly routed to. In other words, for every destination policy defined, at least one route rule must refer to the service version indicated in the destination policy.

func (*DestinationPolicy) Descriptor

func (*DestinationPolicy) Descriptor() ([]byte, []int)

func (*DestinationPolicy) GetCircuitBreaker

func (m *DestinationPolicy) GetCircuitBreaker() *CircuitBreaker

func (*DestinationPolicy) GetCustom

func (m *DestinationPolicy) GetCustom() *any.Any

func (*DestinationPolicy) GetDestination

func (m *DestinationPolicy) GetDestination() *IstioService

func (*DestinationPolicy) GetLoadBalancing

func (m *DestinationPolicy) GetLoadBalancing() *LoadBalancing

func (*DestinationPolicy) GetSource

func (m *DestinationPolicy) GetSource() *IstioService

func (*DestinationPolicy) ProtoMessage

func (*DestinationPolicy) ProtoMessage()

func (*DestinationPolicy) Reset

func (m *DestinationPolicy) Reset()

func (*DestinationPolicy) String

func (m *DestinationPolicy) String() string

func (*DestinationPolicy) XXX_DiscardUnknown

func (m *DestinationPolicy) XXX_DiscardUnknown()

func (*DestinationPolicy) XXX_Marshal

func (m *DestinationPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DestinationPolicy) XXX_Merge

func (dst *DestinationPolicy) XXX_Merge(src proto.Message)

func (*DestinationPolicy) XXX_Size

func (m *DestinationPolicy) XXX_Size() int

func (*DestinationPolicy) XXX_Unmarshal

func (m *DestinationPolicy) XXX_Unmarshal(b []byte) error

type DestinationWeight

type DestinationWeight struct {
	// Sometimes required. Optional destination uniquely identifies the destination service. If not
	// specified, the value is inherited from the parent route rule.
	Destination *IstioService `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
	// Sometimes required. Service version identifier for the destination service.
	// (-- N.B. The map is used instead of pstruct due to lack of serialization support
	// in golang protobuf library (see https://github.com/golang/protobuf/pull/208) --)
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// REQUIRED. The proportion of traffic to be forwarded to the service
	// version. (0-100). Sum of weights across destinations SHOULD BE ==
	// 100. If there is only destination in a rule, the weight value is
	// assumed to be 100. When using multiple weights, either destination or labels must be
	// specified.
	Weight               int32    `protobuf:"varint,3,opt,name=weight,proto3" json:"weight,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Each routing rule is associated with one or more service versions (see glossary in beginning of document). Weights associated with the version determine the proportion of traffic it receives. For example, the following rule will route 25% of traffic for the "reviews" service to instances with the "v2" tag and the remaining traffic (i.e., 75%) to "v1".

metadata:
  name: my-rule
  namespace: default
spec:
  destination:
    name: reviews
  route:
  - labels:
      version: v2
    weight: 25
  - labels:
      version: v1
    weight: 75

func (*DestinationWeight) Descriptor

func (*DestinationWeight) Descriptor() ([]byte, []int)

func (*DestinationWeight) GetDestination

func (m *DestinationWeight) GetDestination() *IstioService

func (*DestinationWeight) GetLabels

func (m *DestinationWeight) GetLabels() map[string]string

func (*DestinationWeight) GetWeight

func (m *DestinationWeight) GetWeight() int32

func (*DestinationWeight) ProtoMessage

func (*DestinationWeight) ProtoMessage()

func (*DestinationWeight) Reset

func (m *DestinationWeight) Reset()

func (*DestinationWeight) String

func (m *DestinationWeight) String() string

func (*DestinationWeight) XXX_DiscardUnknown

func (m *DestinationWeight) XXX_DiscardUnknown()

func (*DestinationWeight) XXX_Marshal

func (m *DestinationWeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DestinationWeight) XXX_Merge

func (dst *DestinationWeight) XXX_Merge(src proto.Message)

func (*DestinationWeight) XXX_Size

func (m *DestinationWeight) XXX_Size() int

func (*DestinationWeight) XXX_Unmarshal

func (m *DestinationWeight) XXX_Unmarshal(b []byte) error

type EgressRule

type EgressRule struct {
	// REQUIRED: A domain name, optionally with a wildcard prefix, or an IP, or a block of IPs
	// associated with the external service.
	// ONLY the "service" field of "destination" will be taken into consideration. Name,
	// namespace, domain and labels are ignored. Routing rules and destination policies that
	// refer to these external services must have identical specification for the destination
	// as the corresponding egress rule.
	//
	// The "service" field of "destination" for HTTP-based services must be an IP or a domain name,
	// optionally with a wildcard prefix. Wildcard domain specifications must conform to format
	// allowed by Envoy's Virtual Host specification, such as “*.foo.com” or “*-bar.foo.com”.
	// The character '*' in a domain specification indicates a non-empty string. Hence, a wildcard
	// domain of form “*-bar.foo.com” will match “baz-bar.foo.com” but not “-bar.foo.com”.
	//
	// The "service" field of "destination" for TCP services must be an IP or a block of IPs in CIDR notation.
	Destination *IstioService `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
	// REQUIRED: list of ports on which the external service is available.
	Ports []*EgressRule_Port `protobuf:"bytes,2,rep,name=ports,proto3" json:"ports,omitempty"`
	// Forward all the external traffic through a dedicated egress proxy. It is used in some scenarios
	// where there is a requirement that all the external traffic goes through special dedicated nodes/pods.
	// These dedicated egress nodes could then be more closely monitored for security vulnerabilities.
	//
	// The default is false, i.e. the sidecar forwards external traffic directly to the external service.
	UseEgressProxy       bool     `protobuf:"varint,3,opt,name=use_egress_proxy,json=useEgressProxy,proto3" json:"use_egress_proxy,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Egress rules describe the properties of a service outside Istio. When transparent proxying is used, egress rules signify a white listed set of external services that microserves in the mesh are allowed to access. A subset of routing rules and all destination policies can be applied on the service targeted by an egress rule. TCP services and HTTP-based services can be expressed by an egress rule. The destination of an egress rule for HTTP-based services must be an IP or a domain name, optionally with a wildcard prefix (e.g., *.foo.com). For TCP based services, the destination of an egress rule must be an IP or a block of IPs in CIDR notation.

If TLS origination from the sidecar is desired, the protocol associated with the service port must be marked as HTTPS, and the service is expected to be accessed over HTTP (e.g., http://gmail.com:443). The sidecar will automatically upgrade the connection to TLS when initiating a connection with the external service.

For example, the following egress rule describes the set of services hosted under the *.foo.com domain

kind: EgressRule
metadata:
  name: foo-egress-rule
spec:
  destination:
    service: *.foo.com
  ports:
    - port: 80
      protocol: http
    - port: 443
      protocol: https

The following egress rule describes the set of services accessed by a block of IPs

kind: EgressRule
metadata:
  name: bar-egress-rule
spec:
  destination:
    service: 92.198.174.192/27
  ports:
    - port: 111
      protocol: tcp

func (*EgressRule) Descriptor

func (*EgressRule) Descriptor() ([]byte, []int)

func (*EgressRule) GetDestination

func (m *EgressRule) GetDestination() *IstioService

func (*EgressRule) GetPorts

func (m *EgressRule) GetPorts() []*EgressRule_Port

func (*EgressRule) GetUseEgressProxy

func (m *EgressRule) GetUseEgressProxy() bool

func (*EgressRule) ProtoMessage

func (*EgressRule) ProtoMessage()

func (*EgressRule) Reset

func (m *EgressRule) Reset()

func (*EgressRule) String

func (m *EgressRule) String() string

func (*EgressRule) XXX_DiscardUnknown

func (m *EgressRule) XXX_DiscardUnknown()

func (*EgressRule) XXX_Marshal

func (m *EgressRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EgressRule) XXX_Merge

func (dst *EgressRule) XXX_Merge(src proto.Message)

func (*EgressRule) XXX_Size

func (m *EgressRule) XXX_Size() int

func (*EgressRule) XXX_Unmarshal

func (m *EgressRule) XXX_Unmarshal(b []byte) error

type EgressRule_Port

type EgressRule_Port struct {
	// A valid non-negative integer port number.
	Port int32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
	// The protocol to communicate with the external services.
	// MUST BE one of HTTP|HTTPS|GRPC|HTTP2|TCP|MONGO.
	Protocol             string   `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Port describes the properties of a specific TCP port of an external service.

func (*EgressRule_Port) Descriptor

func (*EgressRule_Port) Descriptor() ([]byte, []int)

func (*EgressRule_Port) GetPort

func (m *EgressRule_Port) GetPort() int32

func (*EgressRule_Port) GetProtocol

func (m *EgressRule_Port) GetProtocol() string

func (*EgressRule_Port) ProtoMessage

func (*EgressRule_Port) ProtoMessage()

func (*EgressRule_Port) Reset

func (m *EgressRule_Port) Reset()

func (*EgressRule_Port) String

func (m *EgressRule_Port) String() string

func (*EgressRule_Port) XXX_DiscardUnknown

func (m *EgressRule_Port) XXX_DiscardUnknown()

func (*EgressRule_Port) XXX_Marshal

func (m *EgressRule_Port) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EgressRule_Port) XXX_Merge

func (dst *EgressRule_Port) XXX_Merge(src proto.Message)

func (*EgressRule_Port) XXX_Size

func (m *EgressRule_Port) XXX_Size() int

func (*EgressRule_Port) XXX_Unmarshal

func (m *EgressRule_Port) XXX_Unmarshal(b []byte) error

type HTTPFaultInjection

type HTTPFaultInjection struct {
	// Delay requests before forwarding, emulating various failures such as
	// network issues, overloaded upstream service, etc.
	Delay *HTTPFaultInjection_Delay `protobuf:"bytes,1,opt,name=delay,proto3" json:"delay,omitempty"`
	// Abort Http request attempts and return error codes back to downstream
	// service, giving the impression that the upstream service is faulty.
	Abort                *HTTPFaultInjection_Abort `protobuf:"bytes,2,opt,name=abort,proto3" json:"abort,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

HTTPFaultInjection can be used to specify one or more faults to inject while forwarding http requests to the destination specified in the route rule. Fault specification is part of a route rule. Faults include aborting the Http request from downstream service, and/or delaying proxying of requests. A fault rule MUST HAVE delay or abort or both.

*Note:* Delay and abort faults are independent of one another, even if both are specified simultaneously.

func (*HTTPFaultInjection) Descriptor

func (*HTTPFaultInjection) Descriptor() ([]byte, []int)

func (*HTTPFaultInjection) GetAbort

func (*HTTPFaultInjection) GetDelay

func (*HTTPFaultInjection) ProtoMessage

func (*HTTPFaultInjection) ProtoMessage()

func (*HTTPFaultInjection) Reset

func (m *HTTPFaultInjection) Reset()

func (*HTTPFaultInjection) String

func (m *HTTPFaultInjection) String() string

func (*HTTPFaultInjection) XXX_DiscardUnknown

func (m *HTTPFaultInjection) XXX_DiscardUnknown()

func (*HTTPFaultInjection) XXX_Marshal

func (m *HTTPFaultInjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HTTPFaultInjection) XXX_Merge

func (dst *HTTPFaultInjection) XXX_Merge(src proto.Message)

func (*HTTPFaultInjection) XXX_Size

func (m *HTTPFaultInjection) XXX_Size() int

func (*HTTPFaultInjection) XXX_Unmarshal

func (m *HTTPFaultInjection) XXX_Unmarshal(b []byte) error

type HTTPFaultInjection_Abort

type HTTPFaultInjection_Abort struct {
	// percentage of requests to be aborted with the error code provided (0-100).
	Percent float32 `protobuf:"fixed32,1,opt,name=percent,proto3" json:"percent,omitempty"`
	// Types that are valid to be assigned to ErrorType:
	//	*HTTPFaultInjection_Abort_GrpcStatus
	//	*HTTPFaultInjection_Abort_Http2Error
	//	*HTTPFaultInjection_Abort_HttpStatus
	ErrorType isHTTPFaultInjection_Abort_ErrorType `protobuf_oneof:"error_type"`
	// (-- Specify abort code as part of Http request.
	// TODO: The semantics and syntax of the headers is undefined. --)
	OverrideHeaderName   string   `protobuf:"bytes,5,opt,name=override_header_name,json=overrideHeaderName,proto3" json:"override_header_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Abort specification is used to prematurely abort a request with a pre-specified error code. The following example will return an HTTP 400 error code for 10% of the requests to the "ratings" service "v1".

metadata:
  name: my-rule
spec:
  destination:
    name: reviews
  route:
  - labels:
      version: v1
  httpFault:
    abort:
      percent: 10
      httpStatus: 400

The _httpStatus_ field is used to indicate the HTTP status code to return to the caller. The optional _percent_ field, a value between 0 and 100, is used to only abort a certain percentage of requests. If not specified, all requests are aborted.

func (*HTTPFaultInjection_Abort) Descriptor

func (*HTTPFaultInjection_Abort) Descriptor() ([]byte, []int)

func (*HTTPFaultInjection_Abort) GetErrorType

func (m *HTTPFaultInjection_Abort) GetErrorType() isHTTPFaultInjection_Abort_ErrorType

func (*HTTPFaultInjection_Abort) GetGrpcStatus

func (m *HTTPFaultInjection_Abort) GetGrpcStatus() string

func (*HTTPFaultInjection_Abort) GetHttp2Error

func (m *HTTPFaultInjection_Abort) GetHttp2Error() string

func (*HTTPFaultInjection_Abort) GetHttpStatus

func (m *HTTPFaultInjection_Abort) GetHttpStatus() int32

func (*HTTPFaultInjection_Abort) GetOverrideHeaderName

func (m *HTTPFaultInjection_Abort) GetOverrideHeaderName() string

func (*HTTPFaultInjection_Abort) GetPercent

func (m *HTTPFaultInjection_Abort) GetPercent() float32

func (*HTTPFaultInjection_Abort) ProtoMessage

func (*HTTPFaultInjection_Abort) ProtoMessage()

func (*HTTPFaultInjection_Abort) Reset

func (m *HTTPFaultInjection_Abort) Reset()

func (*HTTPFaultInjection_Abort) String

func (m *HTTPFaultInjection_Abort) String() string

func (*HTTPFaultInjection_Abort) XXX_DiscardUnknown

func (m *HTTPFaultInjection_Abort) XXX_DiscardUnknown()

func (*HTTPFaultInjection_Abort) XXX_Marshal

func (m *HTTPFaultInjection_Abort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HTTPFaultInjection_Abort) XXX_Merge

func (dst *HTTPFaultInjection_Abort) XXX_Merge(src proto.Message)

func (*HTTPFaultInjection_Abort) XXX_OneofFuncs

func (*HTTPFaultInjection_Abort) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*HTTPFaultInjection_Abort) XXX_Size

func (m *HTTPFaultInjection_Abort) XXX_Size() int

func (*HTTPFaultInjection_Abort) XXX_Unmarshal

func (m *HTTPFaultInjection_Abort) XXX_Unmarshal(b []byte) error

type HTTPFaultInjection_Abort_GrpcStatus

type HTTPFaultInjection_Abort_GrpcStatus struct {
	GrpcStatus string `protobuf:"bytes,2,opt,name=grpc_status,json=grpcStatus,proto3,oneof"`
}

type HTTPFaultInjection_Abort_Http2Error

type HTTPFaultInjection_Abort_Http2Error struct {
	Http2Error string `protobuf:"bytes,3,opt,name=http2_error,json=http2Error,proto3,oneof"`
}

type HTTPFaultInjection_Abort_HttpStatus

type HTTPFaultInjection_Abort_HttpStatus struct {
	HttpStatus int32 `protobuf:"varint,4,opt,name=http_status,json=httpStatus,proto3,oneof"`
}

type HTTPFaultInjection_Delay

type HTTPFaultInjection_Delay struct {
	// percentage of requests on which the delay will be injected (0-100)
	Percent float32 `protobuf:"fixed32,1,opt,name=percent,proto3" json:"percent,omitempty"`
	// Types that are valid to be assigned to HttpDelayType:
	//	*HTTPFaultInjection_Delay_FixedDelay
	//	*HTTPFaultInjection_Delay_ExponentialDelay
	HttpDelayType isHTTPFaultInjection_Delay_HttpDelayType `protobuf_oneof:"http_delay_type"`
	// (-- Specify delay duration as part of Http request.
	// TODO: The semantics and syntax of the headers is undefined. --)
	OverrideHeaderName   string   `protobuf:"bytes,4,opt,name=override_header_name,json=overrideHeaderName,proto3" json:"override_header_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Delay specification is used to inject latency into the request forwarding path. The following example will introduce a 5 second delay in 10% of the requests to the "v1" version of the "reviews" service.

metadata:
  name: my-rule
spec:
  destination:
    name: reviews
  route:
  - labels:
      version: v1
  httpFault:
    delay:
      percent: 10
      fixedDelay: 5s

The _fixedDelay_ field is used to indicate the amount of delay in seconds. An optional _percent_ field, a value between 0 and 100, can be used to only delay a certain percentage of requests. If left unspecified, all request will be delayed.

func (*HTTPFaultInjection_Delay) Descriptor

func (*HTTPFaultInjection_Delay) Descriptor() ([]byte, []int)

func (*HTTPFaultInjection_Delay) GetExponentialDelay

func (m *HTTPFaultInjection_Delay) GetExponentialDelay() *duration.Duration

func (*HTTPFaultInjection_Delay) GetFixedDelay

func (m *HTTPFaultInjection_Delay) GetFixedDelay() *duration.Duration

func (*HTTPFaultInjection_Delay) GetHttpDelayType

func (m *HTTPFaultInjection_Delay) GetHttpDelayType() isHTTPFaultInjection_Delay_HttpDelayType

func (*HTTPFaultInjection_Delay) GetOverrideHeaderName

func (m *HTTPFaultInjection_Delay) GetOverrideHeaderName() string

func (*HTTPFaultInjection_Delay) GetPercent

func (m *HTTPFaultInjection_Delay) GetPercent() float32

func (*HTTPFaultInjection_Delay) ProtoMessage

func (*HTTPFaultInjection_Delay) ProtoMessage()

func (*HTTPFaultInjection_Delay) Reset

func (m *HTTPFaultInjection_Delay) Reset()

func (*HTTPFaultInjection_Delay) String

func (m *HTTPFaultInjection_Delay) String() string

func (*HTTPFaultInjection_Delay) XXX_DiscardUnknown

func (m *HTTPFaultInjection_Delay) XXX_DiscardUnknown()

func (*HTTPFaultInjection_Delay) XXX_Marshal

func (m *HTTPFaultInjection_Delay) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HTTPFaultInjection_Delay) XXX_Merge

func (dst *HTTPFaultInjection_Delay) XXX_Merge(src proto.Message)

func (*HTTPFaultInjection_Delay) XXX_OneofFuncs

func (*HTTPFaultInjection_Delay) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*HTTPFaultInjection_Delay) XXX_Size

func (m *HTTPFaultInjection_Delay) XXX_Size() int

func (*HTTPFaultInjection_Delay) XXX_Unmarshal

func (m *HTTPFaultInjection_Delay) XXX_Unmarshal(b []byte) error

type HTTPFaultInjection_Delay_ExponentialDelay

type HTTPFaultInjection_Delay_ExponentialDelay struct {
	ExponentialDelay *duration.Duration `protobuf:"bytes,3,opt,name=exponential_delay,json=exponentialDelay,proto3,oneof"`
}

type HTTPFaultInjection_Delay_FixedDelay

type HTTPFaultInjection_Delay_FixedDelay struct {
	FixedDelay *duration.Duration `protobuf:"bytes,2,opt,name=fixed_delay,json=fixedDelay,proto3,oneof"`
}

type HTTPRedirect

type HTTPRedirect struct {
	// On a redirect, overwrite the Path portion of the URL with this
	// value. Note that the entire path will be replaced, irrespective of the
	// request URI being matched as an exact path or prefix.
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	// On a redirect, overwrite the Authority/Host portion of the URL with
	// this value
	Authority            string   `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

HTTPRedirect can be used to send a 302 redirect response to the caller, where the Authority/Host and the URI in the response can be swapped with the specified values. For example, the following route rule redirects requests for /v1/getProductRatings API on the ratings service to /v1/bookRatings provided by the bookratings service.

metadata:
  name: my-rule
  namespace: default
spec:
  destination:
    name: ratings
  match:
    request:
      headers:
        uri: /v1/getProductRatings
  redirect:
    uri: /v1/bookRatings
    authority: bookratings.default.svc.cluster.local

func (*HTTPRedirect) Descriptor

func (*HTTPRedirect) Descriptor() ([]byte, []int)

func (*HTTPRedirect) GetAuthority

func (m *HTTPRedirect) GetAuthority() string

func (*HTTPRedirect) GetUri

func (m *HTTPRedirect) GetUri() string

func (*HTTPRedirect) ProtoMessage

func (*HTTPRedirect) ProtoMessage()

func (*HTTPRedirect) Reset

func (m *HTTPRedirect) Reset()

func (*HTTPRedirect) String

func (m *HTTPRedirect) String() string

func (*HTTPRedirect) XXX_DiscardUnknown

func (m *HTTPRedirect) XXX_DiscardUnknown()

func (*HTTPRedirect) XXX_Marshal

func (m *HTTPRedirect) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HTTPRedirect) XXX_Merge

func (dst *HTTPRedirect) XXX_Merge(src proto.Message)

func (*HTTPRedirect) XXX_Size

func (m *HTTPRedirect) XXX_Size() int

func (*HTTPRedirect) XXX_Unmarshal

func (m *HTTPRedirect) XXX_Unmarshal(b []byte) error

type HTTPRetry

type HTTPRetry struct {
	// Types that are valid to be assigned to RetryPolicy:
	//	*HTTPRetry_SimpleRetry
	//	*HTTPRetry_Custom
	RetryPolicy          isHTTPRetry_RetryPolicy `protobuf_oneof:"retry_policy"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

Describes the retry policy to use when a HTTP request fails. For example, the following rule sets the maximum number of retries to 3 when calling ratings:v1 service, with a 2s timeout per retry attempt.

metadata:
  name: my-rule
  namespace: default
spec:
  destination:
    name: ratings
  route:
  - labels:
      version: v1
  httpReqRetries:
    simpleRetry:
      attempts: 3
      perTryTimeout: 2s

func (*HTTPRetry) Descriptor

func (*HTTPRetry) Descriptor() ([]byte, []int)

func (*HTTPRetry) GetCustom

func (m *HTTPRetry) GetCustom() *any.Any

func (*HTTPRetry) GetRetryPolicy

func (m *HTTPRetry) GetRetryPolicy() isHTTPRetry_RetryPolicy

func (*HTTPRetry) GetSimpleRetry

func (m *HTTPRetry) GetSimpleRetry() *HTTPRetry_SimpleRetryPolicy

func (*HTTPRetry) ProtoMessage

func (*HTTPRetry) ProtoMessage()

func (*HTTPRetry) Reset

func (m *HTTPRetry) Reset()

func (*HTTPRetry) String

func (m *HTTPRetry) String() string

func (*HTTPRetry) XXX_DiscardUnknown

func (m *HTTPRetry) XXX_DiscardUnknown()

func (*HTTPRetry) XXX_Marshal

func (m *HTTPRetry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HTTPRetry) XXX_Merge

func (dst *HTTPRetry) XXX_Merge(src proto.Message)

func (*HTTPRetry) XXX_OneofFuncs

func (*HTTPRetry) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*HTTPRetry) XXX_Size

func (m *HTTPRetry) XXX_Size() int

func (*HTTPRetry) XXX_Unmarshal

func (m *HTTPRetry) XXX_Unmarshal(b []byte) error

type HTTPRetry_Custom

type HTTPRetry_Custom struct {
	Custom *any.Any `protobuf:"bytes,2,opt,name=custom,proto3,oneof"`
}

type HTTPRetry_SimpleRetry

type HTTPRetry_SimpleRetry struct {
	SimpleRetry *HTTPRetry_SimpleRetryPolicy `protobuf:"bytes,1,opt,name=simple_retry,json=simpleRetry,proto3,oneof"`
}

type HTTPRetry_SimpleRetryPolicy

type HTTPRetry_SimpleRetryPolicy struct {
	// REQUIRED. Number of retries for a given request. The interval
	// between retries will be determined automatically (25ms+). Actual
	// number of retries attempted depends on the httpReqTimeout.
	Attempts int32 `protobuf:"varint,1,opt,name=attempts,proto3" json:"attempts,omitempty"`
	// Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms.
	PerTryTimeout *duration.Duration `protobuf:"bytes,2,opt,name=per_try_timeout,json=perTryTimeout,proto3" json:"per_try_timeout,omitempty"`
	// (-- Downstream Service could specify retry attempts via Http header to
	// Envoy, if Envoy supports such a feature. --)
	OverrideHeaderName   string   `protobuf:"bytes,3,opt,name=override_header_name,json=overrideHeaderName,proto3" json:"override_header_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HTTPRetry_SimpleRetryPolicy) Descriptor

func (*HTTPRetry_SimpleRetryPolicy) Descriptor() ([]byte, []int)

func (*HTTPRetry_SimpleRetryPolicy) GetAttempts

func (m *HTTPRetry_SimpleRetryPolicy) GetAttempts() int32

func (*HTTPRetry_SimpleRetryPolicy) GetOverrideHeaderName

func (m *HTTPRetry_SimpleRetryPolicy) GetOverrideHeaderName() string

func (*HTTPRetry_SimpleRetryPolicy) GetPerTryTimeout

func (m *HTTPRetry_SimpleRetryPolicy) GetPerTryTimeout() *duration.Duration

func (*HTTPRetry_SimpleRetryPolicy) ProtoMessage

func (*HTTPRetry_SimpleRetryPolicy) ProtoMessage()

func (*HTTPRetry_SimpleRetryPolicy) Reset

func (m *HTTPRetry_SimpleRetryPolicy) Reset()

func (*HTTPRetry_SimpleRetryPolicy) String

func (m *HTTPRetry_SimpleRetryPolicy) String() string

func (*HTTPRetry_SimpleRetryPolicy) XXX_DiscardUnknown

func (m *HTTPRetry_SimpleRetryPolicy) XXX_DiscardUnknown()

func (*HTTPRetry_SimpleRetryPolicy) XXX_Marshal

func (m *HTTPRetry_SimpleRetryPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HTTPRetry_SimpleRetryPolicy) XXX_Merge

func (dst *HTTPRetry_SimpleRetryPolicy) XXX_Merge(src proto.Message)

func (*HTTPRetry_SimpleRetryPolicy) XXX_Size

func (m *HTTPRetry_SimpleRetryPolicy) XXX_Size() int

func (*HTTPRetry_SimpleRetryPolicy) XXX_Unmarshal

func (m *HTTPRetry_SimpleRetryPolicy) XXX_Unmarshal(b []byte) error

type HTTPRewrite

type HTTPRewrite struct {
	// rewrite the Path (or the prefix) portion of the URI with this
	// value. If the original URI was matched based on prefix, the value
	// provided in this field will replace the corresponding matched prefix.
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	// rewrite the Authority/Host header with this value.
	Authority            string   `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

HTTPRewrite can be used to rewrite specific parts of a HTTP request before forwarding the request to the destination. Rewrite primitive can be used only with the DestinationWeights. The following example demonstrates how to rewrite the URL prefix for api call (/ratings) to ratings service before making the actual API call.

metadata:
  name: my-rule
  namespace: default
spec:
  destination:
    name: ratings
  match:
    request:
      headers:
        uri:
          prefix: /ratings
  rewrite:
    uri: /v1/bookRatings
  route:
  - labels:
      version: v1

func (*HTTPRewrite) Descriptor

func (*HTTPRewrite) Descriptor() ([]byte, []int)

func (*HTTPRewrite) GetAuthority

func (m *HTTPRewrite) GetAuthority() string

func (*HTTPRewrite) GetUri

func (m *HTTPRewrite) GetUri() string

func (*HTTPRewrite) ProtoMessage

func (*HTTPRewrite) ProtoMessage()

func (*HTTPRewrite) Reset

func (m *HTTPRewrite) Reset()

func (*HTTPRewrite) String

func (m *HTTPRewrite) String() string

func (*HTTPRewrite) XXX_DiscardUnknown

func (m *HTTPRewrite) XXX_DiscardUnknown()

func (*HTTPRewrite) XXX_Marshal

func (m *HTTPRewrite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HTTPRewrite) XXX_Merge

func (dst *HTTPRewrite) XXX_Merge(src proto.Message)

func (*HTTPRewrite) XXX_Size

func (m *HTTPRewrite) XXX_Size() int

func (*HTTPRewrite) XXX_Unmarshal

func (m *HTTPRewrite) XXX_Unmarshal(b []byte) error

type HTTPTimeout

type HTTPTimeout struct {
	// Types that are valid to be assigned to TimeoutPolicy:
	//	*HTTPTimeout_SimpleTimeout
	//	*HTTPTimeout_Custom
	TimeoutPolicy        isHTTPTimeout_TimeoutPolicy `protobuf_oneof:"timeout_policy"`
	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
	XXX_unrecognized     []byte                      `json:"-"`
	XXX_sizecache        int32                       `json:"-"`
}

Describes HTTP request timeout. For example, the following rule sets a 10 second timeout for calls to the ratings:v1 service

metadata:
  name: my-rule
  namespace: default
spec:
  destination:
    name: ratings
  route:
  - labels:
      version: v1
  httpReqTimeout:
    simpleTimeout:
      timeout: 10s

func (*HTTPTimeout) Descriptor

func (*HTTPTimeout) Descriptor() ([]byte, []int)

func (*HTTPTimeout) GetCustom

func (m *HTTPTimeout) GetCustom() *any.Any

func (*HTTPTimeout) GetSimpleTimeout

func (m *HTTPTimeout) GetSimpleTimeout() *HTTPTimeout_SimpleTimeoutPolicy

func (*HTTPTimeout) GetTimeoutPolicy

func (m *HTTPTimeout) GetTimeoutPolicy() isHTTPTimeout_TimeoutPolicy

func (*HTTPTimeout) ProtoMessage

func (*HTTPTimeout) ProtoMessage()

func (*HTTPTimeout) Reset

func (m *HTTPTimeout) Reset()

func (*HTTPTimeout) String

func (m *HTTPTimeout) String() string

func (*HTTPTimeout) XXX_DiscardUnknown

func (m *HTTPTimeout) XXX_DiscardUnknown()

func (*HTTPTimeout) XXX_Marshal

func (m *HTTPTimeout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HTTPTimeout) XXX_Merge

func (dst *HTTPTimeout) XXX_Merge(src proto.Message)

func (*HTTPTimeout) XXX_OneofFuncs

func (*HTTPTimeout) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*HTTPTimeout) XXX_Size

func (m *HTTPTimeout) XXX_Size() int

func (*HTTPTimeout) XXX_Unmarshal

func (m *HTTPTimeout) XXX_Unmarshal(b []byte) error

type HTTPTimeout_Custom

type HTTPTimeout_Custom struct {
	Custom *any.Any `protobuf:"bytes,2,opt,name=custom,proto3,oneof"`
}

type HTTPTimeout_SimpleTimeout

type HTTPTimeout_SimpleTimeout struct {
	SimpleTimeout *HTTPTimeout_SimpleTimeoutPolicy `protobuf:"bytes,1,opt,name=simple_timeout,json=simpleTimeout,proto3,oneof"`
}

type HTTPTimeout_SimpleTimeoutPolicy

type HTTPTimeout_SimpleTimeoutPolicy struct {
	// REQUIRED. Timeout for a HTTP request. Includes retries as well.  Default
	// 15s. format: 1h/1m/1s/1ms. MUST BE >=1ms. It is possible to control
	// timeout per request by supplying the timeout value via
	// x-envoy-upstream-rq-timeout-ms HTTP header.
	Timeout *duration.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// (-- Downstream service could specify timeout via Http header to
	// Envoy, if Envoy supports such a feature. --)
	OverrideHeaderName   string   `protobuf:"bytes,2,opt,name=override_header_name,json=overrideHeaderName,proto3" json:"override_header_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HTTPTimeout_SimpleTimeoutPolicy) Descriptor

func (*HTTPTimeout_SimpleTimeoutPolicy) Descriptor() ([]byte, []int)

func (*HTTPTimeout_SimpleTimeoutPolicy) GetOverrideHeaderName

func (m *HTTPTimeout_SimpleTimeoutPolicy) GetOverrideHeaderName() string

func (*HTTPTimeout_SimpleTimeoutPolicy) GetTimeout

func (*HTTPTimeout_SimpleTimeoutPolicy) ProtoMessage

func (*HTTPTimeout_SimpleTimeoutPolicy) ProtoMessage()

func (*HTTPTimeout_SimpleTimeoutPolicy) Reset

func (*HTTPTimeout_SimpleTimeoutPolicy) String

func (*HTTPTimeout_SimpleTimeoutPolicy) XXX_DiscardUnknown

func (m *HTTPTimeout_SimpleTimeoutPolicy) XXX_DiscardUnknown()

func (*HTTPTimeout_SimpleTimeoutPolicy) XXX_Marshal

func (m *HTTPTimeout_SimpleTimeoutPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HTTPTimeout_SimpleTimeoutPolicy) XXX_Merge

func (dst *HTTPTimeout_SimpleTimeoutPolicy) XXX_Merge(src proto.Message)

func (*HTTPTimeout_SimpleTimeoutPolicy) XXX_Size

func (m *HTTPTimeout_SimpleTimeoutPolicy) XXX_Size() int

func (*HTTPTimeout_SimpleTimeoutPolicy) XXX_Unmarshal

func (m *HTTPTimeout_SimpleTimeoutPolicy) XXX_Unmarshal(b []byte) error

type IngressRule

type IngressRule struct {
	// REQUIRED: Port on which the ingress proxy listens and applies the rule.
	Port int32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
	// Optional TLS secret path to apply server-side TLS context on the port.
	// It is up to the underlying secret store to interpret the path to the secret.
	TlsSecret string `protobuf:"bytes,2,opt,name=tls_secret,json=tlsSecret,proto3" json:"tls_secret,omitempty"`
	// RECOMMENDED. Precedence is used to disambiguate the order of application
	// of rules. A higher number takes priority. If not specified, the value is
	// assumed to be 0.  The order of application for rules with the same
	// precedence is unspecified.
	Precedence int32 `protobuf:"varint,3,opt,name=precedence,proto3" json:"precedence,omitempty"`
	// Match conditions to be satisfied for the ingress rule to be
	// activated.
	Match *MatchCondition `protobuf:"bytes,4,opt,name=match,proto3" json:"match,omitempty"`
	// REQUIRED: Destination uniquely identifies the destination service.
	//
	// *Note:* The ingress rule destination specification represents all version
	// of the service and therefore the IstioService's labels field MUST be empty.
	//
	Destination *IstioService `protobuf:"bytes,5,opt,name=destination,proto3" json:"destination,omitempty"`
	// REQUIRED: Destination port identifies a port on the destination service for routing.
	//
	// Types that are valid to be assigned to DestinationServicePort:
	//	*IngressRule_DestinationPort
	//	*IngressRule_DestinationPortName
	DestinationServicePort isIngressRule_DestinationServicePort `protobuf_oneof:"destination_service_port"`
	XXX_NoUnkeyedLiteral   struct{}                             `json:"-"`
	XXX_unrecognized       []byte                               `json:"-"`
	XXX_sizecache          int32                                `json:"-"`
}

Ingress rules are routing rules applied to the ingress proxy pool. The ingress proxes serve as the receiving edge proxy for the entire mesh, but can also be addressed from inside the mesh. Each ingress rule defines a destination service and port. Rules that do not resolve to a service or a port in the mesh should be ignored.

The routing rules for the destination service are applied at the ingress proxy. That means the routing rule match conditions are composed and its actions are enforced. The traffic splitting for the destination service is also effective.

WARNING: This API is experimental and under active development

func (*IngressRule) Descriptor

func (*IngressRule) Descriptor() ([]byte, []int)

func (*IngressRule) GetDestination

func (m *IngressRule) GetDestination() *IstioService

func (*IngressRule) GetDestinationPort

func (m *IngressRule) GetDestinationPort() int32

func (*IngressRule) GetDestinationPortName

func (m *IngressRule) GetDestinationPortName() string

func (*IngressRule) GetDestinationServicePort

func (m *IngressRule) GetDestinationServicePort() isIngressRule_DestinationServicePort

func (*IngressRule) GetMatch

func (m *IngressRule) GetMatch() *MatchCondition

func (*IngressRule) GetPort

func (m *IngressRule) GetPort() int32

func (*IngressRule) GetPrecedence

func (m *IngressRule) GetPrecedence() int32

func (*IngressRule) GetTlsSecret

func (m *IngressRule) GetTlsSecret() string

func (*IngressRule) ProtoMessage

func (*IngressRule) ProtoMessage()

func (*IngressRule) Reset

func (m *IngressRule) Reset()

func (*IngressRule) String

func (m *IngressRule) String() string

func (*IngressRule) XXX_DiscardUnknown

func (m *IngressRule) XXX_DiscardUnknown()

func (*IngressRule) XXX_Marshal

func (m *IngressRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IngressRule) XXX_Merge

func (dst *IngressRule) XXX_Merge(src proto.Message)

func (*IngressRule) XXX_OneofFuncs

func (*IngressRule) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*IngressRule) XXX_Size

func (m *IngressRule) XXX_Size() int

func (*IngressRule) XXX_Unmarshal

func (m *IngressRule) XXX_Unmarshal(b []byte) error

type IngressRule_DestinationPort

type IngressRule_DestinationPort struct {
	DestinationPort int32 `protobuf:"varint,6,opt,name=destination_port,json=destinationPort,proto3,oneof"`
}

type IngressRule_DestinationPortName

type IngressRule_DestinationPortName struct {
	DestinationPortName string `protobuf:"bytes,7,opt,name=destination_port_name,json=destinationPortName,proto3,oneof"`
}

type IstioService

type IstioService struct {
	// The short name of the service such as "foo".
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional namespace of the service. Defaults to value of metadata namespace field.
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// Domain suffix used to construct the service FQDN in implementations that support such specification.
	Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"`
	// The service FQDN.
	Service string `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"`
	// Optional one or more labels that uniquely identify the service version.
	//
	// *Note:* When used for a RouteRule destination, labels MUST be empty.
	//
	Labels               map[string]string `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

IstioService identifies a service and optionally service version. The FQDN of the service is composed from the name, namespace, and implementation-specific domain suffix (e.g. on Kubernetes, "reviews" + "default" + "svc.cluster.local" -> "reviews.default.svc.cluster.local").

func (*IstioService) Descriptor

func (*IstioService) Descriptor() ([]byte, []int)

func (*IstioService) GetDomain

func (m *IstioService) GetDomain() string

func (*IstioService) GetLabels

func (m *IstioService) GetLabels() map[string]string

func (*IstioService) GetName

func (m *IstioService) GetName() string

func (*IstioService) GetNamespace

func (m *IstioService) GetNamespace() string

func (*IstioService) GetService

func (m *IstioService) GetService() string

func (*IstioService) ProtoMessage

func (*IstioService) ProtoMessage()

func (*IstioService) Reset

func (m *IstioService) Reset()

func (*IstioService) String

func (m *IstioService) String() string

func (*IstioService) XXX_DiscardUnknown

func (m *IstioService) XXX_DiscardUnknown()

func (*IstioService) XXX_Marshal

func (m *IstioService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IstioService) XXX_Merge

func (dst *IstioService) XXX_Merge(src proto.Message)

func (*IstioService) XXX_Size

func (m *IstioService) XXX_Size() int

func (*IstioService) XXX_Unmarshal

func (m *IstioService) XXX_Unmarshal(b []byte) error

type L4FaultInjection

type L4FaultInjection struct {
	// Unlike Http services, we have very little context for raw Tcp|Udp
	// connections. We could throttle bandwidth of the connections (slow down
	// the connection) and/or abruptly reset (terminate) the Tcp connection
	// after it has been established.
	// We first throttle (if set) and then terminate the connection.
	Throttle             *L4FaultInjection_Throttle  `protobuf:"bytes,1,opt,name=throttle,proto3" json:"throttle,omitempty"`
	Terminate            *L4FaultInjection_Terminate `protobuf:"bytes,2,opt,name=terminate,proto3" json:"terminate,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
	XXX_unrecognized     []byte                      `json:"-"`
	XXX_sizecache        int32                       `json:"-"`
}

(-- Faults can be injected into the connections from downstream by the Envoy, for testing the failure recovery capabilities of downstream services. Faults include aborting the connection from downstream service, delaying proxying of connection to the destination service, and throttling the bandwidth of the connection (either end). Bandwidth throttling for failure testing should not be confused with the rate limiting policy enforcement provided by the Mixer component. L4 fault injection is not supported at the moment. --)

func (*L4FaultInjection) Descriptor

func (*L4FaultInjection) Descriptor() ([]byte, []int)

func (*L4FaultInjection) GetTerminate

func (m *L4FaultInjection) GetTerminate() *L4FaultInjection_Terminate

func (*L4FaultInjection) GetThrottle

func (m *L4FaultInjection) GetThrottle() *L4FaultInjection_Throttle

func (*L4FaultInjection) ProtoMessage

func (*L4FaultInjection) ProtoMessage()

func (*L4FaultInjection) Reset

func (m *L4FaultInjection) Reset()

func (*L4FaultInjection) String

func (m *L4FaultInjection) String() string

func (*L4FaultInjection) XXX_DiscardUnknown

func (m *L4FaultInjection) XXX_DiscardUnknown()

func (*L4FaultInjection) XXX_Marshal

func (m *L4FaultInjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*L4FaultInjection) XXX_Merge

func (dst *L4FaultInjection) XXX_Merge(src proto.Message)

func (*L4FaultInjection) XXX_Size

func (m *L4FaultInjection) XXX_Size() int

func (*L4FaultInjection) XXX_Unmarshal

func (m *L4FaultInjection) XXX_Unmarshal(b []byte) error

type L4FaultInjection_Terminate

type L4FaultInjection_Terminate struct {
	// percentage of established Tcp connections to be terminated/reset
	Percent float32 `protobuf:"fixed32,1,opt,name=percent,proto3" json:"percent,omitempty"`
	// TODO: see if it makes sense to create a generic Duration type to
	// express time interval related configs.
	TerminateAfterPeriod *duration.Duration `protobuf:"bytes,2,opt,name=terminate_after_period,json=terminateAfterPeriod,proto3" json:"terminate_after_period,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

Abruptly reset (terminate) the Tcp connection after it has been established, emulating remote server crash or link failure.

func (*L4FaultInjection_Terminate) Descriptor

func (*L4FaultInjection_Terminate) Descriptor() ([]byte, []int)

func (*L4FaultInjection_Terminate) GetPercent

func (m *L4FaultInjection_Terminate) GetPercent() float32

func (*L4FaultInjection_Terminate) GetTerminateAfterPeriod

func (m *L4FaultInjection_Terminate) GetTerminateAfterPeriod() *duration.Duration

func (*L4FaultInjection_Terminate) ProtoMessage

func (*L4FaultInjection_Terminate) ProtoMessage()

func (*L4FaultInjection_Terminate) Reset

func (m *L4FaultInjection_Terminate) Reset()

func (*L4FaultInjection_Terminate) String

func (m *L4FaultInjection_Terminate) String() string

func (*L4FaultInjection_Terminate) XXX_DiscardUnknown

func (m *L4FaultInjection_Terminate) XXX_DiscardUnknown()

func (*L4FaultInjection_Terminate) XXX_Marshal

func (m *L4FaultInjection_Terminate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*L4FaultInjection_Terminate) XXX_Merge

func (dst *L4FaultInjection_Terminate) XXX_Merge(src proto.Message)

func (*L4FaultInjection_Terminate) XXX_Size

func (m *L4FaultInjection_Terminate) XXX_Size() int

func (*L4FaultInjection_Terminate) XXX_Unmarshal

func (m *L4FaultInjection_Terminate) XXX_Unmarshal(b []byte) error

type L4FaultInjection_Throttle

type L4FaultInjection_Throttle struct {
	// percentage of connections to throttle.
	Percent float32 `protobuf:"fixed32,1,opt,name=percent,proto3" json:"percent,omitempty"`
	// bandwidth limit in "bits" per second between downstream and Envoy
	DownstreamLimitBps int64 `protobuf:"varint,2,opt,name=downstream_limit_bps,json=downstreamLimitBps,proto3" json:"downstream_limit_bps,omitempty"`
	// bandwidth limits in "bits" per second between Envoy and upstream
	UpstreamLimitBps int64 `protobuf:"varint,3,opt,name=upstream_limit_bps,json=upstreamLimitBps,proto3" json:"upstream_limit_bps,omitempty"`
	// Types that are valid to be assigned to ThrottleAfter:
	//	*L4FaultInjection_Throttle_ThrottleAfterPeriod
	//	*L4FaultInjection_Throttle_ThrottleAfterBytes
	ThrottleAfter isL4FaultInjection_Throttle_ThrottleAfter `protobuf_oneof:"throttle_after"`
	// Stop throttling after the given duration. If not set, the connection
	// will be throttled for its lifetime.
	ThrottleForPeriod    *duration.Duration `protobuf:"bytes,6,opt,name=throttle_for_period,json=throttleForPeriod,proto3" json:"throttle_for_period,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

Bandwidth throttling for Tcp and Udp connections

func (*L4FaultInjection_Throttle) Descriptor

func (*L4FaultInjection_Throttle) Descriptor() ([]byte, []int)

func (*L4FaultInjection_Throttle) GetDownstreamLimitBps

func (m *L4FaultInjection_Throttle) GetDownstreamLimitBps() int64

func (*L4FaultInjection_Throttle) GetPercent

func (m *L4FaultInjection_Throttle) GetPercent() float32

func (*L4FaultInjection_Throttle) GetThrottleAfter

func (m *L4FaultInjection_Throttle) GetThrottleAfter() isL4FaultInjection_Throttle_ThrottleAfter

func (*L4FaultInjection_Throttle) GetThrottleAfterBytes

func (m *L4FaultInjection_Throttle) GetThrottleAfterBytes() float64

func (*L4FaultInjection_Throttle) GetThrottleAfterPeriod

func (m *L4FaultInjection_Throttle) GetThrottleAfterPeriod() *duration.Duration

func (*L4FaultInjection_Throttle) GetThrottleForPeriod

func (m *L4FaultInjection_Throttle) GetThrottleForPeriod() *duration.Duration

func (*L4FaultInjection_Throttle) GetUpstreamLimitBps

func (m *L4FaultInjection_Throttle) GetUpstreamLimitBps() int64

func (*L4FaultInjection_Throttle) ProtoMessage

func (*L4FaultInjection_Throttle) ProtoMessage()

func (*L4FaultInjection_Throttle) Reset

func (m *L4FaultInjection_Throttle) Reset()

func (*L4FaultInjection_Throttle) String

func (m *L4FaultInjection_Throttle) String() string

func (*L4FaultInjection_Throttle) XXX_DiscardUnknown

func (m *L4FaultInjection_Throttle) XXX_DiscardUnknown()

func (*L4FaultInjection_Throttle) XXX_Marshal

func (m *L4FaultInjection_Throttle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*L4FaultInjection_Throttle) XXX_Merge

func (dst *L4FaultInjection_Throttle) XXX_Merge(src proto.Message)

func (*L4FaultInjection_Throttle) XXX_OneofFuncs

func (*L4FaultInjection_Throttle) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*L4FaultInjection_Throttle) XXX_Size

func (m *L4FaultInjection_Throttle) XXX_Size() int

func (*L4FaultInjection_Throttle) XXX_Unmarshal

func (m *L4FaultInjection_Throttle) XXX_Unmarshal(b []byte) error

type L4FaultInjection_Throttle_ThrottleAfterBytes

type L4FaultInjection_Throttle_ThrottleAfterBytes struct {
	ThrottleAfterBytes float64 `protobuf:"fixed64,5,opt,name=throttle_after_bytes,json=throttleAfterBytes,proto3,oneof"`
}

type L4FaultInjection_Throttle_ThrottleAfterPeriod

type L4FaultInjection_Throttle_ThrottleAfterPeriod struct {
	ThrottleAfterPeriod *duration.Duration `protobuf:"bytes,4,opt,name=throttle_after_period,json=throttleAfterPeriod,proto3,oneof"`
}

type L4MatchAttributes

type L4MatchAttributes struct {
	// IPv4 or IPv6 ip address with optional subnet. E.g., a.b.c.d/xx form or
	// just a.b.c.d
	SourceSubnet []string `protobuf:"bytes,1,rep,name=source_subnet,json=sourceSubnet,proto3" json:"source_subnet,omitempty"`
	// IPv4 or IPv6 ip address of destination with optional subnet.
	// E.g., a.b.c.d/xx form or just a.b.c.d. This is only valid when the destination
	// service has several IPs and the application explicitly specifies a particular IP.
	DestinationSubnet    []string `protobuf:"bytes,2,rep,name=destination_subnet,json=destinationSubnet,proto3" json:"destination_subnet,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

(-- L4 connection match attributes. Note that L4 connection matching support is incomplete. --)

func (*L4MatchAttributes) Descriptor

func (*L4MatchAttributes) Descriptor() ([]byte, []int)

func (*L4MatchAttributes) GetDestinationSubnet

func (m *L4MatchAttributes) GetDestinationSubnet() []string

func (*L4MatchAttributes) GetSourceSubnet

func (m *L4MatchAttributes) GetSourceSubnet() []string

func (*L4MatchAttributes) ProtoMessage

func (*L4MatchAttributes) ProtoMessage()

func (*L4MatchAttributes) Reset

func (m *L4MatchAttributes) Reset()

func (*L4MatchAttributes) String

func (m *L4MatchAttributes) String() string

func (*L4MatchAttributes) XXX_DiscardUnknown

func (m *L4MatchAttributes) XXX_DiscardUnknown()

func (*L4MatchAttributes) XXX_Marshal

func (m *L4MatchAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*L4MatchAttributes) XXX_Merge

func (dst *L4MatchAttributes) XXX_Merge(src proto.Message)

func (*L4MatchAttributes) XXX_Size

func (m *L4MatchAttributes) XXX_Size() int

func (*L4MatchAttributes) XXX_Unmarshal

func (m *L4MatchAttributes) XXX_Unmarshal(b []byte) error

type LoadBalancing

type LoadBalancing struct {
	// Types that are valid to be assigned to LbPolicy:
	//	*LoadBalancing_Name
	//	*LoadBalancing_Custom
	LbPolicy             isLoadBalancing_LbPolicy `protobuf_oneof:"lb_policy"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

Load balancing policy to use when forwarding traffic. These policies directly correlate to [load balancer types](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/load_balancing) supported by Envoy. Example,

```yaml metadata:

name: reviews-lb-policy
namespace: default

spec:

destination:
  name: reviews
loadBalancing:
  name: RANDOM

```

func (*LoadBalancing) Descriptor

func (*LoadBalancing) Descriptor() ([]byte, []int)

func (*LoadBalancing) GetCustom

func (m *LoadBalancing) GetCustom() *any.Any

func (*LoadBalancing) GetLbPolicy

func (m *LoadBalancing) GetLbPolicy() isLoadBalancing_LbPolicy

func (*LoadBalancing) GetName

func (*LoadBalancing) ProtoMessage

func (*LoadBalancing) ProtoMessage()

func (*LoadBalancing) Reset

func (m *LoadBalancing) Reset()

func (*LoadBalancing) String

func (m *LoadBalancing) String() string

func (*LoadBalancing) XXX_DiscardUnknown

func (m *LoadBalancing) XXX_DiscardUnknown()

func (*LoadBalancing) XXX_Marshal

func (m *LoadBalancing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LoadBalancing) XXX_Merge

func (dst *LoadBalancing) XXX_Merge(src proto.Message)

func (*LoadBalancing) XXX_OneofFuncs

func (*LoadBalancing) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*LoadBalancing) XXX_Size

func (m *LoadBalancing) XXX_Size() int

func (*LoadBalancing) XXX_Unmarshal

func (m *LoadBalancing) XXX_Unmarshal(b []byte) error

type LoadBalancing_Custom

type LoadBalancing_Custom struct {
	Custom *any.Any `protobuf:"bytes,2,opt,name=custom,proto3,oneof"`
}

type LoadBalancing_Name

type LoadBalancing_Name struct {
	Name LoadBalancing_SimpleLBPolicy `protobuf:"varint,1,opt,name=name,proto3,enum=istio.routing.v1alpha1.LoadBalancing_SimpleLBPolicy,oneof"`
}

type LoadBalancing_SimpleLBPolicy

type LoadBalancing_SimpleLBPolicy int32

Load balancing algorithms supported by Envoy.

const (
	// Simple round robin policy.
	LoadBalancing_ROUND_ROBIN LoadBalancing_SimpleLBPolicy = 0
	// The least request load balancer uses an O(1) algorithm which selects
	// two random healthy hosts and picks the host which has fewer active
	// requests.
	LoadBalancing_LEAST_CONN LoadBalancing_SimpleLBPolicy = 1
	// The random load balancer selects a random healthy host. The random
	// load balancer generally performs better than round robin if no health
	// checking policy is configured.
	LoadBalancing_RANDOM LoadBalancing_SimpleLBPolicy = 2
)

func (LoadBalancing_SimpleLBPolicy) EnumDescriptor

func (LoadBalancing_SimpleLBPolicy) EnumDescriptor() ([]byte, []int)

func (LoadBalancing_SimpleLBPolicy) String

type MatchCondition

type MatchCondition struct {
	// Identifies the service initiating a connection or a request.
	Source *IstioService `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	// (-- Set of layer 4 match conditions based on the IP ranges --)
	Tcp *L4MatchAttributes `protobuf:"bytes,2,opt,name=tcp,proto3" json:"tcp,omitempty"`
	// (-- Set of layer 4 match conditions based on the IP ranges --)
	Udp *L4MatchAttributes `protobuf:"bytes,3,opt,name=udp,proto3" json:"udp,omitempty"`
	// Attributes of an HTTP request to match.
	Request              *MatchRequest `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

Match condition specifies a set of criterion to be met in order for the route rule to be applied to the connection or HTTP request. The condition provides distinct set of conditions for each protocol with the intention that conditions apply only to the service ports that match the protocol. For example, the following route rule restricts the rule to match only requests originating from "reviews:v2", accessing ratings service where the URL path starts with /ratings/v2/ and the request contains a "cookie" with value "user=jason",

metadata:
  name: my-rule
  namespace: default
spec:
  destination:
    name: ratings
  match:
    source:
      name: reviews
      labels:
        version: v2
    request:
      headers:
        cookie:
          regex: "^(.*?;)?(user=jason)(;.*)?"
        uri:
          prefix: "/ratings/v2/"

MatchCondition CANNOT be empty. At least one source or request header must be specified.

func (*MatchCondition) Descriptor

func (*MatchCondition) Descriptor() ([]byte, []int)

func (*MatchCondition) GetRequest

func (m *MatchCondition) GetRequest() *MatchRequest

func (*MatchCondition) GetSource

func (m *MatchCondition) GetSource() *IstioService

func (*MatchCondition) GetTcp

func (m *MatchCondition) GetTcp() *L4MatchAttributes

func (*MatchCondition) GetUdp

func (m *MatchCondition) GetUdp() *L4MatchAttributes

func (*MatchCondition) ProtoMessage

func (*MatchCondition) ProtoMessage()

func (*MatchCondition) Reset

func (m *MatchCondition) Reset()

func (*MatchCondition) String

func (m *MatchCondition) String() string

func (*MatchCondition) XXX_DiscardUnknown

func (m *MatchCondition) XXX_DiscardUnknown()

func (*MatchCondition) XXX_Marshal

func (m *MatchCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MatchCondition) XXX_Merge

func (dst *MatchCondition) XXX_Merge(src proto.Message)

func (*MatchCondition) XXX_Size

func (m *MatchCondition) XXX_Size() int

func (*MatchCondition) XXX_Unmarshal

func (m *MatchCondition) XXX_Unmarshal(b []byte) error

type MatchRequest

type MatchRequest struct {
	// Set of HTTP match conditions based on HTTP/1.1, HTTP/2, GRPC request
	// metadata, such as _uri_, _scheme_, _authority_.  The header keys must be
	// lowercase and use hyphen as the separator, e.g. _x-request-id_.
	//
	// Header values are case-sensitive and formatted as follows:
	//
	// *exact: "value"* or just *"value"* for exact string match
	//
	// *prefix: "value"* for prefix-based match
	//
	// *regex: "value"* for ECMAscript style regex-based match
	//
	// *Note 1:* The keys _uri_, _scheme_, _method_, and _authority_ correspond
	// to URI, protocol scheme (e.g., HTTP, HTTPS), HTTP method
	// (e.g., GET, POST), and the HTTP Host header respectively.
	//
	// *Note 2:* _uri_ can be used to perform URL matches.
	// For all HTTP headers including _uri_, exact, prefix and ECMA style
	// regular expression matches are supported.
	Headers              map[string]*StringMatch `` /* 155-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

MatchRequest specifies the attributes of an HTTP request to be used for matching a request.

func (*MatchRequest) Descriptor

func (*MatchRequest) Descriptor() ([]byte, []int)

func (*MatchRequest) GetHeaders

func (m *MatchRequest) GetHeaders() map[string]*StringMatch

func (*MatchRequest) ProtoMessage

func (*MatchRequest) ProtoMessage()

func (*MatchRequest) Reset

func (m *MatchRequest) Reset()

func (*MatchRequest) String

func (m *MatchRequest) String() string

func (*MatchRequest) XXX_DiscardUnknown

func (m *MatchRequest) XXX_DiscardUnknown()

func (*MatchRequest) XXX_Marshal

func (m *MatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MatchRequest) XXX_Merge

func (dst *MatchRequest) XXX_Merge(src proto.Message)

func (*MatchRequest) XXX_Size

func (m *MatchRequest) XXX_Size() int

func (*MatchRequest) XXX_Unmarshal

func (m *MatchRequest) XXX_Unmarshal(b []byte) error

type RouteRule

type RouteRule struct {
	// REQUIRED: Destination uniquely identifies the destination associated
	// with this routing rule. This field is applicable for hostname-based
	// resolution for HTTP traffic as well as IP-based resolution for
	// TCP/UDP traffic.
	//
	// *Note:* The route rule destination specification represents all version
	// of the service and therefore the IstioService's labels field MUST be empty.
	//
	Destination *IstioService `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
	// RECOMMENDED. Precedence is used to disambiguate the order of
	// application of rules for the same destination service. A higher number
	// takes priority. If not specified, the value is assumed to be 0.  The
	// order of application for rules with the same precedence is
	// unspecified.
	Precedence int32 `protobuf:"varint,2,opt,name=precedence,proto3" json:"precedence,omitempty"`
	// Match condtions to be satisfied for the route rule to be
	// activated. If match is omitted, the route rule applies only to HTTP
	// traffic.
	Match *MatchCondition `protobuf:"bytes,3,opt,name=match,proto3" json:"match,omitempty"`
	// REQUIRED (route|redirect). A routing rule can either redirect traffic or
	// forward traffic. The forwarding target can be one of several versions
	// of a service (see glossary in beginning of document). Weights
	// associated with the service version determine the proportion of
	// traffic it receives.
	Route []*DestinationWeight `protobuf:"bytes,4,rep,name=route,proto3" json:"route,omitempty"`
	// REQUIRED (route|redirect). A routing rule can either redirect traffic or
	// forward traffic. The redirect primitive can be used to send a HTTP 302
	// redirect to a different URI or Authority.
	Redirect *HTTPRedirect `protobuf:"bytes,5,opt,name=redirect,proto3" json:"redirect,omitempty"`
	// Rewrite HTTP URIs and Authority headers. Rewrite cannot be used with
	// Redirect primitive. Rewrite will be performed before forwarding.
	Rewrite *HTTPRewrite `protobuf:"bytes,6,opt,name=rewrite,proto3" json:"rewrite,omitempty"`
	// Indicates that a HTTP/1.1 client connection to this particular route
	// should be allowed (and expected) to upgrade to a WebSocket connection.
	// The default is false. Envoy expects the first request to this route
	// to contain the WebSocket upgrade headers. Otherwise, the request
	// will be rejected.
	WebsocketUpgrade bool `protobuf:"varint,7,opt,name=websocket_upgrade,json=websocketUpgrade,proto3" json:"websocket_upgrade,omitempty"`
	// Timeout policy for HTTP requests.
	HttpReqTimeout *HTTPTimeout `protobuf:"bytes,8,opt,name=http_req_timeout,json=httpReqTimeout,proto3" json:"http_req_timeout,omitempty"`
	// Retry policy for HTTP requests.
	HttpReqRetries *HTTPRetry `protobuf:"bytes,9,opt,name=http_req_retries,json=httpReqRetries,proto3" json:"http_req_retries,omitempty"`
	// Fault injection policy to apply on HTTP traffic
	HttpFault *HTTPFaultInjection `protobuf:"bytes,10,opt,name=http_fault,json=httpFault,proto3" json:"http_fault,omitempty"`
	// (-- L4 fault injection policy applies to Tcp/Udp (not HTTP) traffic --)
	L4Fault *L4FaultInjection `protobuf:"bytes,11,opt,name=l4_fault,json=l4Fault,proto3" json:"l4_fault,omitempty"`
	// Mirror HTTP traffic to a another destination in addition to forwarding
	// the requests to the intended destination. Mirrored traffic is on best
	// effort basis where Envoy will not wait for the mirrored cluster to
	// respond before returning the response from the original destination.
	// Statistics will be generated for the mirrored destination.
	Mirror *IstioService `protobuf:"bytes,12,opt,name=mirror,proto3" json:"mirror,omitempty"`
	// Cross-Origin Resource Sharing policy (CORS). Refer to
	// https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS for
	// further details about cross origin resource sharing.
	CorsPolicy *CorsPolicy `protobuf:"bytes,13,opt,name=cors_policy,json=corsPolicy,proto3" json:"cors_policy,omitempty"`
	// Additional HTTP headers to add before forwarding a request to the
	// destnation service.
	AppendHeaders        map[string]string `` /* 189-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Route rule provides a custom routing policy based on the source and destination service versions and connection/request metadata. The rule must provide a set of conditions for each protocol (TCP, UDP, HTTP) that the destination service exposes on its ports.

The rule applies only to the ports on the destination service for which it provides protocol-specific match condition, e.g. if the rule does not specify TCP condition, the rule does not apply to TCP traffic towards the destination service.

For example, a simple rule to send 100% of incoming traffic for a "reviews" service to version "v1" can be specified as follows:

metadata:
  name: my-rule
  namespace: default # optional (default is "default")
spec:
  destination:
    name: reviews
    namespace: my-namespace # optional (default is metadata namespace field)
  route:
  - labels:
      version: v1
    weight: 100

func (*RouteRule) Descriptor

func (*RouteRule) Descriptor() ([]byte, []int)

func (*RouteRule) GetAppendHeaders

func (m *RouteRule) GetAppendHeaders() map[string]string

func (*RouteRule) GetCorsPolicy

func (m *RouteRule) GetCorsPolicy() *CorsPolicy

func (*RouteRule) GetDestination

func (m *RouteRule) GetDestination() *IstioService

func (*RouteRule) GetHttpFault

func (m *RouteRule) GetHttpFault() *HTTPFaultInjection

func (*RouteRule) GetHttpReqRetries

func (m *RouteRule) GetHttpReqRetries() *HTTPRetry

func (*RouteRule) GetHttpReqTimeout

func (m *RouteRule) GetHttpReqTimeout() *HTTPTimeout

func (*RouteRule) GetL4Fault

func (m *RouteRule) GetL4Fault() *L4FaultInjection

func (*RouteRule) GetMatch

func (m *RouteRule) GetMatch() *MatchCondition

func (*RouteRule) GetMirror

func (m *RouteRule) GetMirror() *IstioService

func (*RouteRule) GetPrecedence

func (m *RouteRule) GetPrecedence() int32

func (*RouteRule) GetRedirect

func (m *RouteRule) GetRedirect() *HTTPRedirect

func (*RouteRule) GetRewrite

func (m *RouteRule) GetRewrite() *HTTPRewrite

func (*RouteRule) GetRoute

func (m *RouteRule) GetRoute() []*DestinationWeight

func (*RouteRule) GetWebsocketUpgrade

func (m *RouteRule) GetWebsocketUpgrade() bool

func (*RouteRule) ProtoMessage

func (*RouteRule) ProtoMessage()

func (*RouteRule) Reset

func (m *RouteRule) Reset()

func (*RouteRule) String

func (m *RouteRule) String() string

func (*RouteRule) XXX_DiscardUnknown

func (m *RouteRule) XXX_DiscardUnknown()

func (*RouteRule) XXX_Marshal

func (m *RouteRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RouteRule) XXX_Merge

func (dst *RouteRule) XXX_Merge(src proto.Message)

func (*RouteRule) XXX_Size

func (m *RouteRule) XXX_Size() int

func (*RouteRule) XXX_Unmarshal

func (m *RouteRule) XXX_Unmarshal(b []byte) error

type StringMatch

type StringMatch struct {
	// Types that are valid to be assigned to MatchType:
	//	*StringMatch_Exact
	//	*StringMatch_Prefix
	//	*StringMatch_Regex
	MatchType            isStringMatch_MatchType `protobuf_oneof:"match_type"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

Describes how to match a given string in HTTP headers. Match is case-sensitive.

func (*StringMatch) Descriptor

func (*StringMatch) Descriptor() ([]byte, []int)

func (*StringMatch) GetExact

func (m *StringMatch) GetExact() string

func (*StringMatch) GetMatchType

func (m *StringMatch) GetMatchType() isStringMatch_MatchType

func (*StringMatch) GetPrefix

func (m *StringMatch) GetPrefix() string

func (*StringMatch) GetRegex

func (m *StringMatch) GetRegex() string

func (*StringMatch) ProtoMessage

func (*StringMatch) ProtoMessage()

func (*StringMatch) Reset

func (m *StringMatch) Reset()

func (*StringMatch) String

func (m *StringMatch) String() string

func (*StringMatch) XXX_DiscardUnknown

func (m *StringMatch) XXX_DiscardUnknown()

func (*StringMatch) XXX_Marshal

func (m *StringMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StringMatch) XXX_Merge

func (dst *StringMatch) XXX_Merge(src proto.Message)

func (*StringMatch) XXX_OneofFuncs

func (*StringMatch) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*StringMatch) XXX_Size

func (m *StringMatch) XXX_Size() int

func (*StringMatch) XXX_Unmarshal

func (m *StringMatch) XXX_Unmarshal(b []byte) error

type StringMatch_Exact

type StringMatch_Exact struct {
	Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"`
}

type StringMatch_Prefix

type StringMatch_Prefix struct {
	Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"`
}

type StringMatch_Regex

type StringMatch_Regex struct {
	Regex string `protobuf:"bytes,3,opt,name=regex,proto3,oneof"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL