v1alpha3

package
Version: 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: 5 Imported by: 0

Documentation

Overview

Package v1alpha3 is a generated protocol buffer package.

It is generated from these files:

networking/v1alpha3/destination_rule.proto
networking/v1alpha3/external_service.proto
networking/v1alpha3/gateway.proto
networking/v1alpha3/virtual_service.proto

It has these top-level messages:

DestinationRule
TrafficPolicy
Subset
LoadBalancerSettings
ConnectionPoolSettings
OutlierDetection
TLSSettings
ExternalService
Gateway
Server
Port
VirtualService
Destination
HTTPRoute
TCPRoute
HTTPMatchRequest
DestinationWeight
L4MatchAttributes
HTTPRedirect
HTTPRewrite
StringMatch
HTTPRetry
CorsPolicy
HTTPFaultInjection
PortSelector

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDestinationRule = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDestinationRule   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthExternalService = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowExternalService   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthGateway = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGateway   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthVirtualService = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowVirtualService   = fmt.Errorf("proto: integer overflow")
)
View Source
var ExternalService_Discovery_name = map[int32]string{
	0: "NONE",
	1: "STATIC",
	2: "DNS",
}
View Source
var ExternalService_Discovery_value = map[string]int32{
	"NONE":   0,
	"STATIC": 1,
	"DNS":    2,
}
View Source
var LoadBalancerSettings_SimpleLB_name = map[int32]string{
	0: "ROUND_ROBIN",
	1: "LEAST_CONN",
	2: "RANDOM",
	3: "PASSTHROUGH",
}
View Source
var LoadBalancerSettings_SimpleLB_value = map[string]int32{
	"ROUND_ROBIN": 0,
	"LEAST_CONN":  1,
	"RANDOM":      2,
	"PASSTHROUGH": 3,
}
View Source
var Server_TLSOptions_TLSmode_name = map[int32]string{
	0: "PASSTHROUGH",
	1: "SIMPLE",
	2: "MUTUAL",
}
View Source
var Server_TLSOptions_TLSmode_value = map[string]int32{
	"PASSTHROUGH": 0,
	"SIMPLE":      1,
	"MUTUAL":      2,
}
View Source
var TLSSettings_TLSmode_name = map[int32]string{
	0: "DISABLE",
	1: "SIMPLE",
	2: "MUTUAL",
}
View Source
var TLSSettings_TLSmode_value = map[string]int32{
	"DISABLE": 0,
	"SIMPLE":  1,
	"MUTUAL":  2,
}

Functions

This section is empty.

Types

type ConnectionPoolSettings

type ConnectionPoolSettings struct {
	// Settings common to both HTTP and TCP upstream connections.
	Tcp *ConnectionPoolSettings_TCPSettings `protobuf:"bytes,1,opt,name=tcp" json:"tcp,omitempty"`
	// HTTP connection pool settings.
	Http *ConnectionPoolSettings_HTTPSettings `protobuf:"bytes,2,opt,name=http" json:"http,omitempty"`
}

Connection pool settings for an upstream host. The settings apply to each individual host in the upstream service. See Envoy's [circuit breaker](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/circuit_breaking) for more details. Connection pool settings can be applied at the TCP level as well as at HTTP level.

For example, the following rule sets a limit of 100 connections to redis service called myredissrv with a connect timeout of 30ms

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: bookinfo-redis
spec:
  host: myredissrv
  trafficPolicy:
    connectionPool:
      tcp:
        maxConnections: 100
        connectTimeout: 30ms

func (*ConnectionPoolSettings) Descriptor

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

func (*ConnectionPoolSettings) GetHttp

func (*ConnectionPoolSettings) GetTcp

func (*ConnectionPoolSettings) Marshal

func (m *ConnectionPoolSettings) Marshal() (dAtA []byte, err error)

func (*ConnectionPoolSettings) MarshalTo

func (m *ConnectionPoolSettings) MarshalTo(dAtA []byte) (int, error)

func (*ConnectionPoolSettings) ProtoMessage

func (*ConnectionPoolSettings) ProtoMessage()

func (*ConnectionPoolSettings) Reset

func (m *ConnectionPoolSettings) Reset()

func (*ConnectionPoolSettings) Size

func (m *ConnectionPoolSettings) Size() (n int)

func (*ConnectionPoolSettings) String

func (m *ConnectionPoolSettings) String() string

func (*ConnectionPoolSettings) Unmarshal

func (m *ConnectionPoolSettings) Unmarshal(dAtA []byte) error

type ConnectionPoolSettings_HTTPSettings

