istio.io/_docs/reference/api/proxy-config.md

34 KiB

title overview order layout type
Proxy Configuration Schema Generated documentation for the Istio Proxy's Configuration Schema 60 docs markdown

Package istio.proxy.v1alpha.config

Index

CircuitBreaker

Circuit breaker configuration.

Field Type Description
simple_cb SimpleCircuitBreakerPolicy (oneof )
custom Any (oneof ) For proxies that support custom circuit breaker policies.

SimpleCircuitBreakerPolicy

Field Type Description
max_connections int32 Maximum number of connections to a backend.
http_max_pending_requests int32 Maximum number of pending requests to a backend.
http_max_requests int32 Maximum number of requests to a backend.
sleep_window_seconds double Minimum time the circuit will be closed. In floating point seconds format.
http_consecutive_errors int32 Number of 5XX errors before circuit is opened.
http_detection_interval_seconds double Interval for checking state of hystrix circuit.
http_max_requests_per_connection int32 Maximum number of requests per connection to a backend.
http_max_ejection_percent int32 Maximum % of hosts in the destination service that can be ejected due to circuit breaking. Defaults to 10%.

DestinationPolicy

DestinationPolicy declares policies that determine how to handle traffic for a destination service (load balancing policies, failure recovery policies such as timeouts, retries, circuit breakers, etc). Policies are applicable per individual service versions. ONLY ONE policy can be defined per service version. / Note that these policies are enforced on client-side connections or requests, i.e., enforced when the service is opening a connection/sending a request via the proxy to the destination.

Field Type Description
destination string REQUIRED. Service name for which the service version is defined. The value MUST be a fully-qualified domain name, e.g. "my-service.default.svc.cluster.local".
tags repeated map<string, string> Service version destination identifier for the destination service. The identifier is qualified by the destination service name, e.g. version "env=prod" in "my-service.default.svc.cluster.local". 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)
load_balancing LoadBalancing Load balancing policy
circuit_breaker CircuitBreaker Circuit breaker policy
custom Any Other custom policy implementations

DestinationWeight

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.

Field Type Description
destination string Destination uniquely identifies the destination service. If not specified, the value is inherited from the parent route rule. Value must be in fully qualified domain name format (e.g., "my-service.default.svc.cluster.local").
tags repeated map<string, string> 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)
weight int32 The proportion of traffic to be forwarded to the service version. Max is 100. Sum of weights across destinations should add up to 100. If there is only destination in a rule, the weight value is assumed to be 100.

HTTPFaultInjection

Faults can be injected into the API calls by the proxy, for testing the failure recovery capabilities of downstream services. Faults include aborting the Http request from downstream service, delaying the proxying of requests, or both. MUST specify either delay or abort or both.

Field Type Description
delay Delay Delay requests before forwarding, emulating various failures such as network issues, overloaded upstream service, etc.
abort Abort Abort Http request attempts and return error codes back to downstream service, giving the impression that the upstream service is faulty. N.B. Both delay and abort can be specified simultaneously. Delay and Abort are independent of one another. For e.g., if Delay is restricted to 5% of requests while Abort is restricted to 10% of requests, the 10% in abort specification applies to all requests directed to the service. It may be the case that one or more requests being aborted were also delayed.

Abort

Abort Http request attempts and return error codes back to downstream service.

Field Type Description
percent float percentage of requests to be aborted with the error code provided.
override_header_name string Specify abort code as part of Http request.
grpc_status string (oneof )
http2_error string (oneof )
http_status int32 (oneof )

Delay

MUST specify either a fixed delay or exponential delay. Exponential delay is unsupported at the moment.

Field Type Description
percent float percentage of requests on which the delay will be injected
override_header_name string Specify delay duration as part of Http request.
fixed_delay_seconds double (oneof ) Add a fixed delay before forwarding the request. Delay duration in seconds.nanoseconds
exponential_delay_seconds double (oneof ) Add a delay (based on an exponential function) before forwarding the request. mean delay needed to derive the exponential delay values

HTTPRetry

Retry policy to use when a request fails.

Field Type Description
simple_retry SimpleRetryPolicy (oneof )
custom Any (oneof ) For proxies that support custom retry policies

SimpleRetryPolicy

Field Type Description
attempts int32 Number of retries for a given request. The interval between retries will be determined automatically (25ms+). Actual number of retries attempted depends on the http_timeout
per_try_timeout_seconds double Timeout per retry attempt for a given request. Specified in seconds.nanoseconds format.
override_header_name string Downstream Service could specify retry attempts via Http header to the proxy, if the proxy supports such a feature.

HTTPTimeout

Request timeout: wait time until a response is received. Does not indicate the time for the entire response to arrive.

Field Type Description
simple_timeout SimpleTimeoutPolicy (oneof )
custom Any (oneof ) For proxies that support custom timeout policies

SimpleTimeoutPolicy

Field Type Description
timeout_seconds double Timeout for a HTTP request. Includes retries as well. Unit is in floating point seconds. Default 15 seconds. Specified in seconds.nanoseconds format
override_header_name string Downstream service could specify timeout via Http header to the proxy, if the proxy supports such a feature.

L4FaultInjection

/@exclude Faults can be injected into the connections from downstream by the proxy, for testing the failure recovery capabilities of downstream services. Faults include aborting the connection from downstream service, delaying the 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. 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.

Field Type Description
throttle Throttle We first throttle (if set) and then terminate the connection.
terminate Terminate

Terminate

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

Field Type Description
percent float percentage of established Tcp connections to be terminated/reset
terminate_after_seconds double

