v1alpha1

package
v0.0.0-...-3388c6e Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 is a generated protocol buffer package.

It is generated from these files:

routing/v1alpha1/dest_policy.proto
routing/v1alpha1/egress_rule.proto
routing/v1alpha1/http_fault.proto
routing/v1alpha1/ingress_rule.proto
routing/v1alpha1/l4_fault.proto
routing/v1alpha1/route_rule.proto

It has these top-level messages:

DestinationPolicy
LoadBalancing
CircuitBreaker
EgressRule
HTTPFaultInjection
IngressRule
L4FaultInjection
RouteRule
IstioService
MatchCondition
MatchRequest
DestinationWeight
L4MatchAttributes
HTTPRedirect
HTTPRewrite
StringMatch
HTTPTimeout
HTTPRetry
CorsPolicy

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"`
}

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() *google_protobuf.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_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.

type CircuitBreaker_Custom

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

type CircuitBreaker_SimpleCb

type CircuitBreaker_SimpleCb struct {
	SimpleCb *CircuitBreaker_SimpleCircuitBreakerPolicy `protobuf:"bytes,1,opt,name=simple_cb,json=simpleCb,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" json:"max_connections,omitempty"`
	// Maximum number of pending requests to a backend. Default 1024
	HttpMaxPendingRequests int32 `protobuf:"varint,2,opt,name=http_max_pending_requests,json=httpMaxPendingRequests" json:"http_max_pending_requests,omitempty"`
	// Maximum number of requests to a backend. Default 1024
	HttpMaxRequests int32 `protobuf:"varint,3,opt,name=http_max_requests,json=httpMaxRequests" json:"http_max_requests,omitempty"`
	// Minimum time the circuit will be open. format: 1h/1m/1s/1ms. MUST
	// BE >=1ms. Default is 30s.
	SleepWindow *google_protobuf1.Duration `protobuf:"bytes,4,opt,name=sleep_window,json=sleepWindow" json:"sleep_window,omitempty"`
	// Number of 5XX errors before circuit is opened. Defaults to 5.
	HttpConsecutiveErrors int32 `protobuf:"varint,5,opt,name=http_consecutive_errors,json=httpConsecutiveErrors" json:"http_consecutive_errors,omitempty"`
	// Time interval between ejection sweep analysis. format:
	// 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
	HttpDetectionInterval *google_protobuf1.Duration `protobuf:"bytes,6,opt,name=http_detection_interval,json=httpDetectionInterval" json:"http_detection_interval,omitempty"`
	// Maximum number of requests per connection to a backend. Setting this
	// parameter to 1 disables keep alive.
	HttpMaxRequestsPerConnection int32 `` /* 145-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 `protobuf:"varint,8,opt,name=http_max_ejection_percent,json=httpMaxEjectionPercent" json:"http_max_ejection_percent,omitempty"`
	// 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" json:"http_max_retries,omitempty"`
}

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.

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.

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 (*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

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" 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" 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" 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" 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 *google_protobuf1.Duration `protobuf:"bytes,5,opt,name=max_age,json=maxAge" 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 *google_protobuf2.BoolValue `protobuf:"bytes,6,opt,name=allow_credentials,json=allowCredentials" json:"allow_credentials,omitempty"`
}

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() *google_protobuf2.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() *google_protobuf1.Duration

func (*CorsPolicy) ProtoMessage

func (*CorsPolicy) ProtoMessage()

func (*CorsPolicy) Reset

func (m *CorsPolicy) Reset()

func (*CorsPolicy) String

func (m *CorsPolicy) String() string

type DestinationPolicy

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

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() *google_protobuf.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

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" 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 `` /* 132-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" json:"weight,omitempty"`
}

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

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" json:"destination,omitempty"`
	// REQUIRED: list of ports on which the external service is available.
	Ports []*EgressRule_Port `protobuf:"bytes,2,rep,name=ports" 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" json:"use_egress_proxy,omitempty"`
}

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

type EgressRule_Port

type EgressRule_Port struct {
	// A valid non-negative integer port number.
	Port int32 `protobuf:"varint,1,opt,name=port" 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" json:"protocol,omitempty"`
}

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

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" 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" json:"abort,omitempty"`
}

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

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" 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" json:"override_header_name,omitempty"`
}

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_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.

type HTTPFaultInjection_Abort_GrpcStatus

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

type HTTPFaultInjection_Abort_Http2Error

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

type HTTPFaultInjection_Abort_HttpStatus

type HTTPFaultInjection_Abort_HttpStatus struct {
	HttpStatus int32 `protobuf:"varint,4,opt,name=http_status,json=httpStatus,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" 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" json:"override_header_name,omitempty"`
}

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() *google_protobuf1.Duration

func (*HTTPFaultInjection_Delay) GetFixedDelay

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_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.

type HTTPFaultInjection_Delay_ExponentialDelay

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

type HTTPFaultInjection_Delay_FixedDelay

type HTTPFaultInjection_Delay_FixedDelay struct {
	FixedDelay *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=fixed_delay,json=fixedDelay,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" 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" json:"authority,omitempty"`
}

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

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"`
}

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() *google_protobuf.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_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.

type HTTPRetry_Custom

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

type HTTPRetry_SimpleRetry

type HTTPRetry_SimpleRetry struct {
	SimpleRetry *HTTPRetry_SimpleRetryPolicy `protobuf:"bytes,1,opt,name=simple_retry,json=simpleRetry,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" json:"attempts,omitempty"`
	// Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms.
	PerTryTimeout *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=per_try_timeout,json=perTryTimeout" 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" json:"override_header_name,omitempty"`
}

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() *google_protobuf1.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

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" json:"uri,omitempty"`
	// rewrite the Authority/Host header with this value.
	Authority string `protobuf:"bytes,2,opt,name=authority" json:"authority,omitempty"`
}

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

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"`
}

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() *google_protobuf.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_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.

type HTTPTimeout_Custom

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

type HTTPTimeout_SimpleTimeout

type HTTPTimeout_SimpleTimeout struct {
	SimpleTimeout *HTTPTimeout_SimpleTimeoutPolicy `protobuf:"bytes,1,opt,name=simple_timeout,json=simpleTimeout,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 *google_protobuf1.Duration `protobuf:"bytes,1,opt,name=timeout" 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" json:"override_header_name,omitempty"`
}

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

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" 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" 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" json:"precedence,omitempty"`
	// Match conditions to be satisfied for the ingress rule to be
	// activated.
	Match *MatchCondition `protobuf:"bytes,4,opt,name=match" 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" 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"`
}

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_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.

type IngressRule_DestinationPort

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

type IngressRule_DestinationPortName

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

type IstioService

type IstioService struct {
	// The short name of the service such as "foo".
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// Optional namespace of the service. Defaults to value of metadata namespace field.
	Namespace string `protobuf:"bytes,2,opt,name=namespace" 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" json:"domain,omitempty"`
	// The service FQDN.
	Service string `protobuf:"bytes,4,opt,name=service" 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 `` /* 132-byte string literal not displayed */
}

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

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" json:"throttle,omitempty"`
	Terminate *L4FaultInjection_Terminate `protobuf:"bytes,2,opt,name=terminate" json:"terminate,omitempty"`
}