type ConnectionPoolSettings_HTTPSettings struct {
	// Maximum number of pending HTTP requests to a destination. Default 1024.
	Http1MaxPendingRequests int32 `` /* 135-byte string literal not displayed */
	// Maximum number of requests to a backend. Default 1024.
	Http2MaxRequests int32 `protobuf:"varint,2,opt,name=http2_max_requests,json=http2MaxRequests,proto3" json:"http2_max_requests,omitempty"`
	// Maximum number of requests per connection to a backend. Setting this
	// parameter to 1 disables keep alive.
	MaxRequestsPerConnection int32 `` /* 138-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.
	MaxRetries int32 `protobuf:"varint,4,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"`
}

Settings applicable to HTTP1.1/HTTP2/GRPC connections.

func (*ConnectionPoolSettings_HTTPSettings) Descriptor

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

func (*ConnectionPoolSettings_HTTPSettings) GetHttp1MaxPendingRequests

func (m *ConnectionPoolSettings_HTTPSettings) GetHttp1MaxPendingRequests() int32

func (*ConnectionPoolSettings_HTTPSettings) GetHttp2MaxRequests

func (m *ConnectionPoolSettings_HTTPSettings) GetHttp2MaxRequests() int32

func (*ConnectionPoolSettings_HTTPSettings) GetMaxRequestsPerConnection

func (m *ConnectionPoolSettings_HTTPSettings) GetMaxRequestsPerConnection() int32

func (*ConnectionPoolSettings_HTTPSettings) GetMaxRetries

func (m *ConnectionPoolSettings_HTTPSettings) GetMaxRetries() int32

func (*ConnectionPoolSettings_HTTPSettings) Marshal

func (m *ConnectionPoolSettings_HTTPSettings) Marshal() (dAtA []byte, err error)

func (*ConnectionPoolSettings_HTTPSettings) MarshalTo

func (m *ConnectionPoolSettings_HTTPSettings) MarshalTo(dAtA []byte) (int, error)

func (*ConnectionPoolSettings_HTTPSettings) ProtoMessage

func (*ConnectionPoolSettings_HTTPSettings) ProtoMessage()

func (*ConnectionPoolSettings_HTTPSettings) Reset

func (*ConnectionPoolSettings_HTTPSettings) Size

func (*ConnectionPoolSettings_HTTPSettings) String

func (*ConnectionPoolSettings_HTTPSettings) Unmarshal

func (m *ConnectionPoolSettings_HTTPSettings) Unmarshal(dAtA []byte) error

type ConnectionPoolSettings_TCPSettings

type ConnectionPoolSettings_TCPSettings struct {
	// Maximum number of HTTP1 /TCP connections to a destination host.
	MaxConnections int32 `protobuf:"varint,1,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"`
	// TCP connection timeout.
	ConnectTimeout *google_protobuf.Duration `protobuf:"bytes,2,opt,name=connect_timeout,json=connectTimeout" json:"connect_timeout,omitempty"`
}

Settings common to both HTTP and TCP upstream connections.

func (*ConnectionPoolSettings_TCPSettings) Descriptor

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

func (*ConnectionPoolSettings_TCPSettings) GetConnectTimeout

func (*ConnectionPoolSettings_TCPSettings) GetMaxConnections

func (m *ConnectionPoolSettings_TCPSettings) GetMaxConnections() int32

func (*ConnectionPoolSettings_TCPSettings) Marshal

func (m *ConnectionPoolSettings_TCPSettings) Marshal() (dAtA []byte, err error)

func (*ConnectionPoolSettings_TCPSettings) MarshalTo

func (m *ConnectionPoolSettings_TCPSettings) MarshalTo(dAtA []byte) (int, error)

func (*ConnectionPoolSettings_TCPSettings) ProtoMessage

func (*ConnectionPoolSettings_TCPSettings) ProtoMessage()

func (*ConnectionPoolSettings_TCPSettings) Reset

func (*ConnectionPoolSettings_TCPSettings) Size

func (*ConnectionPoolSettings_TCPSettings) String

func (*ConnectionPoolSettings_TCPSettings) Unmarshal

func (m *ConnectionPoolSettings_TCPSettings) Unmarshal(dAtA []byte) error

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_protobuf.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_protobuf1.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.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: ratings-route
spec:
  hosts:
  - ratings
  http:
  - route:
    - destination:
        host: ratings
        subset: 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_protobuf1.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_protobuf.Duration

func (*CorsPolicy) Marshal

func (m *CorsPolicy) Marshal() (dAtA []byte, err error)

func (*CorsPolicy) MarshalTo

func (m *CorsPolicy) MarshalTo(dAtA []byte) (int, error)

func (*CorsPolicy) ProtoMessage

func (*CorsPolicy) ProtoMessage()

func (*CorsPolicy) Reset

func (m *CorsPolicy) Reset()

func (*CorsPolicy) Size

func (m *CorsPolicy) Size() (n int)

func (*CorsPolicy) String

func (m *CorsPolicy) String() string

func (*CorsPolicy) Unmarshal

func (m *CorsPolicy) Unmarshal(dAtA []byte) error

type Destination

type Destination struct {
	// REQUIRED. The host can be a short name or a fully qualified domain
	// name from the service registry, a resolvable DNS name, or an IP
	// address.
	//
	// If short names are used, the FQDN of the service will be resolved in a
	// platform specific manner. For example in Kubernetes, when a route with a
	// short name "reviews" in the destination in namespace "bookinfo" is applied,
	// the final destination is resolved to reviews.bookinfo.svc.cluster.local. The
	// sidecar will route to the IP
	// addresses of the pods constituting the service. However, if the lookup
	// fails, "reviews" is treated as an external service, such that the sidecar
	// will dynamically resolve the DNS of the service name and route the request
	// to the IP addresses returned by the DNS.
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// The name of a subset within the service. Applicable only to services
	// within the mesh. The subset must be defined in a corresponding
	// DestinationRule.
	Subset string `protobuf:"bytes,2,opt,name=subset,proto3" json:"subset,omitempty"`
	// Specifies the port on the destination. Many services only expose a
	// single port or label ports with the protocols they support, in these
	// cases it is not required to explicitly select the port. Note that
	// selection priority is to first match by name and then match by number.
	//
	// Names must comply with DNS label syntax (rfc1035) and therefore cannot
	// collide with numbers. If there are multiple ports on a service with
	// the same protocol the names should be of the form <protocol-name>-<DNS
	// label>.
	Port *PortSelector `protobuf:"bytes,3,opt,name=port" json:"port,omitempty"`
	// DEPRECATED: Use `host` instead. Adding `name` back to prevent backward incompatibility with existing code inside
	// istio.io/istio.
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
}

Destination indicates the network addressable service to which the request/connection will be sent after processing a routing rule. The destination.name should unambiguously refer to a service in the service registry. It can be a short name or a fully qualified domain name from the service registry, a resolvable DNS name, an IP address or a service name from the service registry and a subset name. The order of inference is as follows:

1. Service registry lookup. The entire name is looked up in the service registry. If the lookup succeeds, the search terminates. The requests will be routed to any instance of the service in the mesh. When the service name consists of a single word, the FQDN will be constructed in a platform specific manner. For example, in Kubernetes, the namespace associated with the routing rule will be used to identify the service as <servicename>.<rulenamespace>. However, if the service name contains multiple words separated by a dot (e.g., reviews.prod), the name in its entirety would be looked up in the service registry.

2. Runtime DNS lookup by the proxy. If step 1 fails, and the name is not an IP address, it will be considered as a DNS name that is not in the service registry (e.g., wikipedia.org). The sidecar/gateway will resolve the DNS and load balance requests appropriately. See Envoy's strict_dns for details.

The following example routes all traffic by default to pods of the reviews service with label "version: v1" (i.e., subset v1), and some to subset v2, in a kubernetes environment.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: reviews-route
spec:
  hosts:
  - reviews # namespace is same as the client/caller's namespace
  http:
  - match:
    - uri:
        prefix: "/wpcatalog"
    - uri:
        prefix: "/consumercatalog"
    rewrite:
      uri: "/newcatalog"
    route:
    - destination:
        host: reviews
        subset: v2
  - route:
    - destination:
        host: reviews
        subset: v1

And the associated DestinationRule

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: reviews-destination
spec:
  host: reviews
  subsets:
  - name: v1
    labels:
      version: v1
  - name: v2
    labels:
      version: v2

The following VirtualService sets a timeout of 5s for all calls to productpage.prod service. Notice that there are no subsets defined in this rule. Istio will fetch all instances of productpage.prod service from the service registry and populate the sidecar's load balancing pool.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: my-productpage-rule
spec:
  hosts:
  - productpage.prod # in kubernetes, this applies only to prod namespace
  http:
  - timeout: 5s
    route:
    - destination:
        host: productpage.prod

The following sets a timeout of 5s for all calls to the external service wikipedia.org, as there is no internal service of that name.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: my-wiki-rule
spec:
  hosts:
  - wikipedia.org
  http:
  - timeout: 5s
    route:
    - destination:
        host: wikipedia.org

func (*Destination) Descriptor

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

func (*Destination) GetHost

func (m *Destination) GetHost() string

func (*Destination) GetName

func (m *Destination) GetName() string

func (*Destination) GetPort

func (m *Destination) GetPort() *PortSelector

func (*Destination) GetSubset

func (m *Destination) GetSubset() string

func (*Destination) Marshal

func (m *Destination) Marshal() (dAtA []byte, err error)

func (*Destination) MarshalTo

func (m *Destination) MarshalTo(dAtA []byte) (int, error)

func (*Destination) ProtoMessage

func (*Destination) ProtoMessage()

func (*Destination) Reset

func (m *Destination) Reset()

func (*Destination) Size

func (m *Destination) Size() (n int)

func (*Destination) String

func (m *Destination) String() string

func (*Destination) Unmarshal

func (m *Destination) Unmarshal(dAtA []byte) error

type DestinationRule

type DestinationRule struct {
	// REQUIRED. The destination address for traffic captured by this
	// rule.  Could be a DNS name with wildcard prefix or a CIDR
	// prefix. Depending on the platform, short-names can also be used
	// instead of a FQDN (i.e. has no dots in the name). In such a scenario,
	// the FQDN of the host would be derived based on the underlying
	// platform.
	//
	// For example on Kubernetes, when host contains a short name, Istio will
	// interpret the short name based on the namespace of the rule.  Thus, when a
	// client applies a rule in the "default" namespace, containing a name
	// "reviews", Istio will setup routes to the
	// "reviews.default.svc.cluster.local" service. However, if a different name
	// such as "reviews.sales" is used, it would be treated as a FQDN during
	// virtual host matching.  In Consul, a plain service name would be resolved to
	// the FQDN "reviews.service.consul".
	//
	// Note that the host field applies to both HTTP and TCP
	// services. Service inside the mesh, i.e. those found in the service
	// registry, must always be referred to using their alphanumeric
	// names. IP addresses or CIDR prefixes are allowed only for services
	// defined via the Gateway.
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// Traffic policies to apply (load balancing policy, connection pool
	// sizes, outlier detection).
	TrafficPolicy *TrafficPolicy `protobuf:"bytes,2,opt,name=traffic_policy,json=trafficPolicy" json:"traffic_policy,omitempty"`
	// One or more named sets that represent individual versions of a
	// service. Traffic policies can be overridden at subset level.
	Subsets []*Subset `protobuf:"bytes,3,rep,name=subsets" json:"subsets,omitempty"`
	// DEPRECATED: Use `host` instead. Adding `name` back to prevent backward incompatibility with existing code inside
	// istio.io/istio.
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
}

DestinationRule defines policies that apply to traffic intended for a service after routing has occurred. These rules specify configuration for load balancing, connection pool size from the sidecar, and outlier detection settings to detect and evict unhealthy hosts from the load balancing pool. For example, a simple load balancing policy for the ratings service would look as follows:

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: bookinfo-ratings
spec:
  host: ratings
  trafficPolicy:
    loadBalancer:
      simple: LEAST_CONN

Version specific policies can be specified by defining a named subset and overriding the settings specified at the service level. The following rule uses a round robin load balancing policy for all traffic going to a subset named testversion that is composed of endpoints (e.g., pods) with labels (version:v3).

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: bookinfo-ratings
spec:
  host: ratings
  trafficPolicy:
    loadBalancer:
      simple: LEAST_CONN
  subsets:
  - name: testversion
    labels:
      version: v3
    trafficPolicy:
      loadBalancer:
        simple: ROUND_ROBIN

Note that policies specified for subsets will not take effect until a route rule explicitly sends traffic to this subset.

func (*DestinationRule) Descriptor

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

func (*DestinationRule) GetHost

func (m *DestinationRule) GetHost() string

func (*DestinationRule) GetName

func (m *DestinationRule) GetName() string

func (*DestinationRule) GetSubsets

func (m *DestinationRule) GetSubsets() []*Subset

func (*DestinationRule) GetTrafficPolicy

func (m *DestinationRule) GetTrafficPolicy() *TrafficPolicy

func (*DestinationRule) Marshal

func (m *DestinationRule) Marshal() (dAtA []byte, err error)

func (*DestinationRule) MarshalTo

func (m *DestinationRule) MarshalTo(dAtA []byte) (int, error)

func (*DestinationRule) ProtoMessage

func (*DestinationRule) ProtoMessage()

func (*DestinationRule) Reset

func (m *DestinationRule) Reset()

func (*DestinationRule) Size

func (m *DestinationRule) Size() (n int)

func (*DestinationRule) String

func (m *DestinationRule) String() string

func (*DestinationRule) Unmarshal

func (m *DestinationRule) Unmarshal(dAtA []byte) error

type DestinationWeight

type DestinationWeight struct {
	// REQUIRED. Destination uniquely identifies the instances of a service
	// to which the request/connection should be forwarded to.
	Destination *Destination `protobuf:"bytes,1,opt,name=destination" json:"destination,omitempty"`
	// 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.
	Weight int32 `protobuf:"varint,2,opt,name=weight,proto3" 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".

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: reviews-route
spec:
  hosts:
  - reviews
  http:
  - route:
    - destination:
        host: reviews
        subset: v2
      weight: 25
    - destination:
        host: reviews
        subset: v1
      weight: 75

And the associated DestinationRule

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: reviews-destination
spec:
  host: reviews
  subsets:
  - name: v1
    labels:
      version: v1
  - name: v2
    labels:
      version: v2

func (*DestinationWeight) Descriptor

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

func (*DestinationWeight) GetDestination

func (m *DestinationWeight) GetDestination() *Destination

func (*DestinationWeight) GetWeight

func (m *DestinationWeight) GetWeight() int32

func (*DestinationWeight) Marshal

func (m *DestinationWeight) Marshal() (dAtA []byte, err error)

func (*DestinationWeight) MarshalTo

func (m *DestinationWeight) MarshalTo(dAtA []byte) (int, error)

func (*DestinationWeight) ProtoMessage

func (*DestinationWeight) ProtoMessage()

func (*DestinationWeight) Reset

func (m *DestinationWeight) Reset()

func (*DestinationWeight) Size

func (m *DestinationWeight) Size() (n int)

func (*DestinationWeight) String

func (m *DestinationWeight) String() string

func (*DestinationWeight) Unmarshal

func (m *DestinationWeight) Unmarshal(dAtA []byte) error

type ExternalService

type ExternalService struct {
	// REQUIRED. The hosts associated with the external service. Could be a
	// DNS name with wildcard prefix or a CIDR prefix. Note that the hosts
	// field applies to all protocols. DNS names in hosts will be ignored if
	// the application accesses the service over non-HTTP protocols such as
	// mongo/opaque TCP/even HTTPS. In such scenarios, the port on which the
	// external service is being accessed must not be shared by any other
	// service in the mesh. In other words, the sidecar will behave as a
	// simple TCP proxy, forwarding incoming traffic on a specified port to
	// the specified destination endpoint IP/host.
	Hosts []string `protobuf:"bytes,1,rep,name=hosts" json:"hosts,omitempty"`
	// REQUIRED. The ports associated with the external service.
	Ports []*Port `protobuf:"bytes,2,rep,name=ports" json:"ports,omitempty"`
	// Service discovery mode for the hosts. If not set, Istio will attempt
	// to infer the discovery mode based on the value of hosts and endpoints.
	Discovery ExternalService_Discovery `` /* 129-byte string literal not displayed */
	// One or more endpoints associated with the service. Endpoints must be
	// accessible over the set of outPorts defined at the service level.
	Endpoints []*ExternalService_Endpoint `protobuf:"bytes,4,rep,name=endpoints" json:"endpoints,omitempty"`
}

External service describes the endpoints, ports and protocols of a white-listed set of mesh-external domains and IP blocks that services in the mesh are allowed to access.

For example, the following external service configuration describes the set of services at https://example.com to be accessed internally over plaintext http (i.e. http://example.com:443), with the sidecar originating TLS.

apiVersion: networking.istio.io/v1alpha3
kind: ExternalService
metadata:
  name: external-svc-example
spec:
  hosts:
  - example.com
  ports:
  - number: 443
    name: example-http
    protocol: HTTP # not HTTPS.
  discovery: DNS

and a destination rule to initiate TLS connections to the external service.

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: tls-example
spec:
  name: example.com
  trafficPolicy:
    tls:
      mode: SIMPLE # initiates HTTPS when talking to example.com

The following specification specifies a static set of backend nodes for a MongoDB cluster behind a set of virtual IPs, and sets up a destination rule to initiate mTLS connections upstream.

apiVersion: networking.istio.io/v1alpha3
kind: ExternalService
metadata:
  name: external-svc-mongocluster
spec:
  hosts:
  - 192.192.192.192/24
  ports:
  - number: 27018
    name: mongodb
    protocol: MONGO
  discovery: STATIC
  endpoints:
  - address: 2.2.2.2
  - address: 3.3.3.3

and the associated destination rule

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: mtls-mongocluster
spec:
  name: 192.192.192.192/24
  trafficPolicy:
    tls:
      mode: MUTUAL
      clientCertificate: /etc/certs/myclientcert.pem
      privateKey: /etc/certs/client_private_key.pem
      caCertificates: /etc/certs/rootcacerts.pem

The following example demonstrates the use of wildcards in the hosts. If the connection has to be routed to the IP address requested by the application (i.e. application resolves DNS and attempts to connect to a specific IP), the discovery mode must be set to "none".