Throttle

Bandwidth throttling for Tcp and Udp connections

Field Type Description
percent float percentage of connections to throttle.
downstream_limit_bps int64 bandwidth limit in "bits" per second between downstream and proxy
upstream_limit_bps int64 bandwidth limits in "bits" per second between proxy and upstream
throttle_for_seconds DoubleValue Stop throttling after the given duration. If not set, the connection will be throttled for its lifetime.
throttle_after_seconds double (oneof ) Wait for X seconds after the connection is established, before starting bandwidth throttling. This would allow us to inject fault after the application protocol (e.g., MySQL) has had time to establish sessions/whatever handshake necessary.
throttle_after_bytes double (oneof ) Alternatively, we could wait for a certain number of bytes to be transferred to upstream before throttling the bandwidth.

L4MatchAttributes

L4 connection match attributes. Note that L4 connection matching support is incomplete.

Field Type Description
source_subnet[] repeated string IPv4 or IPv6 ip address with optional subnet. E.g., a.b.c.d/xx form or just a.b.c.d
destination_subnet[] repeated string 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.

LoadBalancing

Load balancing policy to use when forwarding traffic.

Field Type Description
name SimpleLBPolicy (oneof )
custom Any (oneof ) /Custom LB policy implementations

SimpleLBPolicy

Common load balancing policies supported in Istio service mesh.

Value Description
ROUND_ROBIN
LEAST_CONN
RANDOM Envoy has IP_HASH, but requires a HTTP header name to hash on

MatchCondition

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.

Field Type Description
source string Identifies the service initiating a connection or a request by its name. If specified, name MUST BE a fully qualified domain name such as foo.bar.com
source_tags repeated map<string, string> Identifies the source service version. The identifier is interpreted by the platform to match a service version for the source 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)
tcp L4MatchAttributes Set of layer 4 match conditions based on the IP ranges. INCOMPLETE implementation
udp L4MatchAttributes Set of layer 4 match conditions based on the IP ranges
http_headers repeated map<string, StringMatch> Set of HTTP match conditions based on HTTP/1.1, HTTP/2, GRPC request metadata, such as "uri", "scheme", "authority". The header keys are case-insensitive.

ProxyMeshConfig

ProxyMeshConfig defines variables shared by all proxies in the Istio service mesh.

Field Type Description
egress_proxy_address string Address of the egress proxy service (e.g. "istio-egress:80")
discovery_address string Address of the discovery service exposing SDS, CDS, RDS (e.g. "manager:8080")
mixer_address string Address of the mixer service (e.g. "mixer:9090")
proxy_listen_port int32 Port opened by the proxy for the traffic capture
proxy_admin_port int32 Port opened by the proxy for the administrative interface
drain_duration Duration Duration of the grace period to drain connections from the parent proxy instance
parent_shutdown_duration Duration Duration to wait before shutting down the parent proxy instance
istio_service_cluster string IstioServiceCluster defines the name for the service_cluster that is shared by all proxy instances. Since Istio does not assign a local service/service version to each proxy instance, the name is same for all of them. This setting corresponds to "--service-cluster" flag in Envoy. The value for "--service-node" is used by the proxy to identify its set of local instances to RDS for source-based routing. For example, if proxy sends its IP address, the RDS can compute routes that are relative to the service instances located at that IP address.
discovery_refresh_delay Duration Delay between polling requests to the discovery service
connect_timeout Duration Connection timeout used by the Envoy clusters
ingress_class string Class of ingress resources to be processed by Istio ingress controller. This corresponds to the value of "kubernetes.io/ingress.class" annotation.
ingress_controller_mode IngressControllerMode Defines whether to use Istio ingress proxy for annotated or all ingress resources
auth_policy AuthPolicy Authentication policy defines the global switch to control authentication for proxy-to-proxy communication
auth_certs_path string Path to the secrets used by the authentication policy

AuthPolicy

Value Description
NONE
MUTUAL_TLS Proxy to proxy traffic is wrapped into mutual TLS connections

IngressControllerMode

Value Description
OFF Disables Ingress controller.
DEFAULT Ingress resources are applied if annotated with the configured ingress class, or not annotated with an ingress class at all. This mode is suitable for a controller running as the cluster's default ingress controller, which is expected to also process ingress resources not annotated at all.
STRICT Ingress resources are applied only if annotated with the configured ingress class. This mode is suitable for a controller which is a running as a secondary ingress controller (e.g., in addition to a cloud-provided ingress controller).

RouteRule

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.

Field Type Description
destination string 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. The value MUST be a fully-qualified domain name, e.g. "my-service.default.svc.cluster.local".
precedence int32 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.
match MatchCondition Optional match condtions to be satisfied for the route rule to be activated. If match is omitted, the route rule applies only to HTTP traffic.
route[] repeated DestinationWeight Each routing rule is associated with one or more service version destinations (see glossary in beginning of document). Weights associated with the service version determine the proportion of traffic it receives.
http_req_timeout HTTPTimeout Timeout policy for HTTP requests.
http_req_retries HTTPRetry Retry policy for HTTP requests.
http_fault HTTPFaultInjection /L7 fault injection policy applies to Http traffic
l4_fault L4FaultInjection /@exclude L4 fault injection policy applies to Tcp/Udp (not Http) traffic

StringMatch

Describes how to matches a given string (exact match, prefix-based match or posix style regex based match). Match is case-sensitive. NOTE: use of regex depends on the specific proxy implementation.

Field Type Description
exact string (oneof )
prefix string (oneof )
regex string (oneof )