(-- 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

type L4FaultInjection_Terminate

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

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() *google_protobuf1.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

type L4FaultInjection_Throttle

type L4FaultInjection_Throttle struct {
	// percentage of connections to throttle.
	Percent float32 `protobuf:"fixed32,1,opt,name=percent" 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" 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" 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 *google_protobuf1.Duration `protobuf:"bytes,6,opt,name=throttle_for_period,json=throttleForPeriod" json:"throttle_for_period,omitempty"`
}

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() *google_protobuf1.Duration

func (*L4FaultInjection_Throttle) GetThrottleForPeriod

func (m *L4FaultInjection_Throttle) GetThrottleForPeriod() *google_protobuf1.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_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.

type L4FaultInjection_Throttle_ThrottleAfterBytes

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

type L4FaultInjection_Throttle_ThrottleAfterPeriod

type L4FaultInjection_Throttle_ThrottleAfterPeriod struct {
	ThrottleAfterPeriod *google_protobuf1.Duration `protobuf:"bytes,4,opt,name=throttle_after_period,json=throttleAfterPeriod,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" 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" json:"destination_subnet,omitempty"`
}

(-- 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

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"`
}

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,

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() *google_protobuf.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_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.

type LoadBalancing_Custom

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

type LoadBalancing_Name

type LoadBalancing_Name struct {
	Name LoadBalancing_SimpleLBPolicy `protobuf:"varint,1,opt,name=name,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" json:"source,omitempty"`
	// (-- Set of layer 4 match conditions based on the IP ranges --)
	Tcp *L4MatchAttributes `protobuf:"bytes,2,opt,name=tcp" json:"tcp,omitempty"`
	// (-- Set of layer 4 match conditions based on the IP ranges --)
	Udp *L4MatchAttributes `protobuf:"bytes,3,opt,name=udp" json:"udp,omitempty"`
	// Attributes of an HTTP request to match.
	Request *MatchRequest `protobuf:"bytes,4,opt,name=request" json:"request,omitempty"`
}

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

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 `` /* 134-byte string literal not displayed */
}

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

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" 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" 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" 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" 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" 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" 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" json:"websocket_upgrade,omitempty"`
	// Timeout policy for HTTP requests.
	HttpReqTimeout *HTTPTimeout `protobuf:"bytes,8,opt,name=http_req_timeout,json=httpReqTimeout" json:"http_req_timeout,omitempty"`
	// Retry policy for HTTP requests.
	HttpReqRetries *HTTPRetry `protobuf:"bytes,9,opt,name=http_req_retries,json=httpReqRetries" json:"http_req_retries,omitempty"`
	// Fault injection policy to apply on HTTP traffic
	HttpFault *HTTPFaultInjection `protobuf:"bytes,10,opt,name=http_fault,json=httpFault" 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" 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" 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" json:"cors_policy,omitempty"`
	// Additional HTTP headers to add before forwarding a request to the
	// destnation service.
	AppendHeaders map[string]string `` /* 168-byte string literal not displayed */
}

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

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"`
}

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_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.

type StringMatch_Exact

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

type StringMatch_Prefix

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

type StringMatch_Regex

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

Jump to

Keyboard shortcuts

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