apiVersion: networking.istio.io/v1alpha3
kind: ExternalService
metadata:
  name: external-svc-wildcard-example
spec:
  hosts:
  - "*.bar.com"
  ports:
  - number: 80
    name: http
    protocol: HTTP
  discovery: NONE

For HTTP based services, it is possible to create a virtual service backed by multiple DNS addressible endpoints. In such a scenario, the application can use the HTTP_PROXY environment variable to transparently reroute API calls for the virtual service to a chosen backend. For example, the following configuration creates a non-existent service called foo.bar.com backed by three domains: us.foo.bar.com:8443, uk.foo.bar.com:9443, and in.foo.bar.com:7443

apiVersion: networking.istio.io/v1alpha3
kind: ExternalService
metadata:
  name: external-svc-dns
spec:
  hosts:
  - foo.bar.com
  ports:
  - number: 443
    name: https
    protocol: HTTP
  discovery: DNS
  endpoints:
  - address: us.foo.bar.com
    ports:
      https: 8443
  - address: uk.foo.bar.com
    ports:
      https: 9443
  - address: in.foo.bar.com
    ports:
      https: 7443

and a destination rule to initiate TLS connections to the external service.

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: tls-foobar
spec:
  name: foo.bar.com
  trafficPolicy:
    tls:
      mode: SIMPLE # initiates HTTPS

With HTTP_PROXY=http://localhost:443, calls from the application to http://foo.bar.com will be upgraded to HTTPS and load balanced across the three domains specified above. In other words, a call to http://foo.bar.com/baz would be translated to https://uk.foo.bar.com/baz.

NOTE: In the scenario above, the value of the HTTP Authority/host header associated with the outbound HTTP requests will be based on the endpoint's DNS name, i.e. ":authority: uk.foo.bar.com". Refer to Envoy's auto_host_rewrite for further details. The automatic rewrite can be overridden using a host rewrite route rule.

func (*ExternalService) Descriptor

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

func (*ExternalService) GetDiscovery

func (m *ExternalService) GetDiscovery() ExternalService_Discovery

func (*ExternalService) GetEndpoints

func (m *ExternalService) GetEndpoints() []*ExternalService_Endpoint

func (*ExternalService) GetHosts

func (m *ExternalService) GetHosts() []string

func (*ExternalService) GetPorts

func (m *ExternalService) GetPorts() []*Port

func (*ExternalService) Marshal

func (m *ExternalService) Marshal() (dAtA []byte, err error)

func (*ExternalService) MarshalTo

func (m *ExternalService) MarshalTo(dAtA []byte) (int, error)

func (*ExternalService) ProtoMessage

func (*ExternalService) ProtoMessage()

func (*ExternalService) Reset

func (m *ExternalService) Reset()

func (*ExternalService) Size

func (m *ExternalService) Size() (n int)

func (*ExternalService) String

func (m *ExternalService) String() string

func (*ExternalService) Unmarshal

func (m *ExternalService) Unmarshal(dAtA []byte) error

type ExternalService_Discovery

type ExternalService_Discovery int32

Different ways of discovering the IP addresses associated with the service.

const (
	// If set to "NONE", the proxy will assume that incoming connections
	// have already been resolved (to a specific destination IP
	// address). Such connections are typically routed via the proxy using
	// mechanisms such as IP table REDIRECT/ eBPF. After performing any
	// routing related transformations, the proxy will forward the
	// connection to the IP address to which the connection was bound.
	ExternalService_NONE ExternalService_Discovery = 0
	// If set to "STATIC", the proxy will use the IP addresses specified in
	// endpoints (See below) as the backing nodes associated with the
	// external service.
	ExternalService_STATIC ExternalService_Discovery = 1
	// If set to "DNS", the proxy will attempt to resolve the DNS address
	// during request processing. If no endpoints are specified, the proxy
	// will resolve the DNS address specified in the hosts field, if
	// wildcards are not used. If endpoints are specified, the DNS
	// addresses specified in the endpoints will be resolved to determine
	// the destination IP address.
	ExternalService_DNS ExternalService_Discovery = 2
)

func (ExternalService_Discovery) EnumDescriptor

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

func (ExternalService_Discovery) String

func (x ExternalService_Discovery) String() string

type ExternalService_Endpoint

type ExternalService_Endpoint struct {
	// REQUIRED: Address associated with the network endpoint without the
	// port ( IP or fully qualified domain name without wildcards).
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Set of ports associated with the endpoint. The ports must be
	// associated with a port name that was declared as part of the
	// service.
	Ports map[string]uint32 `` /* 145-byte string literal not displayed */
	// One or more labels associated with the endpoint.
	Labels map[string]string `` /* 146-byte string literal not displayed */
}

Endpoint defines a network address (IP or hostname) associated with the external service.

func (*ExternalService_Endpoint) Descriptor

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

func (*ExternalService_Endpoint) GetAddress

func (m *ExternalService_Endpoint) GetAddress() string

func (*ExternalService_Endpoint) GetLabels

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

func (*ExternalService_Endpoint) GetPorts

func (m *ExternalService_Endpoint) GetPorts() map[string]uint32

func (*ExternalService_Endpoint) Marshal

func (m *ExternalService_Endpoint) Marshal() (dAtA []byte, err error)

func (*ExternalService_Endpoint) MarshalTo

func (m *ExternalService_Endpoint) MarshalTo(dAtA []byte) (int, error)

func (*ExternalService_Endpoint) ProtoMessage

func (*ExternalService_Endpoint) ProtoMessage()

func (*ExternalService_Endpoint) Reset

func (m *ExternalService_Endpoint) Reset()

func (*ExternalService_Endpoint) Size

func (m *ExternalService_Endpoint) Size() (n int)

func (*ExternalService_Endpoint) String

func (m *ExternalService_Endpoint) String() string

func (*ExternalService_Endpoint) Unmarshal

func (m *ExternalService_Endpoint) Unmarshal(dAtA []byte) error

type Gateway

type Gateway struct {
	// REQUIRED: A list of server specifications.
	Servers []*Server `protobuf:"bytes,1,rep,name=servers" json:"servers,omitempty"`
	// One or more labels that indicate a specific set of pods/VMs
	// on which this gateway configuration should be applied.
	// If no selectors are provided, the gateway will be implemented by
	// the default istio-ingress controller.
	Selector map[string]string `` /* 150-byte string literal not displayed */
}

Gateway describes a load balancer operating at the edge of the mesh receiving incoming or outgoing HTTP/TCP connections. The specification describes a set of ports that should be exposed, the type of protocol to use, SNI configuration for the load balancer, etc.

For example, the following gateway spec sets up a proxy to act as a load balancer exposing port 80 and 9080 (http), 443 (https), and port 2379 (TCP) for ingress. The gateway will be applied to the proxy running on a pod with labels "app: my-gateway-controller". While Istio will configure the proxy to listen on these ports, it is the responsibility of the user to ensure that external traffic to these ports are allowed into the mesh.

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: my-gateway
spec:
  selector:
    app: my-gatweway-controller
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - uk.bookinfo.com
    - eu.bookinfo.com
    tls:
      httpsRedirect: true # sends 302 redirect for http requests
  - port:
      number: 443
      name: https
      protocol: HTTPS
    hosts:
    - uk.bookinfo.com
    - eu.bookinfo.com
    tls:
      mode: SIMPLE #enables HTTPS on this port
      serverCertificate: /etc/certs/servercert.pem
      privateKey: /etc/certs/privatekey.pem
  - port:
      number: 9080
      name: http-wildcard
      protocol: HTTP
    # no hosts implies wildcard match
  - port:
      number: 2379 #to expose internal service via external port 2379
      name: mongo
      protocol: MONGO

The gateway specification above describes the L4-L6 properties of a load balancer. A VirtualService can then be bound to a gateway to control the forwarding of traffic arriving at a particular host or gateway port.

For example, the following VirtualService splits traffic for https://uk.bookinfo.com/reviews, https://eu.bookinfo.com/reviews, http://uk.bookinfo.com:9080/reviews, http://eu.bookinfo.com:9080/reviews into two versions (prod and qa) of an internal reviews service on port 9080. In addition, requests containing the cookie user: dev-123 will be sent to special port 7777 in the qa version. The same rule is also applicable inside the mesh for requests to the reviews.prod service. This rule is applicable across ports 443, 9080. Note that http://uk.bookinfo.com gets redirected to https://uk.bookinfo.com (i.e. 80 redirects to 443).

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: bookinfo-rule
spec:
  hosts:
  - reviews.prod
  - uk.bookinfo.com
  - eu.bookinfo.com
  gateways:
  - my-gateway
  - mesh # applies to all the sidecars in the mesh
  http:
  - match:
    - headers:
        cookie:
          user: dev-123
    route:
    - destination:
        port:
          number: 7777
        name: reviews.qa
  - match:
      uri:
        prefix: /reviews/
    route:
    - destination:
        port:
          number: 9080 # can be omitted if its the only port for reviews
        name: reviews.prod
      weight: 80
    - destination:
        name: reviews.qa
      weight: 20

The following VirtualService forwards traffic arriving at (external) port 2379 from 172.17.16.0/24 subnet to internal Mongo server on port 5555. This rule is not applicable internally in the mesh as the gateway list omits the reserved name "mesh".

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: bookinfo-Mongo
spec:
  hosts:
  - mongosvr #name of Mongo service
  gateways:
  - my-gateway
  tcp:
  - match:
    - port:
        number: 2379
      sourceSubnet: "172.17.16.0/24"
    route:
    - destination:
        name: mongo.prod

func (*Gateway) Descriptor

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

func (*Gateway) GetSelector

func (m *Gateway) GetSelector() map[string]string

func (*Gateway) GetServers

func (m *Gateway) GetServers() []*Server

func (*Gateway) Marshal

func (m *Gateway) Marshal() (dAtA []byte, err error)

func (*Gateway) MarshalTo

func (m *Gateway) MarshalTo(dAtA []byte) (int, error)

func (*Gateway) ProtoMessage

func (*Gateway) ProtoMessage()

func (*Gateway) Reset

func (m *Gateway) Reset()

func (*Gateway) Size

func (m *Gateway) Size() (n int)

func (*Gateway) String

func (m *Gateway) String() string

func (*Gateway) Unmarshal

func (m *Gateway) Unmarshal(dAtA []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" 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 a route. Fault specification is part of a VirtualService 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) Marshal

func (m *HTTPFaultInjection) Marshal() (dAtA []byte, err error)

func (*HTTPFaultInjection) MarshalTo

func (m *HTTPFaultInjection) MarshalTo(dAtA []byte) (int, error)

func (*HTTPFaultInjection) ProtoMessage

func (*HTTPFaultInjection) ProtoMessage()

func (*HTTPFaultInjection) Reset

func (m *HTTPFaultInjection) Reset()

func (*HTTPFaultInjection) Size

func (m *HTTPFaultInjection) Size() (n int)

func (*HTTPFaultInjection) String

func (m *HTTPFaultInjection) String() string

func (*HTTPFaultInjection) Unmarshal

func (m *HTTPFaultInjection) Unmarshal(dAtA []byte) error

type HTTPFaultInjection_Abort

type HTTPFaultInjection_Abort struct {
	// Percentage of requests to be aborted with the error code provided (0-100).
	Percent int32 `protobuf:"varint,1,opt,name=percent,proto3" json:"percent,omitempty"`
	// Types that are valid to be assigned to ErrorType:
	//	*HTTPFaultInjection_Abort_HttpStatus
	//	*HTTPFaultInjection_Abort_GrpcStatus
	//	*HTTPFaultInjection_Abort_Http2Error
	ErrorType isHTTPFaultInjection_Abort_ErrorType `protobuf_oneof:"error_type"`
}

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

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: ratings-route
spec:
  hosts:
  - ratings
  http:
  - route:
    - destination:
        host: ratings
        subset: v1
    fault:
      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) GetPercent

func (m *HTTPFaultInjection_Abort) GetPercent() int32

func (*HTTPFaultInjection_Abort) Marshal

func (m *HTTPFaultInjection_Abort) Marshal() (dAtA []byte, err error)

func (*HTTPFaultInjection_Abort) MarshalTo

func (m *HTTPFaultInjection_Abort) MarshalTo(dAtA []byte) (int, error)

func (*HTTPFaultInjection_Abort) ProtoMessage

func (*HTTPFaultInjection_Abort) ProtoMessage()

func (*HTTPFaultInjection_Abort) Reset

func (m *HTTPFaultInjection_Abort) Reset()

func (*HTTPFaultInjection_Abort) Size

func (m *HTTPFaultInjection_Abort) Size() (n int)

func (*HTTPFaultInjection_Abort) String

func (m *HTTPFaultInjection_Abort) String() string

func (*HTTPFaultInjection_Abort) Unmarshal

func (m *HTTPFaultInjection_Abort) Unmarshal(dAtA []byte) error

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,3,opt,name=grpc_status,json=grpcStatus,proto3,oneof"`
}

func (*HTTPFaultInjection_Abort_GrpcStatus) MarshalTo

func (m *HTTPFaultInjection_Abort_GrpcStatus) MarshalTo(dAtA []byte) (int, error)

func (*HTTPFaultInjection_Abort_GrpcStatus) Size

type HTTPFaultInjection_Abort_Http2Error

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

func (*HTTPFaultInjection_Abort_Http2Error) MarshalTo

func (m *HTTPFaultInjection_Abort_Http2Error) MarshalTo(dAtA []byte) (int, error)

func (*HTTPFaultInjection_Abort_Http2Error) Size

type HTTPFaultInjection_Abort_HttpStatus

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

func (*HTTPFaultInjection_Abort_HttpStatus) MarshalTo

func (m *HTTPFaultInjection_Abort_HttpStatus) MarshalTo(dAtA []byte) (int, error)

func (*HTTPFaultInjection_Abort_HttpStatus) Size

type HTTPFaultInjection_Delay

type HTTPFaultInjection_Delay struct {
	// Percentage of requests on which the delay will be injected (0-100).
	Percent int32 `protobuf:"varint,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"`
}

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 from all pods with label env: prod

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: reviews-route
spec:
  hosts:
  - reviews
  http:
  - match:
    - sourceLabels:
        env: prod
    route:
    - destination:
        host: reviews
        subset: v1
    fault:
      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_protobuf.Duration

func (*HTTPFaultInjection_Delay) GetFixedDelay

func (*HTTPFaultInjection_Delay) GetHttpDelayType

func (m *HTTPFaultInjection_Delay) GetHttpDelayType() isHTTPFaultInjection_Delay_HttpDelayType

func (*HTTPFaultInjection_Delay) GetPercent

func (m *HTTPFaultInjection_Delay) GetPercent() int32

func (*HTTPFaultInjection_Delay) Marshal

func (m *HTTPFaultInjection_Delay) Marshal() (dAtA []byte, err error)

func (*HTTPFaultInjection_Delay) MarshalTo

func (m *HTTPFaultInjection_Delay) MarshalTo(dAtA []byte) (int, error)

func (*HTTPFaultInjection_Delay) ProtoMessage

func (*HTTPFaultInjection_Delay) ProtoMessage()

func (*HTTPFaultInjection_Delay) Reset

func (m *HTTPFaultInjection_Delay) Reset()

func (*HTTPFaultInjection_Delay) Size

func (m *HTTPFaultInjection_Delay) Size() (n int)

func (*HTTPFaultInjection_Delay) String

func (m *HTTPFaultInjection_Delay) String() string

func (*HTTPFaultInjection_Delay) Unmarshal

func (m *HTTPFaultInjection_Delay) Unmarshal(dAtA []byte) error

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_protobuf.Duration `protobuf:"bytes,3,opt,name=exponential_delay,json=exponentialDelay,oneof"`
}

func (*HTTPFaultInjection_Delay_ExponentialDelay) MarshalTo

func (m *HTTPFaultInjection_Delay_ExponentialDelay) MarshalTo(dAtA []byte) (int, error)

func (*HTTPFaultInjection_Delay_ExponentialDelay) Size

type HTTPFaultInjection_Delay_FixedDelay

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

func (*HTTPFaultInjection_Delay_FixedDelay) MarshalTo

func (m *HTTPFaultInjection_Delay_FixedDelay) MarshalTo(dAtA []byte) (int, error)

func (*HTTPFaultInjection_Delay_FixedDelay) Size

type HTTPMatchRequest

type HTTPMatchRequest struct {
	// URI to match
	// 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
	//
	Uri *StringMatch `protobuf:"bytes,1,opt,name=uri" json:"uri,omitempty"`
	// URI Scheme
	// 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
	//
	Scheme *StringMatch `protobuf:"bytes,2,opt,name=scheme" json:"scheme,omitempty"`
	// HTTP Method
	// 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
	//
	Method *StringMatch `protobuf:"bytes,3,opt,name=method" json:"method,omitempty"`
	// HTTP Authority
	// 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
	//
	Authority *StringMatch `protobuf:"bytes,4,opt,name=authority" json:"authority,omitempty"`
	// 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:* The keys _uri_, _scheme_, _method_, and _authority_ will be ignored.
	Headers map[string]*StringMatch `` /* 141-byte string literal not displayed */
	// Specifies the ports on the host that is being addressed. Many services
	// only expose a single port or label ports with the protocols they support,
	// in these cases it is not required to explicitly select the port. Note that
	// selection priority is to first match by name and then match by number.
	//
	// Names must comply with DNS label syntax (rfc1035) and therefore cannot
	// collide with numbers. If there are multiple ports on a service with the
	// same protocol the names should be of the form <protocol-name>-<DNS label>.
	Port *PortSelector `protobuf:"bytes,6,opt,name=port" json:"port,omitempty"`
	// One or more labels that constrain the applicability of a rule to
	// workloads with the given labels. If the VirtualService has a list of
	// gateways specified at the top, it should include the reserved gateway
	// "mesh" in order for this field to be applicable.
	SourceLabels map[string]string `` /* 178-byte string literal not displayed */
	// Names of gateways where the rule should be applied to. Gateway names
	// at the top of the VirtualService (if any) are overridden. The gateway match is
	// independent of sourceLabels.
	Gateways []string `protobuf:"bytes,8,rep,name=gateways" json:"gateways,omitempty"`
}

HttpMatchRequest specifies a set of criterion to be met in order for the rule to be applied to the HTTP request. For example, the following restricts the rule to match only requests where the URL path starts with /ratings/v2/ and the request contains a "cookie" with value "user=jason".

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: ratings-route
spec:
  hosts:
  - ratings
  http:
  - match:
    - headers:
        cookie:
          regex: "^(.*?;)?(user=jason)(;.*)?"
        uri:
          prefix: "/ratings/v2/"
    route:
    - destination:
        host: ratings

HTTPMatchRequest CANNOT be empty.

func (*HTTPMatchRequest) Descriptor

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

func (*HTTPMatchRequest) GetAuthority

func (m *HTTPMatchRequest) GetAuthority() *StringMatch

func (*HTTPMatchRequest) GetGateways

func (m *HTTPMatchRequest) GetGateways() []string

func (*HTTPMatchRequest) GetHeaders

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

func (*HTTPMatchRequest) GetMethod

func (m *HTTPMatchRequest) GetMethod() *StringMatch

func (*HTTPMatchRequest) GetPort

func (m *HTTPMatchRequest) GetPort() *PortSelector

func (*HTTPMatchRequest) GetScheme

func (m *HTTPMatchRequest) GetScheme() *StringMatch

func (*HTTPMatchRequest) GetSourceLabels

func (m *HTTPMatchRequest) GetSourceLabels() map[string]string

func (*HTTPMatchRequest) GetUri

func (m *HTTPMatchRequest) GetUri() *StringMatch

func (*HTTPMatchRequest) Marshal

func (m *HTTPMatchRequest) Marshal() (dAtA []byte, err error)

func (*HTTPMatchRequest) MarshalTo

func (m *HTTPMatchRequest) MarshalTo(dAtA []byte) (int, error)

func (*HTTPMatchRequest) ProtoMessage

func (*HTTPMatchRequest) ProtoMessage()

func (*HTTPMatchRequest) Reset

func (m *HTTPMatchRequest) Reset()

func (*HTTPMatchRequest) Size

func (m *HTTPMatchRequest) Size() (n int)

func (*HTTPMatchRequest) String

func (m *HTTPMatchRequest) String() string

func (*HTTPMatchRequest) Unmarshal

func (m *HTTPMatchRequest) Unmarshal(dAtA []byte) error

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

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 rule redirects requests for /v1/getProductRatings API on the ratings service to /v1/bookRatings provided by the bookratings service.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: ratings-route
spec:
  hosts:
  - ratings
  http:
  - match:
    - uri:
        exact: /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) Marshal

func (m *HTTPRedirect) Marshal() (dAtA []byte, err error)

func (*HTTPRedirect) MarshalTo

func (m *HTTPRedirect) MarshalTo(dAtA []byte) (int, error)

func (*HTTPRedirect) ProtoMessage

func (*HTTPRedirect) ProtoMessage()

func (*HTTPRedirect) Reset

func (m *HTTPRedirect) Reset()

func (*HTTPRedirect) Size

func (m *HTTPRedirect) Size() (n int)

func (*HTTPRedirect) String

func (m *HTTPRedirect) String() string

func (*HTTPRedirect) Unmarshal

func (m *HTTPRedirect) Unmarshal(dAtA []byte) error

type HTTPRetry

type HTTPRetry 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 *google_protobuf.Duration `protobuf:"bytes,2,opt,name=per_try_timeout,json=perTryTimeout" json:"per_try_timeout,omitempty"`
}

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.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: ratings-route
spec:
  hosts:
  - ratings
  http:
  - route:
    - destination:
        host: ratings
        subset: v1
    retries:
      attempts: 3
      perTryTimeout: 2s

func (*HTTPRetry) Descriptor

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

func (*HTTPRetry) GetAttempts

func (m *HTTPRetry) GetAttempts() int32

func (*HTTPRetry) GetPerTryTimeout

func (m *HTTPRetry) GetPerTryTimeout() *google_protobuf.Duration

func (*HTTPRetry) Marshal

func (m *HTTPRetry) Marshal() (dAtA []byte, err error)

func (*HTTPRetry) MarshalTo

func (m *HTTPRetry) MarshalTo(dAtA []byte) (int, error)

func (*HTTPRetry) ProtoMessage

func (*HTTPRetry) ProtoMessage()

func (*HTTPRetry) Reset

func (m *HTTPRetry) Reset()

func (*HTTPRetry) Size

func (m *HTTPRetry) Size() (n int)

func (*HTTPRetry) String

func (m *HTTPRetry) String() string

func (*HTTPRetry) Unmarshal

func (m *HTTPRetry) Unmarshal(dAtA []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"`
}

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.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: ratings-route
spec:
  hosts:
  - ratings
  http:
  - match:
    - uri:
        prefix: /ratings
    rewrite:
      uri: /v1/bookRatings
    route:
    - destination:
        host: ratings
        subset: 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) Marshal

func (m *HTTPRewrite) Marshal() (dAtA []byte, err error)

func (*HTTPRewrite) MarshalTo

func (m *HTTPRewrite) MarshalTo(dAtA []byte) (int, error)

func (*HTTPRewrite) ProtoMessage

func (*HTTPRewrite) ProtoMessage()

func (*HTTPRewrite) Reset

func (m *HTTPRewrite) Reset()

func (*HTTPRewrite) Size

func (m *HTTPRewrite) Size() (n int)

func (*HTTPRewrite) String

func (m *HTTPRewrite) String() string

func (*HTTPRewrite) Unmarshal

func (m *HTTPRewrite) Unmarshal(dAtA []byte) error

type HTTPRoute

type HTTPRoute struct {
	// Match conditions to be satisfied for the rule to be
	// activated. All conditions inside a single match block have AND
	// semantics, while the list of match blocks have OR semantics. The rule
	// is matched if any one of the match blocks succeed.
	Match []*HTTPMatchRequest `protobuf:"bytes,1,rep,name=match" json:"match,omitempty"`
	// A http rule can either redirect or forward (default) 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,2,rep,name=route" json:"route,omitempty"`
	// A http rule can either redirect or forward (default) traffic. If
	// traffic passthrough option is specified in the rule,
	// route/redirect will be ignored. The redirect primitive can be used to
	// send a HTTP 302 redirect to a different URI or Authority.
	Redirect *HTTPRedirect `protobuf:"bytes,3,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,4,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. Istio's reference sidecar implementation (Envoy)
	// expects the first request to this route to contain the WebSocket
	// upgrade headers. Otherwise, the request will be rejected. Note that
	// Websocket allows secondary protocol negotiation which may then be
	// subject to further routing rules based on the protocol selected.
	WebsocketUpgrade bool `protobuf:"varint,5,opt,name=websocket_upgrade,json=websocketUpgrade,proto3" json:"websocket_upgrade,omitempty"`
	// Timeout for HTTP requests.
	Timeout *google_protobuf.Duration `protobuf:"bytes,6,opt,name=timeout" json:"timeout,omitempty"`
	// Retry policy for HTTP requests.
	Retries *HTTPRetry `protobuf:"bytes,7,opt,name=retries" json:"retries,omitempty"`
	// Fault injection policy to apply on HTTP traffic.
	Fault *HTTPFaultInjection `protobuf:"bytes,8,opt,name=fault" json:"fault,omitempty"`
	// Mirror HTTP traffic to a another destination in addition to forwarding
	// the requests to the intended destination. Mirrored traffic is on a
	// best effort basis where the sidecar/gateway 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 *Destination `protobuf:"bytes,9,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,10,opt,name=cors_policy,json=corsPolicy" json:"cors_policy,omitempty"`
	// Additional HTTP headers to add before forwarding a request to the
	// destination service.
	AppendHeaders map[string]string `` /* 182-byte string literal not displayed */
}

Describes match conditions and actions for routing HTTP/1.1, HTTP2, and gRPC traffic. See VirtualService for usage examples.

func (*HTTPRoute) Descriptor

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

func (*HTTPRoute) GetAppendHeaders

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

func (*HTTPRoute) GetCorsPolicy

func (m *HTTPRoute) GetCorsPolicy() *CorsPolicy

func (*HTTPRoute) GetFault

func (m *HTTPRoute) GetFault() *HTTPFaultInjection

func (*HTTPRoute) GetMatch

func (m *HTTPRoute) GetMatch() []*HTTPMatchRequest

func (*HTTPRoute) GetMirror

func (m *HTTPRoute) GetMirror() *Destination

func (*HTTPRoute) GetRedirect

func (m *HTTPRoute) GetRedirect() *HTTPRedirect

func (*HTTPRoute) GetRetries

func (m *HTTPRoute) GetRetries() *HTTPRetry

func (*HTTPRoute) GetRewrite

func (m *HTTPRoute) GetRewrite() *HTTPRewrite

func (*HTTPRoute) GetRoute

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

func (*HTTPRoute) GetTimeout

func (m *HTTPRoute) GetTimeout() *google_protobuf.Duration

func (*HTTPRoute) GetWebsocketUpgrade

func (m *HTTPRoute) GetWebsocketUpgrade() bool

func (*HTTPRoute) Marshal

func (m *HTTPRoute) Marshal() (dAtA []byte, err error)

func (*HTTPRoute) MarshalTo

func (m *HTTPRoute) MarshalTo(dAtA []byte) (int, error)

func (*HTTPRoute) ProtoMessage

func (*HTTPRoute) ProtoMessage()

func (*HTTPRoute) Reset

func (m *HTTPRoute) Reset()

func (*HTTPRoute) Size

func (m *HTTPRoute) Size() (n int)

func (*HTTPRoute) String

func (m *HTTPRoute) String() string

func (*HTTPRoute) Unmarshal

func (m *HTTPRoute) Unmarshal(dAtA []byte) error

type L4MatchAttributes

type L4MatchAttributes struct {
	// 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,1,opt,name=destination_subnet,json=destinationSubnet,proto3" json:"destination_subnet,omitempty"`
	// Specifies the port on the host that is being addressed. Many services
	// only expose a single port or label ports with the protocols they support,
	// in these cases it is not required to explicitly select the port. Note that
	// selection priority is to first match by name and then match by number.
	//
	// Names must comply with DNS label syntax (rfc1035) and therefore cannot
	// collide with numbers. If there are multiple ports on a service with the
	// same protocol the names should be of the form <protocol-name>-<DNS label>.
	Port *PortSelector `protobuf:"bytes,2,opt,name=port" json:"port,omitempty"`
	// IPv4 or IPv6 ip address of source with optional subnet. E.g., a.b.c.d/xx
	// form or just a.b.c.d
	SourceSubnet string `protobuf:"bytes,3,opt,name=source_subnet,json=sourceSubnet,proto3" json:"source_subnet,omitempty"`
	// One or more labels that constrain the applicability of a rule to
	// workloads with the given labels. If the VirtualService has a list of
	// gateways specified at the top, it should include the reserved gateway
	// "mesh" in order for this field to be applicable.
	SourceLabels map[string]string `` /* 178-byte string literal not displayed */
	// Names of gateways where the rule should be applied to. Gateway names
	// at the top of the VirtualService (if any) are overridden. The gateway match is
	// independent of sourceLabels.
	Gateways []string `protobuf:"bytes,5,rep,name=gateways" json:"gateways,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) GetGateways

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

func (*L4MatchAttributes) GetPort

func (m *L4MatchAttributes) GetPort() *PortSelector

func (*L4MatchAttributes) GetSourceLabels

func (m *L4MatchAttributes) GetSourceLabels() map[string]string

func (*L4MatchAttributes) GetSourceSubnet

func (m *L4MatchAttributes) GetSourceSubnet() string

func (*L4MatchAttributes) Marshal

func (m *L4MatchAttributes) Marshal() (dAtA []byte, err error)

func (*L4MatchAttributes) MarshalTo

func (m *L4MatchAttributes) MarshalTo(dAtA []byte) (int, error)

func (*L4MatchAttributes) ProtoMessage

func (*L4MatchAttributes) ProtoMessage()

func (*L4MatchAttributes) Reset

func (m *L4MatchAttributes) Reset()

func (*L4MatchAttributes) Size

func (m *L4MatchAttributes) Size() (n int)

func (*L4MatchAttributes) String

func (m *L4MatchAttributes) String() string

func (*L4MatchAttributes) Unmarshal

func (m *L4MatchAttributes) Unmarshal(dAtA []byte) error

type LoadBalancerSettings

type LoadBalancerSettings struct {
	// Upstream load balancing policy.
	//
	// Types that are valid to be assigned to LbPolicy:
	//	*LoadBalancerSettings_Simple
	//	*LoadBalancerSettings_ConsistentHash
	LbPolicy isLoadBalancerSettings_LbPolicy `protobuf_oneof:"lb_policy"`
}

Load balancing policies to apply for a specific destination. See Envoy's load balancing [documentation](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/load_balancing.html) for more details.

For example, the following rule uses a round robin load balancing policy for all traffic going to the ratings service.

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: bookinfo-ratings
spec:
  host: ratings
  trafficPolicy:
    loadBalancer:
      simple: ROUND_ROBIN

The following example uses the consistent hashing based load balancer for the same ratings service using the Cookie header as the hash key.

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: bookinfo-ratings
spec:
  host: ratings
  trafficPolicy:
    loadBalancer:
      consistentHash:
        http_header: Cookie

func (*LoadBalancerSettings) Descriptor

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

func (*LoadBalancerSettings) GetConsistentHash

func (*LoadBalancerSettings) GetLbPolicy

func (m *LoadBalancerSettings) GetLbPolicy() isLoadBalancerSettings_LbPolicy

func (*LoadBalancerSettings) GetSimple

func (*LoadBalancerSettings) Marshal

func (m *LoadBalancerSettings) Marshal() (dAtA []byte, err error)

func (*LoadBalancerSettings) MarshalTo

func (m *LoadBalancerSettings) MarshalTo(dAtA []byte) (int, error)

func (*LoadBalancerSettings) ProtoMessage

func (*LoadBalancerSettings) ProtoMessage()

func (*LoadBalancerSettings) Reset

func (m *LoadBalancerSettings) Reset()

func (*LoadBalancerSettings) Size

func (m *LoadBalancerSettings) Size() (n int)

func (*LoadBalancerSettings) String

func (m *LoadBalancerSettings) String() string

func (*LoadBalancerSettings) Unmarshal

func (m *LoadBalancerSettings) Unmarshal(dAtA []byte) error

func (*LoadBalancerSettings) XXX_OneofFuncs

func (*LoadBalancerSettings) 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 LoadBalancerSettings_ConsistentHash

type LoadBalancerSettings_ConsistentHash struct {
	ConsistentHash *LoadBalancerSettings_ConsistentHashLB `protobuf:"bytes,2,opt,name=consistent_hash,json=consistentHash,oneof"`
}

func (*LoadBalancerSettings_ConsistentHash) MarshalTo

func (m *LoadBalancerSettings_ConsistentHash) MarshalTo(dAtA []byte) (int, error)

func (*LoadBalancerSettings_ConsistentHash) Size

type LoadBalancerSettings_ConsistentHashLB

type LoadBalancerSettings_ConsistentHashLB struct {
	// REQUIRED. The name of the HTTP request header that will be used to
	// obtain the hash key. If the request header is not present, the load
	// balancer will use a random number as the hash, effectively making
	// the load balancing policy random.
	HttpHeader string `protobuf:"bytes,1,opt,name=http_header,json=httpHeader,proto3" json:"http_header,omitempty"`
	// The minimum number of virtual nodes to use for the hash
	// ring. Defaults to 1024. Larger ring sizes result in more granular
	// load distributions. If the number of hosts in the load balancing
	// pool is larger than the ring size, each host will be assigned a
	// single virtual node.
	MinimumRingSize uint32 `protobuf:"varint,2,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"`
}

Consistent hashing (ketama hash) based load balancer for even load distribution/redistribution when the connection pool changes. This load balancing policy is applicable only for HTTP-based connections. A user specified HTTP header is used as the key with [xxHash](http://cyan4973.github.io/xxHash) hashing.

func (*LoadBalancerSettings_ConsistentHashLB) Descriptor

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

func (*LoadBalancerSettings_ConsistentHashLB) GetHttpHeader

func (m *LoadBalancerSettings_ConsistentHashLB) GetHttpHeader() string

func (*LoadBalancerSettings_ConsistentHashLB) GetMinimumRingSize

func (m *LoadBalancerSettings_ConsistentHashLB) GetMinimumRingSize() uint32

func (*LoadBalancerSettings_ConsistentHashLB) Marshal

func (m *LoadBalancerSettings_ConsistentHashLB) Marshal() (dAtA []byte, err error)

func (*LoadBalancerSettings_ConsistentHashLB) MarshalTo

func (m *LoadBalancerSettings_ConsistentHashLB) MarshalTo(dAtA []byte) (int, error)

func (*LoadBalancerSettings_ConsistentHashLB) ProtoMessage

func (*LoadBalancerSettings_ConsistentHashLB) ProtoMessage()

func (*LoadBalancerSettings_ConsistentHashLB) Reset

func (*LoadBalancerSettings_ConsistentHashLB) Size

func (*LoadBalancerSettings_ConsistentHashLB) String

func (*LoadBalancerSettings_ConsistentHashLB) Unmarshal

func (m *LoadBalancerSettings_ConsistentHashLB) Unmarshal(dAtA []byte) error

type LoadBalancerSettings_Simple

type LoadBalancerSettings_Simple struct {
	Simple LoadBalancerSettings_SimpleLB `protobuf:"varint,1,opt,name=simple,proto3,enum=istio.networking.v1alpha3.LoadBalancerSettings_SimpleLB,oneof"`
}

func (*LoadBalancerSettings_Simple) MarshalTo

func (m *LoadBalancerSettings_Simple) MarshalTo(dAtA []byte) (int, error)

func (*LoadBalancerSettings_Simple) Size

func (m *LoadBalancerSettings_Simple) Size() (n int)

type LoadBalancerSettings_SimpleLB

type LoadBalancerSettings_SimpleLB int32

Standard load balancing algorithms that require no tuning.

const (
	// Round Robin policy. Default
	LoadBalancerSettings_ROUND_ROBIN LoadBalancerSettings_SimpleLB = 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.
	LoadBalancerSettings_LEAST_CONN LoadBalancerSettings_SimpleLB = 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.
	LoadBalancerSettings_RANDOM LoadBalancerSettings_SimpleLB = 2
	// This option will forward the connection to the original IP address
	// requested by the caller without doing any form of load
	// balancing. This option must be used with care. It is meant for
	// advanced use cases. Refer to Original Destination load balancer in
	// Envoy for further details.
	LoadBalancerSettings_PASSTHROUGH LoadBalancerSettings_SimpleLB = 3
)

func (LoadBalancerSettings_SimpleLB) EnumDescriptor

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

func (LoadBalancerSettings_SimpleLB) String

type OutlierDetection

type OutlierDetection struct {
	// Settings for HTTP1.1/HTTP2/GRPC connections.
	Http *OutlierDetection_HTTPSettings `protobuf:"bytes,1,opt,name=http" json:"http,omitempty"`
}

A Circuit breaker implementation that tracks the status of each individual host in the upstream service. While currently applicable to only HTTP services, future versions will support opaque TCP services as well. For HTTP services, hosts that continually return errors for API calls are ejected from the pool for a pre-defined period of time. See Envoy's [outlier detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/outlier) for more details.

The following rule sets a connection pool size of 100 connections and 1000 concurrent HTTP2 requests, with no more than 10 req/connection to "reviews" service. In addition, it configures upstream 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.

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: reviews-cb-policy
spec:
  host: reviews
  trafficPolicy:
    connectionPool:
      tcp:
        maxConnections: 100
      http:
        http2MaxRequests: 1000
        maxRequestsPerConnection: 10
    outlierDetection:
      http:
        consecutiveErrors: 7
        interval: 5m
        baseEjectionTime: 15m

func (*OutlierDetection) Descriptor

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

func (*OutlierDetection) GetHttp

func (*OutlierDetection) Marshal

func (m *OutlierDetection) Marshal() (dAtA []byte, err error)

func (*OutlierDetection) MarshalTo

func (m *OutlierDetection) MarshalTo(dAtA []byte) (int, error)

func (*OutlierDetection) ProtoMessage

func (*OutlierDetection) ProtoMessage()

func (*OutlierDetection) Reset

func (m *OutlierDetection) Reset()

func (*OutlierDetection) Size

func (m *OutlierDetection) Size() (n int)

func (*OutlierDetection) String

func (m *OutlierDetection) String() string

func (*OutlierDetection) Unmarshal

func (m *OutlierDetection) Unmarshal(dAtA []byte) error

type OutlierDetection_HTTPSettings

type OutlierDetection_HTTPSettings struct {
	// Number of 5XX errors before a host is ejected from the connection
	// pool. Defaults to 5.
	ConsecutiveErrors int32 `protobuf:"varint,1,opt,name=consecutive_errors,json=consecutiveErrors,proto3" json:"consecutive_errors,omitempty"`
	// Time interval between ejection sweep analysis. format:
	// 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
	Interval *google_protobuf.Duration `protobuf:"bytes,2,opt,name=interval" json:"interval,omitempty"`
	// Minimum ejection duration. A host will remain ejected for a period
	// equal to the product of minimum ejection duration and the number of
	// times the host has been ejected. This technique allows the system to
	// automatically increase the ejection period for unhealthy upstream
	// servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
	BaseEjectionTime *google_protobuf.Duration `protobuf:"bytes,3,opt,name=base_ejection_time,json=baseEjectionTime" json:"base_ejection_time,omitempty"`
	// Maximum % of hosts in the load balancing pool for the upstream
	// service that can be ejected. Defaults to 10%.
	MaxEjectionPercent int32 `protobuf:"varint,4,opt,name=max_ejection_percent,json=maxEjectionPercent,proto3" json:"max_ejection_percent,omitempty"`
}

Outlier detection settings for HTTP1.1/HTTP2/GRPC connections.

func (*OutlierDetection_HTTPSettings) Descriptor

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

func (*OutlierDetection_HTTPSettings) GetBaseEjectionTime

func (m *OutlierDetection_HTTPSettings) GetBaseEjectionTime() *google_protobuf.Duration

func (*OutlierDetection_HTTPSettings) GetConsecutiveErrors

func (m *OutlierDetection_HTTPSettings) GetConsecutiveErrors() int32

func (*OutlierDetection_HTTPSettings) GetInterval

func (*OutlierDetection_HTTPSettings) GetMaxEjectionPercent

func (m *OutlierDetection_HTTPSettings) GetMaxEjectionPercent() int32

func (*OutlierDetection_HTTPSettings) Marshal

func (m *OutlierDetection_HTTPSettings) Marshal() (dAtA []byte, err error)

func (*OutlierDetection_HTTPSettings) MarshalTo

func (m *OutlierDetection_HTTPSettings) MarshalTo(dAtA []byte) (int, error)

func (*OutlierDetection_HTTPSettings) ProtoMessage

func (*OutlierDetection_HTTPSettings) ProtoMessage()

func (*OutlierDetection_HTTPSettings) Reset

func (m *OutlierDetection_HTTPSettings) Reset()

func (*OutlierDetection_HTTPSettings) Size

func (m *OutlierDetection_HTTPSettings) Size() (n int)

func (*OutlierDetection_HTTPSettings) String

func (*OutlierDetection_HTTPSettings) Unmarshal

func (m *OutlierDetection_HTTPSettings) Unmarshal(dAtA []byte) error

type Port

type Port struct {
	// REQUIRED: A valid non-negative integer port number.
	Number uint32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	// REQUIRED: The protocol exposed on the port.
	// MUST BE one of HTTP|HTTPS|GRPC|HTTP2|MONGO|TCP.
	Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
	// Label assigned to the port.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
}

Port describes the properties of a specific port of a service.

func (*Port) Descriptor

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

func (*Port) GetName

func (m *Port) GetName() string

func (*Port) GetNumber

func (m *Port) GetNumber() uint32

func (*Port) GetProtocol

func (m *Port) GetProtocol() string

func (*Port) Marshal

func (m *Port) Marshal() (dAtA []byte, err error)

func (*Port) MarshalTo

func (m *Port) MarshalTo(dAtA []byte) (int, error)

func (*Port) ProtoMessage

func (*Port) ProtoMessage()

func (*Port) Reset

func (m *Port) Reset()

func (*Port) Size

func (m *Port) Size() (n int)

func (*Port) String

func (m *Port) String() string

func (*Port) Unmarshal

func (m *Port) Unmarshal(dAtA []byte) error

type PortSelector

type PortSelector struct {
	// Types that are valid to be assigned to Port:
	//	*PortSelector_Number
	//	*PortSelector_Name
	Port isPortSelector_Port `protobuf_oneof:"port"`
}

PortSelector specifies the name or number of a port to be used for matching or selection for final routing.

func (*PortSelector) Descriptor

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

func (*PortSelector) GetName

func (m *PortSelector) GetName() string

func (*PortSelector) GetNumber

func (m *PortSelector) GetNumber() uint32

func (*PortSelector) GetPort

func (m *PortSelector) GetPort() isPortSelector_Port

func (*PortSelector) Marshal

func (m *PortSelector) Marshal() (dAtA []byte, err error)

func (*PortSelector) MarshalTo

func (m *PortSelector) MarshalTo(dAtA []byte) (int, error)

func (*PortSelector) ProtoMessage

func (*PortSelector) ProtoMessage()

func (*PortSelector) Reset

func (m *PortSelector) Reset()

func (*PortSelector) Size

func (m *PortSelector) Size() (n int)

func (*PortSelector) String

func (m *PortSelector) String() string

func (*PortSelector) Unmarshal

func (m *PortSelector) Unmarshal(dAtA []byte) error

func (*PortSelector) XXX_OneofFuncs

func (*PortSelector) 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 PortSelector_Name

type PortSelector_Name struct {
	Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"`
}

func (*PortSelector_Name) MarshalTo

func (m *PortSelector_Name) MarshalTo(dAtA []byte) (int, error)

func (*PortSelector_Name) Size

func (m *PortSelector_Name) Size() (n int)

type PortSelector_Number

type PortSelector_Number struct {
	Number uint32 `protobuf:"varint,1,opt,name=number,proto3,oneof"`
}

func (*PortSelector_Number) MarshalTo

func (m *PortSelector_Number) MarshalTo(dAtA []byte) (int, error)

func (*PortSelector_Number) Size

func (m *PortSelector_Number) Size() (n int)

type Server

type Server struct {
	// REQUIRED: The Port on which the proxy should listen for incoming
	// connections
	Port *Port `protobuf:"bytes,1,opt,name=port" json:"port,omitempty"`
	// A list of hosts exposed by this gateway. While
	// typically applicable to HTTP services, it can also be used for TCP
	// services using TLS with SNI. Standard DNS wildcard prefix syntax
	// is permitted.
	//
	// A VirtualService that is bound to a gateway must having a matching host
	// in its default destination. Specifically one of the VirtualService
	// destination hosts is a strict suffix of a gateway host or
	// a gateway host is a suffix of one of the VirtualService hosts.
	Hosts []string `protobuf:"bytes,2,rep,name=hosts" json:"hosts,omitempty"`
	// Set of TLS related options that govern the server's behavior. Use
	// these options to control if all http requests should be redirected to
	// https, and the TLS modes to use.
	Tls *Server_TLSOptions `protobuf:"bytes,3,opt,name=tls" json:"tls,omitempty"`
}

Server describes the properties of the proxy on a given load balancer port. For example,

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: my-ingress
spec:
  selector:
    app: my-ingress-controller
  servers:
  - port:
      number: 80
      name: http2
      protocol: HTTP2

Another example

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: my-tcp-ingress
spec:
  selector:
    app: my-tcp-ingress-controller
  servers:
  - port:
      number: 27018
      name: mongo
      protocol: MONGO

The following is an example of TLS configuration for port 443

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: my-tls-ingress
spec:
  selector:
    app: my-tls-ingress-controller
  servers:
  - port:
      number: 443
      name: https
      protocol: HTTPS
    tls:
      mode: SIMPLE
      serverCertificate: /etc/certs/server.pem
      privateKey: /etc/certs/privatekey.pem

func (*Server) Descriptor

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

func (*Server) GetHosts

func (m *Server) GetHosts() []string

func (*Server) GetPort

func (m *Server) GetPort() *Port

func (*Server) GetTls

func (m *Server) GetTls() *Server_TLSOptions

func (*Server) Marshal

func (m *Server) Marshal() (dAtA []byte, err error)

func (*Server) MarshalTo

func (m *Server) MarshalTo(dAtA []byte) (int, error)

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) Reset

func (m *Server) Reset()

func (*Server) Size

func (m *Server) Size() (n int)

func (*Server) String

func (m *Server) String() string

func (*Server) Unmarshal

func (m *Server) Unmarshal(dAtA []byte) error

type Server_TLSOptions

type Server_TLSOptions struct {
	// If set to true, the load balancer will send a 302 redirect for all
	// http connections, asking the clients to use HTTPS.
	HttpsRedirect bool `protobuf:"varint,1,opt,name=https_redirect,json=httpsRedirect,proto3" json:"https_redirect,omitempty"`
	// Optional: Indicates whether connections to this port should be
	// secured using TLS. The value of this field determines how TLS is
	// enforced.
	Mode Server_TLSOptions_TLSmode `protobuf:"varint,2,opt,name=mode,proto3,enum=istio.networking.v1alpha3.Server_TLSOptions_TLSmode" json:"mode,omitempty"`
	// REQUIRED if mode is "SIMPLE" or "MUTUAL". The path to the file
	// holding the server-side TLS certificate to use.
	ServerCertificate string `protobuf:"bytes,3,opt,name=server_certificate,json=serverCertificate,proto3" json:"server_certificate,omitempty"`
	// REQUIRED if mode is "SIMPLE" or "MUTUAL". The path to the file
	// holding the server's private key.
	PrivateKey string `protobuf:"bytes,4,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
	// REQUIRED if mode is "MUTUAL". The path to a file containing
	// certificate authority certificates to use in verifying a presented
	// client side certificate.
	CaCertificates string `protobuf:"bytes,5,opt,name=ca_certificates,json=caCertificates,proto3" json:"ca_certificates,omitempty"`
	// A list of alternate names to verify the subject identity in the
	// certificate presented by the client.
	SubjectAltNames []string `protobuf:"bytes,6,rep,name=subject_alt_names,json=subjectAltNames" json:"subject_alt_names,omitempty"`
}

func (*Server_TLSOptions) Descriptor

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

func (*Server_TLSOptions) GetCaCertificates

func (m *Server_TLSOptions) GetCaCertificates() string

func (*Server_TLSOptions) GetHttpsRedirect

func (m *Server_TLSOptions) GetHttpsRedirect() bool

func (*Server_TLSOptions) GetMode

func (*Server_TLSOptions) GetPrivateKey

func (m *Server_TLSOptions) GetPrivateKey() string

func (*Server_TLSOptions) GetServerCertificate

func (m *Server_TLSOptions) GetServerCertificate() string

func (*Server_TLSOptions) GetSubjectAltNames

func (m *Server_TLSOptions) GetSubjectAltNames() []string

func (*Server_TLSOptions) Marshal

func (m *Server_TLSOptions) Marshal() (dAtA []byte, err error)

func (*Server_TLSOptions) MarshalTo

func (m *Server_TLSOptions) MarshalTo(dAtA []byte) (int, error)

func (*Server_TLSOptions) ProtoMessage

func (*Server_TLSOptions) ProtoMessage()

func (*Server_TLSOptions) Reset

func (m *Server_TLSOptions) Reset()

func (*Server_TLSOptions) Size

func (m *Server_TLSOptions) Size() (n int)

func (*Server_TLSOptions) String

func (m *Server_TLSOptions) String() string

func (*Server_TLSOptions) Unmarshal

func (m *Server_TLSOptions) Unmarshal(dAtA []byte) error

type Server_TLSOptions_TLSmode

type Server_TLSOptions_TLSmode int32

TLS modes enforced by the proxy

const (
	// If set to "PASSTHROUGH", the proxy will forward the connection
	// to the upstream server selected based on the SNI string presented
	// by the client.
	Server_TLSOptions_PASSTHROUGH Server_TLSOptions_TLSmode = 0
	// If set to "SIMPLE", the proxy will secure connections with
	// standard TLS semantics.
	Server_TLSOptions_SIMPLE Server_TLSOptions_TLSmode = 1
	// If set to "MUTUAL", the proxy will secure connections to the
	// upstream using mutual TLS by presenting client certificates for
	// authentication.
	Server_TLSOptions_MUTUAL Server_TLSOptions_TLSmode = 2
)

func (Server_TLSOptions_TLSmode) EnumDescriptor

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

func (Server_TLSOptions_TLSmode) String

func (x Server_TLSOptions_TLSmode) 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) Marshal

func (m *StringMatch) Marshal() (dAtA []byte, err error)

func (*StringMatch) MarshalTo

func (m *StringMatch) MarshalTo(dAtA []byte) (int, error)

func (*StringMatch) ProtoMessage

func (*StringMatch) ProtoMessage()

func (*StringMatch) Reset

func (m *StringMatch) Reset()

func (*StringMatch) Size

func (m *StringMatch) Size() (n int)

func (*StringMatch) String

func (m *StringMatch) String() string

func (*StringMatch) Unmarshal

func (m *StringMatch) Unmarshal(dAtA []byte) error

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,proto3,oneof"`
}

func (*StringMatch_Exact) MarshalTo

func (m *StringMatch_Exact) MarshalTo(dAtA []byte) (int, error)

func (*StringMatch_Exact) Size

func (m *StringMatch_Exact) Size() (n int)

type StringMatch_Prefix

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

func (*StringMatch_Prefix) MarshalTo

func (m *StringMatch_Prefix) MarshalTo(dAtA []byte) (int, error)

func (*StringMatch_Prefix) Size

func (m *StringMatch_Prefix) Size() (n int)

type StringMatch_Regex

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

func (*StringMatch_Regex) MarshalTo

func (m *StringMatch_Regex) MarshalTo(dAtA []byte) (int, error)

func (*StringMatch_Regex) Size

func (m *StringMatch_Regex) Size() (n int)

type Subset

type Subset struct {
	// REQUIRED. name of the subset. The service name and the subset name can
	// be used for traffic splitting in a route rule.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// REQUIRED. Labels apply a filter over the endpoints of a service in the
	// service registry. See route rules for examples of usage.
	Labels map[string]string `` /* 146-byte string literal not displayed */
	// Traffic policies that apply to this subset. Subsets inherit the
	// traffic policies specified at the DestinationRule level. Settings
	// specified at the subset level will override the corresponding settings
	// specified at the DestinationRule level.
	TrafficPolicy *TrafficPolicy `protobuf:"bytes,3,opt,name=traffic_policy,json=trafficPolicy" json:"traffic_policy,omitempty"`
}

A subset of endpoints of a service. Subsets can be used for scenarios like A/B testing, or routing to a specific version of a service. Refer to VirtualService documentation for examples of using subsets in these scenarios. In addition, traffic policies defined at the service-level can be overridden at a subset-level. The following rule uses a round robin load balancing policy for all traffic going to a subset named testversion that is composed of endpoints (e.g., pods) with labels (version:v3).

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: bookinfo-ratings
spec:
  host: ratings
  trafficPolicy:
    loadBalancer:
      simple: LEAST_CONN
  subsets:
  - name: testversion
    labels:
      version: v3
    trafficPolicy:
      loadBalancer:
        simple: ROUND_ROBIN

Note that policies specified for subsets will not take effect until a route rule explicitly sends traffic to this subset.

func (*Subset) Descriptor

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

func (*Subset) GetLabels

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

func (*Subset) GetName

func (m *Subset) GetName() string

func (*Subset) GetTrafficPolicy

func (m *Subset) GetTrafficPolicy() *TrafficPolicy

func (*Subset) Marshal

func (m *Subset) Marshal() (dAtA []byte, err error)

func (*Subset) MarshalTo

func (m *Subset) MarshalTo(dAtA []byte) (int, error)

func (*Subset) ProtoMessage

func (*Subset) ProtoMessage()

func (*Subset) Reset

func (m *Subset) Reset()

func (*Subset) Size

func (m *Subset) Size() (n int)

func (*Subset) String

func (m *Subset) String() string

func (*Subset) Unmarshal

func (m *Subset) Unmarshal(dAtA []byte) error

type TCPRoute

type TCPRoute struct {
	// Match conditions to be satisfied for the rule to be
	// activated. All conditions inside a single match block have AND
	// semantics, while the list of match blocks have OR semantics. The rule
	// is matched if any one of the match blocks succeed.
	Match []*L4MatchAttributes `protobuf:"bytes,1,rep,name=match" json:"match,omitempty"`
	// The destination to which the connection should be forwarded to.
	// Currently, only one destination is allowed for TCP services. When TCP
	// weighted routing support is introduced in Envoy, multiple destinations
	// with weights can be specified.
	Route []*DestinationWeight `protobuf:"bytes,2,rep,name=route" json:"route,omitempty"`
}

Describes match conditions and actions for routing TCP traffic. The following routing rule forwards traffic arriving at port 2379 named Mongo from 172.17.16.* subnet to another Mongo server on port 5555.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: bookinfo-Mongo
spec:
  hosts:
  - myMongosrv
  tcp:
  - match:
    - port:
        name: Mongo # only applies to ports named Mongo
      sourceSubnet: "172.17.16.0/24"
    route:
    - destination:
        host: mongo.prod

func (*TCPRoute) Descriptor

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

func (*TCPRoute) GetMatch

func (m *TCPRoute) GetMatch() []*L4MatchAttributes

func (*TCPRoute) GetRoute

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

func (*TCPRoute) Marshal

func (m *TCPRoute) Marshal() (dAtA []byte, err error)

func (*TCPRoute) MarshalTo

func (m *TCPRoute) MarshalTo(dAtA []byte) (int, error)

func (*TCPRoute) ProtoMessage

func (*TCPRoute) ProtoMessage()

func (*TCPRoute) Reset

func (m *TCPRoute) Reset()

func (*TCPRoute) Size

func (m *TCPRoute) Size() (n int)

func (*TCPRoute) String

func (m *TCPRoute) String() string

func (*TCPRoute) Unmarshal

func (m *TCPRoute) Unmarshal(dAtA []byte) error

type TLSSettings

type TLSSettings struct {
	// REQUIRED: Indicates whether connections to this port should be secured
	// using TLS. The value of this field determines how TLS is enforced.
	Mode TLSSettings_TLSmode `protobuf:"varint,1,opt,name=mode,proto3,enum=istio.networking.v1alpha3.TLSSettings_TLSmode" json:"mode,omitempty"`
	// REQUIRED if mode is "mutual". The path to the file holding the
	// client-side TLS certificate to use.
	ClientCertificate string `protobuf:"bytes,2,opt,name=client_certificate,json=clientCertificate,proto3" json:"client_certificate,omitempty"`
	// REQUIRED if mode is "mutual". The path to the file holding the
	// client's private key.
	PrivateKey string `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
	// OPTIONAL: The path to the file containing certificate authority
	// certificates to use in verifying a presented server certificate. If
	// omitted, the proxy will not verify the server's certificate.
	CaCertificates string `protobuf:"bytes,4,opt,name=ca_certificates,json=caCertificates,proto3" json:"ca_certificates,omitempty"`
	// A list of alternate names to verify the subject identity in the
	// certificate. If specified, the proxy will verify that the server
	// certificate's subject alt name matches one of the specified values.
	SubjectAltNames []string `protobuf:"bytes,5,rep,name=subject_alt_names,json=subjectAltNames" json:"subject_alt_names,omitempty"`
	// SNI string to present to the server during TLS handshake.
	Sni string `protobuf:"bytes,6,opt,name=sni,proto3" json:"sni,omitempty"`
}

SSL/TLS related settings for upstream connections. See Envoy's [TLS context](https://www.envoyproxy.io/docs/envoy/latest/api-v1/cluster_manager/cluster_ssl.html#config-cluster-manager-cluster-ssl) for more details. These settings are common to both HTTP and TCP upstreams.

For example, the following rule configures a client to use mutual TLS for connections to upstream database cluster.

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: db-mtls
spec:
  host: mydbserver
  trafficPolicy:
    tls:
      mode: MUTUAL
      clientCertificate: /etc/certs/myclientcert.pem
      privateKey: /etc/certs/client_private_key.pem
      caCertificates: /etc/certs/rootcacerts.pem

The following rule configures a client to use TLS when talking to a foreign service whose domain matches *.foo.com.

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: tls-foo
spec:
  host: "*.foo.com"
  trafficPolicy:
    tls:
      mode: SIMPLE

func (*TLSSettings) Descriptor

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

func (*TLSSettings) GetCaCertificates

func (m *TLSSettings) GetCaCertificates() string

func (*TLSSettings) GetClientCertificate

func (m *TLSSettings) GetClientCertificate() string

func (*TLSSettings) GetMode

func (m *TLSSettings) GetMode() TLSSettings_TLSmode

func (*TLSSettings) GetPrivateKey

func (m *TLSSettings) GetPrivateKey() string

func (*TLSSettings) GetSni

func (m *TLSSettings) GetSni() string

func (*TLSSettings) GetSubjectAltNames

func (m *TLSSettings) GetSubjectAltNames() []string

func (*TLSSettings) Marshal

func (m *TLSSettings) Marshal() (dAtA []byte, err error)

func (*TLSSettings) MarshalTo

func (m *TLSSettings) MarshalTo(dAtA []byte) (int, error)

func (*TLSSettings) ProtoMessage

func (*TLSSettings) ProtoMessage()

func (*TLSSettings) Reset

func (m *TLSSettings) Reset()

func (*TLSSettings) Size

func (m *TLSSettings) Size() (n int)

func (*TLSSettings) String

func (m *TLSSettings) String() string

func (*TLSSettings) Unmarshal

func (m *TLSSettings) Unmarshal(dAtA []byte) error

type TLSSettings_TLSmode

type TLSSettings_TLSmode int32

TLS connection mode

const (
	// If set to "disable", the proxy will use not setup a TLS connection to the
	// upstream server.
	TLSSettings_DISABLE TLSSettings_TLSmode = 0
	// If set to "simple", the proxy will originate a TLS connection to the
	// upstream server.
	TLSSettings_SIMPLE TLSSettings_TLSmode = 1
	// If set to "mutual", the proxy will secure connections to the
	// upstream using mutual TLS by presenting client certificates for
	// authentication.
	TLSSettings_MUTUAL TLSSettings_TLSmode = 2
)

func (TLSSettings_TLSmode) EnumDescriptor

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

func (TLSSettings_TLSmode) String

func (x TLSSettings_TLSmode) String() string

type TrafficPolicy

type TrafficPolicy struct {
	// Settings controlling the load balancer algorithms.
	LoadBalancer *LoadBalancerSettings `protobuf:"bytes,1,opt,name=load_balancer,json=loadBalancer" json:"load_balancer,omitempty"`
	// Settings controlling the volume of connections to an upstream service
	ConnectionPool *ConnectionPoolSettings `protobuf:"bytes,2,opt,name=connection_pool,json=connectionPool" json:"connection_pool,omitempty"`
	// Settings controlling eviction of unhealthy hosts from the load balancing pool
	OutlierDetection *OutlierDetection `protobuf:"bytes,3,opt,name=outlier_detection,json=outlierDetection" json:"outlier_detection,omitempty"`
	// TLS related settings for connections to the upstream service.
	Tls *TLSSettings `protobuf:"bytes,4,opt,name=tls" json:"tls,omitempty"`
}

Traffic policies to apply for a specific destination. See DestinationRule for examples.

func (*TrafficPolicy) Descriptor

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

func (*TrafficPolicy) GetConnectionPool

func (m *TrafficPolicy) GetConnectionPool() *ConnectionPoolSettings

func (*TrafficPolicy) GetLoadBalancer

func (m *TrafficPolicy) GetLoadBalancer() *LoadBalancerSettings

func (*TrafficPolicy) GetOutlierDetection

func (m *TrafficPolicy) GetOutlierDetection() *OutlierDetection

func (*TrafficPolicy) GetTls

func (m *TrafficPolicy) GetTls() *TLSSettings

func (*TrafficPolicy) Marshal

func (m *TrafficPolicy) Marshal() (dAtA []byte, err error)

func (*TrafficPolicy) MarshalTo

func (m *TrafficPolicy) MarshalTo(dAtA []byte) (int, error)

func (*TrafficPolicy) ProtoMessage

func (*TrafficPolicy) ProtoMessage()

func (*TrafficPolicy) Reset

func (m *TrafficPolicy) Reset()

func (*TrafficPolicy) Size

func (m *TrafficPolicy) Size() (n int)

func (*TrafficPolicy) String

func (m *TrafficPolicy) String() string

func (*TrafficPolicy) Unmarshal

func (m *TrafficPolicy) Unmarshal(dAtA []byte) error

type VirtualService

type VirtualService struct {
	// REQUIRED. The destination address for traffic captured by this virtual
	// service. Could be a DNS name with wildcard prefix or a CIDR
	// prefix. Depending on the platform, short-names can also be used
	// instead of a FQDN (i.e. has no dots in the name). In such a scenario,
	// the FQDN of the host would be derived based on the underlying
	// platform.
	//
	// For example on Kubernetes, when hosts contains a short name, Istio will
	// interpret the short name based on the namespace of the rule. Thus, when a
	// client namespace applies a rule in the "default" namespace containing a name
	// "reviews, Istio will setup routes to the "reviews.default.svc.cluster.local"
	// service. However, if a different name such as "reviews.sales.svc.cluster.local"
	// is used, it would be treated as a FQDN during virtual host matching.
	// In Consul, a plain service name would be resolved to the FQDN
	// "reviews.service.consul".
	//
	// Note that the hosts field applies to both HTTP and TCP
	// services. Service inside the mesh, i.e., those found in the service
	// registry, must always be referred to using their alphanumeric
	// names. IP addresses or CIDR prefixes are allowed only for services
	// defined via the Gateway.
	Hosts []string `protobuf:"bytes,1,rep,name=hosts" json:"hosts,omitempty"`
	// The names of gateways and sidecars that should apply these routes. A
	// single VirtualService is used for sidecars inside the mesh as well
	// as for one or more gateways. The selection condition imposed by this field
	// can be overridden using the source field in the match conditions of HTTP/TCP
	// routes. The reserved word "mesh" is used to imply all the sidecars in
	// the mesh. When this field is omitted, the default gateway ("mesh")
	// will be used, which would apply the rule to all sidecars in the
	// mesh. If a list of gateway names is provided, the rules will apply
	// only to the gateways. To apply the rules to both gateways and sidecars,
	// specify "mesh" as one of the gateway names.
	Gateways []string `protobuf:"bytes,2,rep,name=gateways" json:"gateways,omitempty"`
	// An ordered list of route rules for HTTP traffic.
	// The first rule matching an incoming request is used.
	Http []*HTTPRoute `protobuf:"bytes,3,rep,name=http" json:"http,omitempty"`
	// An ordered list of route rules for TCP traffic.
	// The first rule matching an incoming request is used.
	Tcp []*TCPRoute `protobuf:"bytes,4,rep,name=tcp" json:"tcp,omitempty"`
}

A VirtualService defines a set of traffic routing rules to apply when a host is addressed. Each routing rule defines matching criteria for traffic of a specific protocol. If the traffic is matched, then it is sent to a named destination service (or subset/version of it) defined in the registry.

The source of traffic can also be matched in a routing rule. This allows routing to be customized for specific client contexts.

The following example routes all HTTP traffic by default to pods of the reviews service with label "version: v1". In addition, HTTP requests containing /wpcatalog/, /consumercatalog/ url prefixes will be rewritten to /newcatalog and sent to pods with label "version: v2". The rules will be applied at the gateway named "bookinfo" as well as at all the sidecars in the mesh (indicated by the reserved gateway name "mesh").

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: reviews-route
spec:
  hosts:
  - reviews
  gateways: # if omitted, defaults to "mesh"
  - bookinfo
  - mesh
  http:
  - match:
    - uri:
        prefix: "/wpcatalog"
    - uri:
        prefix: "/consumercatalog"
    rewrite:
      uri: "/newcatalog"
    route:
    - destination:
        host: reviews
        subset: v2
  - route:
    - destination:
        host: reviews
        subset: v1

A subset/version of a route destination is identified with a reference to a named service subset which must be declared in a corresponding DestinationRule.

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: reviews-destination
spec:
  host: reviews
  subsets:
  - name: v1
    labels:
      version: v1
  - name: v2
    labels:
      version: v2

A host name can be defined by only one VirtualService. A single VirtualService can be used to describe traffic properties for multiple HTTP and TCP ports.

func (*VirtualService) Descriptor

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

func (*VirtualService) GetGateways

func (m *VirtualService) GetGateways() []string

func (*VirtualService) GetHosts

func (m *VirtualService) GetHosts() []string

func (*VirtualService) GetHttp

func (m *VirtualService) GetHttp() []*HTTPRoute

func (*VirtualService) GetTcp

func (m *VirtualService) GetTcp() []*TCPRoute

func (*VirtualService) Marshal

func (m *VirtualService) Marshal() (dAtA []byte, err error)

func (*VirtualService) MarshalTo

func (m *VirtualService) MarshalTo(dAtA []byte) (int, error)

func (*VirtualService) ProtoMessage

func (*VirtualService) ProtoMessage()

func (*VirtualService) Reset

func (m *VirtualService) Reset()

func (*VirtualService) Size

func (m *VirtualService) Size() (n int)

func (*VirtualService) String

func (m *VirtualService) String() string

func (*VirtualService) Unmarshal

func (m *VirtualService) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL