v1alpha3

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: networking.GroupName, Version: "v1alpha3"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Abort

type Abort struct {
	// REQUIRED. HTTP status code to use to abort the Http request.
	HTTPStatus int `json:"httpStatus"`

	// Percentage of requests on which the delay will be injected.
	Percentage *Percentage `json:"percentage,omitempty"`
}

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

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: ratings-route

spec:

hosts:
- ratings.prod.svc.cluster.local
http:
- route:
  - destination:
      host: ratings.prod.svc.cluster.local
      subset: v1
  fault:
    abort:
      percentage:
        value: 0.1
      httpStatus: 400

```

The _httpStatus_ field is used to indicate the HTTP status code to return to the caller. The optional _percentage_ field can be used to only abort a certain percentage of requests. If not specified, all requests are aborted.

func (*Abort) DeepCopy

func (in *Abort) DeepCopy() *Abort

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Abort.

func (*Abort) DeepCopyInto

func (in *Abort) DeepCopyInto(out *Abort)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ApplyTo

type ApplyTo string

ApplyTo specifies where in the Envoy configuration, the given patch should be applied.

const (
	ApplyToInvalid ApplyTo = "INVALID"
	// Applies the patch to the listener.
	ApplyToListener ApplyTo = "LISTENER"
	// Applies the patch to the filter chain.
	ApplyToFilterChain ApplyTo = "FILTER_CHAIN"
	// Applies the patch to the network filter chain, to modify an
	// existing filter or add a new filter.
	ApplyToNetworkFilter ApplyTo = "NETWORK_FILTER"
	// Applies the patch to the HTTP filter chain in the http
	// connection manager, to modify an existing filter or add a new
	// filter.
	ApplyToHTTPFilter ApplyTo = "HTTP_FILTER"
	// Applies the patch to the Route configuration (rds output)
	// inside a HTTP connection manager. This does not apply to the
	// virtual host. Currently, only MERGE operation is allowed on the
	// route configuration objects.
	ApplyToRouteConfiguration ApplyTo = "ROUTE_CONFIGURATION"
	// Applies the patch to a virtual host inside a route configuration.
	ApplyToVirtualHost ApplyTo = "VIRTUAL_HOST"
	// Applies the patch to a route object inside the matched virtual
	// host in a route configuration. Currently, only MERGE operation
	// is allowed on the route objects.
	ApplyToHTTPRoute ApplyTo = "HTTP_ROUTE"
	// Applies the patch to a cluster in a CDS output. Also used to add new clusters.
	ApplyToCluster ApplyTo = "CLUSTER"
)

type CaptureMode

type CaptureMode string

CaptureMode describes how traffic to a listener is expected to be captured. Applicable only when the listener is bound to an IP.

const (
	// The default capture mode defined by the environment.
	CaptureModeDefault CaptureMode = "DEFAULT"
	// Capture traffic using IPtables redirection.
	CaptureModeIPTables CaptureMode = "IPTABLES"
	// No traffic capture. When used in an egress listener, the application is
	// expected to explicitly communicate with the listener port or Unix
	// domain socket. When used in an ingress listener, care needs to be taken
	// to ensure that the listener port is not in use by other processes on
	// the host.
	CaptureModeNone CaptureMode = "NONE"
)

type ClusterMatch

type ClusterMatch struct {
	// The service port for which this cluster was generated.  If
	// omitted, applies to clusters for any port.
	PortNumber uint32 `json:"portNumber,omitempty"`
	// The fully qualified service name for this cluster. If omitted,
	// applies to clusters for any service. For services defined
	// through service entries, the service name is same as the hosts
	// defined in the service entry.
	Service string `json:"service,omitempty"`
	// The subset associated with the service. If omitted, applies to
	// clusters for any subset of a service.
	Subset string `json:"subset,omitempty"`
	// The exact name of the cluster to match. To match a specific
	// cluster by name, such as the internally generated "Passthrough"
	// cluster, leave all fields in clusterMatch empty, except the
	// name.
	Name string `json:"name,omitempty"`
}

Conditions specified in ClusterMatch must be met for the patch to be applied to a cluster.

func (*ClusterMatch) DeepCopy

func (in *ClusterMatch) DeepCopy() *ClusterMatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMatch.

func (*ClusterMatch) DeepCopyInto

func (in *ClusterMatch) DeepCopyInto(out *ClusterMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConnectionPoolSettings

type ConnectionPoolSettings struct {
	// Settings common to both HTTP and TCP upstream connections.
	TCP *TCPSettings `json:"tcp,omitempty"`

	// HTTP connection pool settings.
	HTTP *HTTPSettings `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/upstream/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

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: bookinfo-redis

spec:

host: myredissrv.prod.svc.cluster.local
trafficPolicy:
  connectionPool:
    tcp:
      maxConnections: 100
      connectTimeout: 30ms
      tcpKeepalive:
        time: 7200s
        interval: 75s

```

func (*ConnectionPoolSettings) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPoolSettings.

func (*ConnectionPoolSettings) DeepCopyInto

func (in *ConnectionPoolSettings) DeepCopyInto(out *ConnectionPoolSettings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConsistentHashLB

type ConsistentHashLB struct {
	// It is required to specify exactly one of these fields as hash key
	// HTTPHeaderName, HTTPCookie, or UseSourceIP.
	// Hash based on a specific HTTP header.
	HTTPHeaderName *string `json:"httpHeaderName,omitempty"`

	// Hash based on HTTP cookie.
	HTTPCookie *HTTPCookie `json:"httpCookie,omitempty"`

	// Hash based on the source IP address.
	UseSourceIP *bool `json:"useSourceIp,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 *uint64 `json:"minimumRingSize,omitempty"`
}

Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service.

func (*ConsistentHashLB) DeepCopy

func (in *ConsistentHashLB) DeepCopy() *ConsistentHashLB

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsistentHashLB.

func (*ConsistentHashLB) DeepCopyInto

func (in *ConsistentHashLB) DeepCopyInto(out *ConsistentHashLB)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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

	// List of HTTP methods allowed to access the resource. The content will
	// be serialized into the Access-Control-Allow-Methods header.
	AllowMethods []string `json:"allowMethods,omitempty"`

	// List of HTTP headers that can be used when requesting the
	// resource. Serialized to Access-Control-Allow-Methods header.
	AllowHeaders []string `json:"allowHeaders,omitempty"`

	// A white list of HTTP headers that the browsers are allowed to
	// access. Serialized into Access-Control-Expose-Headers header.
	ExposeHeaders []string `json:"exposeHeaders,omitempty"`

	// Specifies how long the results of a preflight request can be
	// cached. Translates to the `Access-Control-Max-Age` header.
	MaxAge *string `json:"maxAge,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 *bool `json:"allowCredentials,omitempty"`
}

Describes the Cross-Origin Resource Sharing (CORS) policy, for a given service. Refer to [CORS](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.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: ratings-route

spec:

hosts:
- ratings.prod.svc.cluster.local
http:
- route:
  - destination:
      host: ratings.prod.svc.cluster.local
      subset: v1
  corsPolicy:
    allowOrigin:
    - example.com
    allowMethods:
    - POST
    - GET
    allowCredentials: false
    allowHeaders:
    - X-Foo-Bar
    maxAge: "24h"

```

func (*CorsPolicy) DeepCopy

func (in *CorsPolicy) DeepCopy() *CorsPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorsPolicy.

func (*CorsPolicy) DeepCopyInto

func (in *CorsPolicy) DeepCopyInto(out *CorsPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Delay

type Delay struct {
	// REQUIRED. Add a fixed delay before forwarding the request. Format:
	// 1h/1m/1s/1ms. MUST be >=1ms.
	FixedDelay string `json:"fixedDelay"`

	// Percentage of requests on which the delay will be injected.
	Percentage *Percentage `json:"percentage,omitempty"`
}

Delay specification is used to inject latency into the request forwarding path. The following example will introduce a 5 second delay in 1 out of every 1000 requests to the "v1" version of the "reviews" service from all pods with label env: prod

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: reviews-route

spec:

hosts:
- reviews.prod.svc.cluster.local
http:
- match:
  - sourceLabels:
      env: prod
  route:
  - destination:
      host: reviews.prod.svc.cluster.local
      subset: v1
  fault:
    delay:
      percentage:
        value: 0.1
      fixedDelay: 5s

```

The _fixedDelay_ field is used to indicate the amount of delay in seconds. The optional _percentage_ field can be used to only delay a certain percentage of requests. If left unspecified, all request will be delayed.

func (*Delay) DeepCopy

func (in *Delay) DeepCopy() *Delay

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Delay.

func (*Delay) DeepCopyInto

func (in *Delay) DeepCopyInto(out *Delay)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Destination

type Destination struct {
	// REQUIRED. The name of a service from the service registry. Service
	// names are looked up from the platform's service registry (e.g.,
	// Kubernetes services, Consul services, etc.) and from the hosts
	// declared by [ServiceEntry](https://istio.io/docs/reference/config/networking/v1alpha3/service-entry/#ServiceEntry). Traffic forwarded to
	// destinations that are not found in either of the two, will be dropped.
	//
	// *Note for Kubernetes users*: When short names are used (e.g. "reviews"
	// instead of "reviews.default.svc.cluster.local"), Istio will interpret
	// the short name based on the namespace of the rule, not the service. A
	// rule in the "default" namespace containing a host "reviews will be
	// interpreted as "reviews.default.svc.cluster.local", irrespective of
	// the actual namespace associated with the reviews service. _To avoid
	// potential misconfigurations, it is recommended to always use fully
	// qualified domain names over short names._
	Host string `json:"host"`

	// 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 `json:"subset,omitempty"`

	// Specifies the port on the host that is being addressed. If a service
	// exposes only a single port it is not required to explicitly select the
	// port.
	Port *PortSelector `json:"port,omitempty"`
}

Destination indicates the network addressable service to which the request/connection will be sent after processing a routing rule. The destination.host should unambiguously refer to a service in the service registry. Istio's service registry is composed of all the services found in the platform's service registry (e.g., Kubernetes services, Consul services), as well as services declared through the ServiceEntry(https://istio.io/docs/reference/config/networking/v1alpha3/service-entry/#ServiceEntry) resource.

*Note for Kubernetes users*: When short names are used (e.g. "reviews" instead of "reviews.default.svc.cluster.local"), Istio will interpret the short name based on the namespace of the rule, not the service. A rule in the "default" namespace containing a host "reviews will be interpreted as "reviews.default.svc.cluster.local", irrespective of the actual namespace associated with the reviews service. _To avoid potential misconfigurations, it is recommended to always use fully qualified domain names over short names._

The following Kubernetes 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.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: reviews-route
namespace: foo

spec:

hosts:
- reviews # interpreted as reviews.foo.svc.cluster.local
http:
- match:
  - uri:
      prefix: "/wpcatalog"
  - uri:
      prefix: "/consumercatalog"
  rewrite:
    uri: "/newcatalog"
  route:
  - destination:
      host: reviews # interpreted as reviews.foo.svc.cluster.local
      subset: v2
- route:
  - destination:
      host: reviews # interpreted as reviews.foo.svc.cluster.local
      subset: v1

```

And the associated DestinationRule

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: reviews-destination
namespace: foo

spec:

host: reviews # interpreted as reviews.foo.svc.cluster.local
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.svc.cluster.local service in Kubernetes. Notice that there are no subsets defined in this rule. Istio will fetch all instances of productpage.prod.svc.cluster.local service from the service registry and populate the sidecar's load balancing pool. Also, notice that this rule is set in the istio-system namespace but uses the fully qualified domain name of the productpage service, productpage.prod.svc.cluster.local. Therefore the rule's namespace does not have an impact in resolving the name of the productpage service.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: my-productpage-rule
namespace: istio-system

spec:

hosts:
- productpage.prod.svc.cluster.local # ignores rule namespace
http:
- timeout: 5s
  route:
  - destination:
      host: productpage.prod.svc.cluster.local

```

To control routing for traffic bound to services outside the mesh, external services must first be added to Istio's internal service registry using the ServiceEntry resource. VirtualServices can then be defined to control traffic bound to these external services. For example, the following rules define a Service for wikipedia.org and set a timeout of 5s for http requests.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:

name: external-svc-wikipedia

spec:

hosts:
- wikipedia.org
location: MESH_EXTERNAL
ports:
- number: 80
  name: example-http
  protocol: HTTP
resolution: DNS

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) DeepCopy

func (in *Destination) DeepCopy() *Destination

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Destination.

func (*Destination) DeepCopyInto

func (in *Destination) DeepCopyInto(out *Destination)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DestinationRule

type DestinationRule struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              DestinationRuleSpec `json:"spec"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object DestinationRule

func (*DestinationRule) DeepCopy

func (in *DestinationRule) DeepCopy() *DestinationRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRule.

func (*DestinationRule) DeepCopyInto

func (in *DestinationRule) DeepCopyInto(out *DestinationRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DestinationRule) DeepCopyObject

func (in *DestinationRule) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DestinationRuleList

type DestinationRuleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []DestinationRule `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object DestinationRuleList is a list of DestinationRule resources

func (*DestinationRuleList) DeepCopy

func (in *DestinationRuleList) DeepCopy() *DestinationRuleList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRuleList.

func (*DestinationRuleList) DeepCopyInto

func (in *DestinationRuleList) DeepCopyInto(out *DestinationRuleList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DestinationRuleList) DeepCopyObject

func (in *DestinationRuleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DestinationRuleSpec

type DestinationRuleSpec struct {
	// REQUIRED. The name of a service from the service registry. Service
	// names are looked up from the platform's service registry (e.g.,
	// Kubernetes services, Consul services, etc.) and from the hosts
	// declared by [ServiceEntries](https://istio.io/docs/reference/config/networking/v1alpha3/service-entry/#ServiceEntry). Rules defined for
	// services that do not exist in the service registry will be ignored.
	//
	// *Note for Kubernetes users*: When short names are used (e.g. "reviews"
	// instead of "reviews.default.svc.cluster.local"), Istio will interpret
	// the short name based on the namespace of the rule, not the service. A
	// rule in the "default" namespace containing a host "reviews" will be
	// interpreted as "reviews.default.svc.cluster.local", irrespective of
	// the actual namespace associated with the reviews service. _To avoid
	// potential misconfigurations, it is recommended to always use fully
	// qualified domain names over short names._
	//
	// Note that the host field applies to both HTTP and TCP services.
	Host string `json:"host"`

	// Traffic policies to apply (load balancing policy, connection pool
	// sizes, outlier detection).
	TrafficPolicy *TrafficPolicy `json:"trafficPolicy,omitempty"`

	// One or more named sets that represent individual versions of a
	// service. Traffic policies can be overridden at subset level.
	Subsets []Subset `json:"subsets,omitempty"`

	// A list of namespaces to which this destination rule is exported.
	// The resolution of a destination rule to apply to a service occurs in the
	// context of a hierarchy of namespaces. Exporting a destination rule allows
	// it to be included in the resolution hierarchy for services in
	// other namespaces. This feature provides a mechanism for service owners
	// and mesh administrators to control the visibility of destination rules
	// across namespace boundaries.
	//
	// If no namespaces are specified then the destination rule is exported to all
	// namespaces by default.
	//
	// The value "." is reserved and defines an export to the same namespace that
	// the destination rule is declared in. Similarly, the value "*" is reserved and
	// defines an export to all namespaces.
	//
	// NOTE: in the current release, the `exportTo` value is restricted to
	// "." or "*" (i.e., the current namespace or all namespaces).
	ExportTo []string `json:"exportTo,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:

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: bookinfo-ratings

spec:

host: ratings.prod.svc.cluster.local
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).

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: bookinfo-ratings

spec:

host: ratings.prod.svc.cluster.local
trafficPolicy:
  loadBalancer:
    simple: LEAST_CONN
subsets:
- name: testversion
  labels:
    version: v3
  trafficPolicy:
    loadBalancer:
      simple: ROUND_ROBIN

```

**Note:** Policies specified for subsets will not take effect until a route rule explicitly sends traffic to this subset.

Traffic policies can be customized to specific ports as well. The following rule uses the least connection load balancing policy for all traffic to port 80, while uses a round robin load balancing setting for traffic to the port 9080.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: bookinfo-ratings-port

spec:

host: ratings.prod.svc.cluster.local
trafficPolicy: # Apply to all ports
  portLevelSettings:
  - port:
      number: 80
    loadBalancer:
      simple: LEAST_CONN
  - port:
      number: 9080
    loadBalancer:
      simple: ROUND_ROBIN

```

func (*DestinationRuleSpec) DeepCopy

func (in *DestinationRuleSpec) DeepCopy() *DestinationRuleSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRuleSpec.

func (*DestinationRuleSpec) DeepCopyInto

func (in *DestinationRuleSpec) DeepCopyInto(out *DestinationRuleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EnvoyConfigObjectMatch

type EnvoyConfigObjectMatch struct {
	// The specific config generation context to match on. Istio Pilot
	// generates envoy configuration in the context of a gateway,
	// inbound traffic to sidecar and outbound traffic from sidecar.
	Context PatchContext `json:"context"`
	// Match on properties associated with a proxy.
	Proxy *ProxyMatch `json:"proxy,omitempty"`
	// Types that are valid to be assigned to ObjectTypes:
	//	*Listener
	//	*RouteConfiguration
	//	*Cluster
	Listener           *ListenerMatch           `json:"listener,omitempty"`
	RouteConfiguration *RouteConfigurationMatch `json:"routeConfiguration,omitempty"`
	Cluster            *ClusterMatch            `json:"cluster,omitempty"`
}

One or more match conditions to be met before a patch is applied to the generated configuration for a given proxy.

func (*EnvoyConfigObjectMatch) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyConfigObjectMatch.

func (*EnvoyConfigObjectMatch) DeepCopyInto

func (in *EnvoyConfigObjectMatch) DeepCopyInto(out *EnvoyConfigObjectMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EnvoyConfigObjectPatch

type EnvoyConfigObjectPatch struct {
	// Specifies where in the Envoy configuration, the patch should be
	// applied.  The match is expected to select the appropriate
	// object based on applyTo.  For example, an applyTo with
	// HTTP_FILTER is expected to have a match condition on the
	// listeners, with a network filter selection on
	// envoy.http_connection_manager and a sub filter selection on the
	// HTTP filter relative to which the insertion should be
	// performed. Similarly, an applyTo on CLUSTER should have a match
	// (if provided) on the cluster and not on a listener.
	ApplyTo ApplyTo `json:"applyTo,omitempty"`
	// Match on listener/route configuration/cluster.
	Match *EnvoyConfigObjectMatch `json:"match,omitempty"`
	// The patch to apply along with the operation.
	Patch *Patch `json:"patch,omitempty"`
}

Changes to be made to various envoy config objects.

func (*EnvoyConfigObjectPatch) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyConfigObjectPatch.

func (*EnvoyConfigObjectPatch) DeepCopyInto

func (in *EnvoyConfigObjectPatch) DeepCopyInto(out *EnvoyConfigObjectPatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EnvoyFilter

type EnvoyFilter struct {
	v1.TypeMeta `json:",inline"`
	// +optional
	v1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the implementation of this definition.
	// +optional
	Spec EnvoyFilterSpec `json:"spec,omitempty"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object EnvoyFilter

func (*EnvoyFilter) DeepCopy

func (in *EnvoyFilter) DeepCopy() *EnvoyFilter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilter.

func (*EnvoyFilter) DeepCopyInto

func (in *EnvoyFilter) DeepCopyInto(out *EnvoyFilter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EnvoyFilter) DeepCopyObject

func (in *EnvoyFilter) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EnvoyFilterList

type EnvoyFilterList struct {
	v1.TypeMeta `json:",inline"`
	// +optional
	v1.ListMeta `json:"metadata"`
	Items       []EnvoyFilter `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object EnvoyFilterList is a collection of EnvoyFilters.

func (*EnvoyFilterList) DeepCopy

func (in *EnvoyFilterList) DeepCopy() *EnvoyFilterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilterList.

func (*EnvoyFilterList) DeepCopyInto

func (in *EnvoyFilterList) DeepCopyInto(out *EnvoyFilterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EnvoyFilterList) DeepCopyObject

func (in *EnvoyFilterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EnvoyFilterSpec

type EnvoyFilterSpec struct {
	WorkloadSelector *WorkloadSelector `json:"workloadSelector,omitempty"`
	// One or more patches with match conditions.
	ConfigPatches []*EnvoyConfigObjectPatch `json:"configPatches,omitempty"`
}

`EnvoyFilter` provides a mechanism to customize the Envoy configuration generated by Istio Pilot. Use EnvoyFilter to modify values for certain fields, add specific filters, or even add entirely new listeners, clusters, etc. This feature must be used with care, as incorrect configurations could potentially destabilize the entire mesh. Unlike other Istio networking objects, EnvoyFilters are additively applied. Any number of EnvoyFilters can exist for a given workload in a specific namespace. The order of application of these EnvoyFilters is as follows: all EnvoyFilters in the config [root namespace](https://istio.io/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig), followed by all matching EnvoyFilters in the workload's namespace.

**NOTE 1**: Some aspects of this API is deeply tied to the internal implementation in Istio networking subsystem as well as Envoy's XDS API. While the EnvoyFilter API by itself will maintain backward compatibility, any envoy configuration provided through this mechanism should be carefully monitored across Istio proxy version upgrades, to ensure that deprecated fields are removed and replaced appropriately.

**NOTE 2**: When multiple EnvoyFilters are bound to the same workload in a given namespace, all patches will be processed sequentially in order of creation time. The behavior is undefined if multiple EnvoyFilter configurations conflict with each other.

**NOTE 3**: *_To apply an EnvoyFilter resource to all workloads (sidecars and gateways) in the system, define the resource in the config [root namespace](https://istio.io/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig), without a workloadSelector.

The example below declares a global default EnvoyFilter resource in the root namespace called `istio-config`, that adds a custom protocol filter on all sidecars in the system, for outbound port 9307. The filter should be added before the terminating tcp_proxy filter to take effect. In addition, it sets a 30s idle timeout for all HTTP connections in both gateays and sidecars.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: EnvoyFilter metadata:

name: custom-protocol
namespace: istio-config # as defined in meshConfig resource.

spec:

configPatches:
- applyTo: NETWORK_FILTER
  match:
    context: SIDECAR_OUTBOUND # will match outbound listeners in all sidecars
    listener:
      portNumber: 9307
      filterChain:
        filter:
          name: "envoy.tcp_proxy"
  patch:
    operation: INSERT_BEFORE
    value:
      # This is the full filter config including the name and config or typed_config section.
      name: "envoy.config.filter.network.custom_protocol"
      config:
       ...
- applyTo: NETWORK_FILTER # http connection manager is a filter in Envoy
  match:
    # context omitted so that this applies to both sidecars and gateways
    listener:
      filterChain:
        filter:
          name: "envoy.http_connection_manager"
  patch:
    operation: MERGE
    value:
      name: "envoy.http_connection_manager"
      typed_config:
        "@type": "type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager"
        common_http_protocol_options:
          idle_timeout: 30s

```

The following example enables Envoy's Lua filter for all inbound HTTP calls arriving at service port 8080 of the reviews service pod with labels "app: reviews", in the bookinfo namespace. The lua filter calls out to an external service internal.org.net:8888 that requires a special cluster definition in envoy. The cluster is also added to the sidecar as part of this configuration.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: EnvoyFilter metadata:

name: reviews-lua
namespace: bookinfo

spec:

workloadSelector:
  labels:
    app: reviews
configPatches:
  # The first patch adds the lua filter to the listener/http connection manager
- applyTo: HTTP_FILTER
  match:
    context: SIDECAR_INBOUND
    listener:
      portNumber: 8080
      filterChain:
        filter:
          name: "envoy.http_connection_manager"
          subFilter:
            name: "envoy.router"
  patch:
    operation: INSERT_BEFORE
    value: # lua filter specification
     name: envoy.lua
     typed_config:
       "@type": "type.googleapis.com/envoy.config.filter.http.lua.v2.Lua"
       inlineCode: |
         function envoy_on_request(request_handle)
           -- Make an HTTP call to an upstream host with the following headers, body, and timeout.
           local headers, body = request_handle:httpCall(
            "lua_cluster",
            {
             [":method"] = "POST",
             [":path"] = "/acl",
             [":authority"] = "internal.org.net"
            },
           "authorize call",
           5000)
         end
# The second patch adds the cluster that is referenced by the lua code
# cds match is omitted as a new cluster is being added
- applyTo: CLUSTER
  match:
    context: SIDECAR_OUTBOUND
  patch:
    operation: ADD
    value: # cluster specification
      name: "lua_cluster"
      type: STRICT_DNS
      connect_timeout: 0.5s
      lb_policy: ROUND_ROBIN
      hosts:
      - socket_address:
          protocol: TCP
          address: "internal.org.net"
          port_value: 8888

```

The following example overwrites certain fields (HTTP idle timeout and X-Forward-For trusted hops) in the HTTP connection manager in a listener on the ingress gateway in istio-system namespace for the SNI host app.example.com:

```yaml apiVersion: networking.istio.io/v1alpha3 kind: EnvoyFilter metadata:

name: hcm-tweaks
namespace: istio-system

spec:

workloadSelector:
  labels:
    istio: ingress-gateway
configPatches:
- applyTo: NETWORK_FILTER # http connection manager is a filter in Envoy
  match:
    context: GATEWAY
    listener:
      filterChain:
        sni: app.example.com
        filter:
          name: "envoy.http_connection_manager"
  patch:
    operation: MERGE
    value:
      common_http_protocol_options:
        idle_timeout: 30s
      xff_num_trusted_hops: 5

```

func (*EnvoyFilterSpec) DeepCopy

func (in *EnvoyFilterSpec) DeepCopy() *EnvoyFilterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilterSpec.

func (*EnvoyFilterSpec) DeepCopyInto

func (in *EnvoyFilterSpec) DeepCopyInto(out *EnvoyFilterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExecHealthCheckConfig added in v0.0.12

type ExecHealthCheckConfig struct {
	// Command to run. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
	Command []string `json:"command,omitempty"`
}

func (*ExecHealthCheckConfig) DeepCopy added in v0.0.12

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecHealthCheckConfig.

func (*ExecHealthCheckConfig) DeepCopyInto added in v0.0.12

func (in *ExecHealthCheckConfig) DeepCopyInto(out *ExecHealthCheckConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FilterChainMatch

type FilterChainMatch struct {
	// The name assigned to the filter chain.
	Name string `json:"name,omitempty"`
	// The SNI value used by a filter chain's match condition.  This
	// condition will evaluate to false if the filter chain has no
	// sni match.
	SNI string `json:"sni,omitempty"`
	// Applies only to SIDECAR_INBOUND context. If non-empty, a
	// transport protocol to consider when determining a filter
	// chain match.  This value will be compared against the
	// transport protocol of a new connection, when it's detected by
	// the tls_inspector listener filter.
	//
	// Accepted values include:
	//
	// * `raw_buffer` - default, used when no transport protocol is detected.
	// * `tls` - set when TLS protocol is detected by the TLS inspector.
	TransportProtocol string `json:"transportProtocol,omitempty"`
	// Applies only to sidecars. If non-empty, a comma separated set
	// of application protocols to consider when determining a
	// filter chain match.  This value will be compared against the
	// application protocols of a new connection, when it's detected
	// by one of the listener filters such as the http_inspector.
	//
	// Accepted values include: h2,http/1.1,http/1.0
	ApplicationProtocols string `json:"applicationProtocols,omitempty"`
	// The name of a specific filter to apply the patch to. Set this
	// to envoy.http_connection_manager to add a filter or apply a
	// patch to the HTTP connection manager.
	Filter *FilterMatch `json:"filter,omitempty"`
}

For listeners with multiple filter chains (e.g., inbound listeners on sidecars with permissive mTLS, gateway listeners with multiple SNI matches), the filter chain match can be used to select a specific filter chain to patch.

func (*FilterChainMatch) DeepCopy

func (in *FilterChainMatch) DeepCopy() *FilterChainMatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FilterChainMatch.

func (*FilterChainMatch) DeepCopyInto

func (in *FilterChainMatch) DeepCopyInto(out *FilterChainMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FilterMatch

type FilterMatch struct {
	// The filter name to match on.
	Name string `json:"name,omitempty"`
	// The next level filter within this filter to match
	// upon. Typically used for HTTP Connection Manager filters and
	// Thrift filters.
	SubFilter *SubFilterMatch `json:"subFilter,omitempty"`
}

Conditions to match a specific filter within a filter chain.

func (*FilterMatch) DeepCopy

func (in *FilterMatch) DeepCopy() *FilterMatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FilterMatch.

func (*FilterMatch) DeepCopyInto

func (in *FilterMatch) DeepCopyInto(out *FilterMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Gateway

type Gateway struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec GatewaySpec `json:"spec"`
}

`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 configuration sets up a proxy to act as a load balancer exposing port 80 and 9080 (http), 443 (https), 9443(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.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata:

name: my-gateway
namespace: some-config-namespace

spec:

selector:
  app: my-gateway-controller
servers:
- port:
    number: 80
    name: http
    protocol: HTTP
  hosts:
  - uk.bookinfo.com
  - eu.bookinfo.com
  tls:
    httpsRedirect: true # sends 301 redirect for http requests
- port:
    number: 443
    name: https-443
    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: 9443
    name: https-9443
    protocol: HTTPS
  hosts:
  - "bookinfo-namespace/*.bookinfo.com"
  tls:
    mode: SIMPLE # enables HTTPS on this port
    credentialName: bookinfo-secret # fetches certs from Kubernetes secret
- port:
    number: 9080
    name: http-wildcard
    protocol: HTTP
  hosts:
  - "*"
- port:
    number: 2379 # to expose internal service via external port 2379
    name: mongo
    protocol: MONGO
  hosts:
  - "*"

```

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.svc.cluster.local" 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).

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: bookinfo-rule
namespace: bookinfo-namespace

spec:

hosts:
- reviews.prod.svc.cluster.local
- uk.bookinfo.com
- eu.bookinfo.com
gateways:
- some-config-namespace/my-gateway
- mesh # applies to all the sidecars in the mesh
http:
- match:
  - headers:
      cookie:
        exact: "user=dev-123"
  route:
  - destination:
      port:
        number: 7777
      host: reviews.qa.svc.cluster.local
- match:
  - uri:
      prefix: /reviews/
  route:
  - destination:
      port:
        number: 9080 # can be omitted if it's the only port for reviews
      host: reviews.prod.svc.cluster.local
    weight: 80
  - destination:
      host: reviews.qa.svc.cluster.local
    weight: 20

```

The following VirtualService forwards traffic arriving at (external) port 27017 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`.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: bookinfo-Mongo
namespace: bookinfo-namespace

spec:

hosts:
- mongosvr.prod.svc.cluster.local # name of internal Mongo service
gateways:
- some-config-namespace/my-gateway # can omit the namespace if gateway is in same
                                     namespace as virtual service.
tcp:
- match:
  - port: 27017
  route:
  - destination:
      host: mongo.prod.svc.cluster.local
      port:
        number: 5555

```

It is possible to restrict the set of virtual services that can bind to a gateway server using the namespace/hostname syntax in the hosts field. For example, the following Gateway allows any virtual service in the ns1 namespace to bind to it, while restricting only the virtual service with foo.bar.com host in the ns2 namespace to bind to it.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata:

name: my-gateway
namespace: some-config-namespace

spec:

selector:
  app: my-gateway-controller
servers:
- port:
    number: 80
    name: http
    protocol: HTTP
  hosts:
  - "ns1/*"
  - "ns2/foo.bar.com"

```

func (*Gateway) DeepCopy

func (in *Gateway) DeepCopy() *Gateway

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gateway.

func (*Gateway) DeepCopyInto

func (in *Gateway) DeepCopyInto(out *Gateway)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Gateway) DeepCopyObject

func (in *Gateway) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GatewayList

type GatewayList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Gateway `json:"items"`
}

GatewayList is a list of Gateway resources

func (*GatewayList) DeepCopy

func (in *GatewayList) DeepCopy() *GatewayList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayList.

func (*GatewayList) DeepCopyInto

func (in *GatewayList) DeepCopyInto(out *GatewayList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GatewayList) DeepCopyObject

func (in *GatewayList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GatewaySpec

type GatewaySpec struct {
	// REQUIRED: A list of server specifications.
	Servers []Server `json:"servers"`

	// REQUIRED: One or more labels that indicate a specific set of pods/VMs
	// on which this gateway configuration should be applied. The scope of
	// label search is restricted to the configuration namespace in which the
	// the resource is present. In other words, the Gateway resource must
	// reside in the same namespace as the gateway workload instance.
	Selector map[string]string `json:"selector,omitempty"`
}

func (*GatewaySpec) DeepCopy

func (in *GatewaySpec) DeepCopy() *GatewaySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewaySpec.

func (*GatewaySpec) DeepCopyInto

func (in *GatewaySpec) DeepCopyInto(out *GatewaySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type H2UpgradePolicy

type H2UpgradePolicy string
const (
	// Use the global default.
	H2UpgradePolicyDefault H2UpgradePolicy = "DEFAULT"

	// Do not upgrade the connection to http2.
	// This opt-out option overrides the default.
	H2UpgradePolicyDoNotUpgrade H2UpgradePolicy = "DO_NOT_UPGRADE"

	// Upgrade the connection to http2.
	// This opt-in option overrides the default.
	H2UpgradePolicyUpgrade H2UpgradePolicy = "UPGRADE"
)

type HTTPCookie

type HTTPCookie struct {
	// REQUIRED. Name of the cookie.
	Name string `json:"name"`

	// Path to set for the cookie.
	Path *string `json:"path,omitempty"`

	// REQUIRED. Lifetime of the cookie.
	TTL string `json:"ttl"`
}

Describes a HTTP cookie that will be used as the hash key for the Consistent Hash load balancer. If the cookie is not present, it will be generated.

func (*HTTPCookie) DeepCopy

func (in *HTTPCookie) DeepCopy() *HTTPCookie

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPCookie.

func (*HTTPCookie) DeepCopyInto

func (in *HTTPCookie) DeepCopyInto(out *HTTPCookie)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPFaultInjection

type HTTPFaultInjection struct {
	// Delay requests before forwarding, emulating various failures such as
	// network issues, overloaded upstream service, etc.
	Delay *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 *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) DeepCopy

func (in *HTTPFaultInjection) DeepCopy() *HTTPFaultInjection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPFaultInjection.

func (*HTTPFaultInjection) DeepCopyInto

func (in *HTTPFaultInjection) DeepCopyInto(out *HTTPFaultInjection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPHeader added in v0.0.12

type HTTPHeader struct {
	// The header field name
	Name string `json:"name,omitempty"`
	// The header field value
	Value string `json:"value,omitempty"`
}

func (*HTTPHeader) DeepCopy added in v0.0.12

func (in *HTTPHeader) DeepCopy() *HTTPHeader

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPHeader.

func (*HTTPHeader) DeepCopyInto added in v0.0.12

func (in *HTTPHeader) DeepCopyInto(out *HTTPHeader)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPHealthCheckConfig added in v0.0.12

type HTTPHealthCheckConfig struct {
	// Path to access on the HTTP server.
	Path string `json:"path,omitempty"`
	// REQUIRED. Port on which the endpoint lives.
	Port uint32 `json:"port"`
	// Host to connect to, defaults to the pod IP. You probably want to set
	// "Host" in httpHeaders instead.
	Host string `json:"host,omitempty"`
	// HTTP or HTTPS, defaults to HTTP.
	Scheme string `json:"scheme,omitempty"`
	// Headers the proxy will pass on to make the request.
	// Allows repeated headers.
	HTTPHeaders []*HTTPHeader `json:"httpHeaders,omitempty"`
}

func (*HTTPHealthCheckConfig) DeepCopy added in v0.0.12

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPHealthCheckConfig.

func (*HTTPHealthCheckConfig) DeepCopyInto added in v0.0.12

func (in *HTTPHealthCheckConfig) DeepCopyInto(out *HTTPHealthCheckConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPMatchRequest

type HTTPMatchRequest struct {
	// The name assigned to a match. The match's name will be
	// concatenated with the parent route's name and will be logged in
	// the access logs for requests matching this route.
	Name *string `json:"name,omitempty"`

	// URI to match
	// values are case-sensitive and formatted as follows:
	//
	// - `exact: "value"` for exact string match
	//
	// - `prefix: "value"` for prefix-based match
	//
	// - `regex: "value"` for ECMAscript style regex-based match
	//
	// **Note:** Case-insensitive matching could be enabled via the
	// `ignore_uri_case` flag.
	URI *v1alpha1.StringMatch `json:"uri,omitempty"`

	// URI Scheme
	// values are case-sensitive and formatted as follows:
	//
	// - `exact: "value"` for exact string match
	//
	// - `prefix: "value"` for prefix-based match
	//
	// - `regex: "value"` for ECMAscript style regex-based match
	//
	Scheme *v1alpha1.StringMatch `json:"scheme,omitempty"`

	// HTTP Method
	// values are case-sensitive and formatted as follows:
	//
	// - `exact: "value"` for exact string match
	//
	// - `prefix: "value"` for prefix-based match
	//
	// - `regex: "value"` for ECMAscript style regex-based match
	//
	Method *v1alpha1.StringMatch `json:"method,omitempty"`

	// HTTP Authority
	// values are case-sensitive and formatted as follows:
	//
	// - `exact: "value"` for exact string match
	//
	// - `prefix: "value"` for prefix-based match
	//
	// - `regex: "value"` for ECMAscript style regex-based match
	//
	Authority *v1alpha1.StringMatch `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"` 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]v1alpha1.StringMatch `json:"headers,omitempty"`

	// 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.
	Port *uint32 `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 must include the reserved gateway
	// `mesh` for this field to be applicable.
	SourceLabels map[string]string `json:"sourceLabels,omitempty"`

	// Query parameters for matching.
	//
	// Ex:
	// - For a query parameter like "?key=true", the map key would be "key" and
	//   the string match could be defined as `exact: "true"`.
	// - For a query parameter like "?key", the map key would be "key" and the
	//   string match could be defined as `exact: ""`.
	// - For a query parameter like "?key=123", the map key would be "key" and the
	//   string match could be defined as `regex: "\d+$"`. Note that this
	//   configuration will only match values like "123" but not "a123" or "123a".
	//
	// **Note:** `prefix` matching is currently not supported.
	QueryParams map[string]*v1alpha1.StringMatch `json:"queryParams,omitempty"`

	// Flag to specify whether the URI matching should be case-insensitive.
	//
	// **Note:** The case will be ignored only in the case of `exact` and `prefix`
	// URI matches.
	IgnoreURICase *bool `json:"ignoreUriCase,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 custom `end-user` header with value `jason`.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: ratings-route

spec:

hosts:
- ratings.prod.svc.cluster.local
http:
- match:
  - headers:
      end-user:
        exact: jason
    uri:
      prefix: "/ratings/v2/"
    ignoreUriCase: true
  route:
  - destination:
      host: ratings.prod.svc.cluster.local

```

HTTPMatchRequest CANNOT be empty.

func (*HTTPMatchRequest) DeepCopy

func (in *HTTPMatchRequest) DeepCopy() *HTTPMatchRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPMatchRequest.

func (*HTTPMatchRequest) DeepCopyInto

func (in *HTTPMatchRequest) DeepCopyInto(out *HTTPMatchRequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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

	// On a redirect, overwrite the Authority/Host portion of the URL with
	// this value.
	Authority *string `json:"authority,omitempty"`

	// On a redirect, Specifies the HTTP status code to use in the redirect
	// response. The default response code is MOVED_PERMANENTLY (301).
	RedirectCode *uint32 `json:"redirectCode,omitempty"`
}

HTTPRedirect can be used to send a 301 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.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: ratings-route

spec:

hosts:
- ratings.prod.svc.cluster.local
http:
- match:
  - uri:
      exact: /v1/getProductRatings
  redirect:
    uri: /v1/bookRatings
    authority: newratings.default.svc.cluster.local
...

```

func (*HTTPRedirect) DeepCopy

func (in *HTTPRedirect) DeepCopy() *HTTPRedirect

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRedirect.

func (*HTTPRedirect) DeepCopyInto

func (in *HTTPRedirect) DeepCopyInto(out *HTTPRedirect)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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 int `json:"attempts"`

	// Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms.
	PerTryTimeout string `json:"perTryTimeout"`

	// Specifies the conditions under which retry takes place.
	// One or more policies can be specified using a ‘,’ delimited list.
	// See the [retry policies](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-on)
	// and [gRPC retry policies](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-grpc-on) for more details.
	RetryOn *string `json:"retryOn,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.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: ratings-route

spec:

hosts:
- ratings.prod.svc.cluster.local
http:
- route:
  - destination:
      host: ratings.prod.svc.cluster.local
      subset: v1
  retries:
    attempts: 3
    perTryTimeout: 2s
    retryOn: gateway-error,connect-failure,refused-stream

```

func (*HTTPRetry) DeepCopy

func (in *HTTPRetry) DeepCopy() *HTTPRetry

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRetry.

func (*HTTPRetry) DeepCopyInto

func (in *HTTPRetry) DeepCopyInto(out *HTTPRetry)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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

	// rewrite the Authority/Host header with this value.
	Authority *string `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 HTTPRouteDestination. The following example demonstrates how to rewrite the URL prefix for api call (/ratings) to ratings service before making the actual API call.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: ratings-route

spec:

hosts:
- ratings.prod.svc.cluster.local
http:
- match:
  - uri:
      prefix: /ratings
  rewrite:
    uri: /v1/bookRatings
  route:
  - destination:
      host: ratings.prod.svc.cluster.local
      subset: v1

```

func (*HTTPRewrite) DeepCopy

func (in *HTTPRewrite) DeepCopy() *HTTPRewrite

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRewrite.

func (*HTTPRewrite) DeepCopyInto

func (in *HTTPRewrite) DeepCopyInto(out *HTTPRewrite)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPRoute

type HTTPRoute struct {
	// The name assigned to the route for debugging purposes. The
	// route's name will be concatenated with the match's name and will
	// be logged in the access logs for requests matching this
	// route/match.
	Name *string `json:"name,omitempty"`

	// 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 `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 []*HTTPRouteDestination `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 301 redirect to a different URI or Authority.
	Redirect *HTTPRedirect `json:"redirect,omitempty"`

	// Rewrite HTTP URIs and Authority headers. Rewrite cannot be used with
	// Redirect primitive. Rewrite will be performed before forwarding.
	Rewrite *HTTPRewrite `json:"rewrite,omitempty"`

	// Timeout for HTTP requests.
	Timeout *string `json:"timeout,omitempty"`

	// Retry policy for HTTP requests.
	Retries *HTTPRetry `json:"retries,omitempty"`

	// Fault injection policy to apply on HTTP traffic at the client side.
	// Note that timeouts or retries will not be enabled when faults are
	// enabled on the client side.
	Fault *HTTPFaultInjection `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 `json:"mirror,omitempty"`

	// Percentage of the traffic to be mirrored by the `mirror` field.
	// Use of integer `mirror_percent` value is deprecated. Use the
	// double `mirror_percentage` field instead
	MirrorPercent *uint32 `json:"mirrorPercent,omitempty"`

	// Percentage of the traffic to be mirrored by the `mirror` field.
	// If this field is absent, all the traffic (100%) will be mirrored.
	// Max value is 100.
	MirrorPercentage *Percentage `json:"mirrorPercentage,omitempty"`

	// Cross-Origin Resource Sharing policy (CORS). Refer to
	// [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
	// for further details about cross origin resource sharing.
	CorsPolicy *CorsPolicy `json:"corsPolicy,omitempty"`

	// Header manipulation rules
	Headers *Headers `json:"headers,omitempty"`
}

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

func (*HTTPRoute) DeepCopy

func (in *HTTPRoute) DeepCopy() *HTTPRoute

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRoute.

func (*HTTPRoute) DeepCopyInto

func (in *HTTPRoute) DeepCopyInto(out *HTTPRoute)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPRouteDestination

type HTTPRouteDestination struct {
	// REQUIRED. Destination uniquely identifies the instances of a service
	// to which the request/connection should be forwarded to.
	Destination *Destination `json:"destination"`

	// 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 one destination in a rule, the weight value is assumed to
	// be 100.
	Weight *int `json:"weight,omitempty"`

	// Header manipulation rules
	Headers *Headers `json:"headers,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".

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: reviews-route

spec:

hosts:
- reviews.prod.svc.cluster.local
http:
- route:
  - destination:
      host: reviews.prod.svc.cluster.local
      subset: v2
    weight: 25
  - destination:
      host: reviews.prod.svc.cluster.local
      subset: v1
    weight: 75

```

And the associated DestinationRule

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: reviews-destination

spec:

host: reviews.prod.svc.cluster.local
subsets:
- name: v1
  labels:
    version: v1
- name: v2
  labels:
    version: v2

```

Traffic can also be split across two entirely different services without having to define new subsets. For example, the following rule forwards 25% of traffic to reviews.com to dev.reviews.com

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: reviews-route-two-domains

spec:

hosts:
- reviews.com
http:
- route:
  - destination:
      host: dev.reviews.com
    weight: 25
  - destination:
      host: reviews.com
    weight: 75

```

func (*HTTPRouteDestination) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRouteDestination.

func (*HTTPRouteDestination) DeepCopyInto

func (in *HTTPRouteDestination) DeepCopyInto(out *HTTPRouteDestination)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPSettings

type HTTPSettings struct {
	// Maximum number of pending HTTP requests to a destination. Default 1024.
	HTTP1MaxPendingRequests *int32 `json:"http1MaxPendingRequests,omitempty"`

	// Maximum number of requests to a backend. Default 1024.
	HTTP2MaxRequests *int32 `json:"http2MaxRequests,omitempty"`

	// Maximum number of requests per connection to a backend. Setting this
	// parameter to 1 disables keep alive.
	MaxRequestsPerConnection *int32 `json:"maxRequestsPerConnection,omitempty"`

	// Maximum number of retries that can be outstanding to all hosts in a
	// cluster at a given time. Defaults to 3.
	MaxRetries *int32 `json:"maxRetries,omitempty"`

	// The idle timeout for upstream connection pool connections. The idle timeout is defined as the period in which there are no active requests.
	// If not set, there is no idle timeout. When the idle timeout is reached the connection will be closed.
	// Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
	IdleTimeout *string `json:"idleTimeout,omitempty"`

	// Specify if http1.1 connection should be upgraded to http2 for the associated destination.
	H2UpgradePolicy *H2UpgradePolicy `json:"h2UpgradePolicy,omitempty"`
}

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

func (*HTTPSettings) DeepCopy

func (in *HTTPSettings) DeepCopy() *HTTPSettings

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPSettings.

func (*HTTPSettings) DeepCopyInto

func (in *HTTPSettings) DeepCopyInto(out *HTTPSettings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HeaderOperations

type HeaderOperations struct {
	// Overwrite the headers specified by key with the given values
	Set map[string]string `json:"set,omitempty"`

	// Append the given values to the headers specified by keys
	// (will create a comma-separated list of values)
	Add map[string]string `json:"add,omitempty"`

	// Remove a the specified headers
	Remove []string `json:"remove,omitempty"`
}

HeaderOperations Describes the header manipulations to apply

func (*HeaderOperations) DeepCopy

func (in *HeaderOperations) DeepCopy() *HeaderOperations

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderOperations.

func (*HeaderOperations) DeepCopyInto

func (in *HeaderOperations) DeepCopyInto(out *HeaderOperations)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Headers

type Headers struct {
	// Header manipulation rules to apply before forwarding a request
	// to the destination service
	Request *HeaderOperations `json:"request,omitempty"`

	// Header manipulation rules to apply before returning a response
	// to the caller
	Response *HeaderOperations `json:"response,omitempty"`
}

Message headers can be manipulated when Envoy forwards requests to, or responses from, a destination service. Header manipulation rules can be specified for a specific route destination or for all destinations. The following VirtualService adds a `test` header with the value `true` to requests that are routed to any `reviews` service destination. It also romoves the `foo` response header, but only from responses coming from the `v1` subset (version) of the `reviews` service.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: reviews-route

spec:

hosts:
- reviews.prod.svc.cluster.local
http:
- headers:
    request:
      set:
        test: true
  route:
  - destination:
      host: reviews.prod.svc.cluster.local
      subset: v2
    weight: 25
  - destination:
      host: reviews.prod.svc.cluster.local
      subset: v1
    headers:
      response:
        remove:
        - foo
    weight: 75

```

func (*Headers) DeepCopy

func (in *Headers) DeepCopy() *Headers

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Headers.

func (*Headers) DeepCopyInto

func (in *Headers) DeepCopyInto(out *Headers)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IstioEgressListener

type IstioEgressListener struct {
	// The port associated with the listener. If using Unix domain socket,
	// use 0 as the port number, with a valid protocol. The port if
	// specified, will be used as the default destination port associated
	// with the imported hosts. If the port is omitted, Istio will infer the
	// listener ports based on the imported hosts. Note that when multiple
	// egress listeners are specified, where one or more listeners have
	// specific ports while others have no port, the hosts exposed on a
	// listener port will be based on the listener with the most specific
	// port.
	Port *Port `json:"port,omitempty"`
	// The IP or the Unix domain socket to which the listener should be bound
	// to. Port MUST be specified if bind is not empty. Format: `x.x.x.x` or
	// `unix:///path/to/uds` or `unix://@foobar` (Linux abstract namespace). If
	// omitted, Istio will automatically configure the defaults based on imported
	// services, the workload instances to which this configuration is applied to and
	// the captureMode. If captureMode is `NONE`, bind will default to
	// 127.0.0.1.
	Bind string `json:"bind,omitempty"`
	// When the bind address is an IP, the captureMode option dictates
	// how traffic to the listener is expected to be captured (or not).
	// captureMode must be DEFAULT or `NONE` for Unix domain socket binds.
	CaptureMode CaptureMode `json:"captureMode,omitempty"`
	// One or more service hosts exposed by the listener
	// in `namespace/dnsName` format. Services in the specified namespace
	// matching `dnsName` will be exposed.
	// The corresponding service can be a service in the service registry
	// (e.g., a Kubernetes or cloud foundry service) or a service specified
	// using a `ServiceEntry` or `VirtualService` configuration. Any
	// associated `DestinationRule` in the same namespace will also be used.
	//
	// The `dnsName` should be specified using FQDN format, optionally including
	// a wildcard character in the left-most component (e.g., `prod/*.example.com`).
	// Set the `dnsName` to `*` to select all services from the specified namespace
	// (e.g., `prod/*`).
	//
	// The `namespace` can be set to `*`, `.`, or `~`, representing any, the current,
	// or no namespace, respectively. For example, `*/foo.example.com` selects the
	// service from any available namespace while `./foo.example.com` only selects
	// the service from the namespace of the sidecar. If a host is set to `*/*`,
	// Istio will configure the sidecar to be able to reach every service in the
	// mesh that is exported to the sidecar's namespace. The value `~/*` can be used
	// to completely trim the configuration for sidecars that simply receive traffic
	// and respond, but make no outbound connections of their own.
	//
	// NOTE: Only services and configuration artifacts exported to the sidecar's
	// namespace (e.g., `exportTo` value of `*`) can be referenced.
	// Private configurations (e.g., `exportTo` set to `.`) will
	// not be available. Refer to the `exportTo` setting in `VirtualService`,
	// `DestinationRule`, and `ServiceEntry` configurations for details.
	//
	// **WARNING:** The list of egress hosts in a `SidecarSpec` must also include
	// the Mixer control plane services if they are enabled. Envoy will not
	// be able to reach them otherwise. For example, add host
	// `istio-system/istio-telemetry.istio-system.svc.cluster.local` if telemetry
	// is enabled, `istio-system/istio-policy.istio-system.svc.cluster.local` if
	// policy is enabled, or add `istio-system/*` to allow all services in the
	// `istio-system` namespace. This requirement is temporary and will be removed
	// in a future Istio release.
	Hosts []string `json:"hosts"`
}

IstioEgressListener specifies the properties of an outbound traffic listener on the sidecar proxy attached to a workload instance.

func (*IstioEgressListener) DeepCopy

func (in *IstioEgressListener) DeepCopy() *IstioEgressListener

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IstioEgressListener.

func (*IstioEgressListener) DeepCopyInto

func (in *IstioEgressListener) DeepCopyInto(out *IstioEgressListener)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IstioIngressListener

type IstioIngressListener struct {
	// The port associated with the listener.
	Port *Port `json:"port"`
	// The IP to which the listener should be bound. Must be in the
	// format `x.x.x.x`. Unix domain socket addresses are not allowed in
	// the bind field for ingress listeners. If omitted, Istio will
	// automatically configure the defaults based on imported services
	// and the workload instances to which this configuration is applied
	// to.
	Bind string `json:"bind,omitempty"`
	// The captureMode option dictates how traffic to the listener is
	// expected to be captured (or not).
	CaptureMode CaptureMode `json:"captureMode,omitempty"`
	// The loopback IP endpoint or Unix domain socket to which
	// traffic should be forwarded to. This configuration can be used to
	// redirect traffic arriving at the bind `IP:Port` on the sidecar to a `localhost:port`
	// or Unix domain socket where the application workload instance is listening for
	// connections. Format should be `127.0.0.1:PORT` or `unix:///path/to/socket`
	DefaultEndpoint string `json:"defaultEndpoint"`
}

IstioIngressListener specifies the properties of an inbound traffic listener on the sidecar proxy attached to a workload instance.

func (*IstioIngressListener) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IstioIngressListener.

func (*IstioIngressListener) DeepCopyInto

func (in *IstioIngressListener) DeepCopyInto(out *IstioIngressListener)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type L4MatchAttributes

type L4MatchAttributes struct {
	// IPv4 or IPv6 ip addresses of destination with optional subnet.  E.g.,
	// a.b.c.d/xx form or just a.b.c.d.
	DestinationSubnets []string `json:"destinationSubnets,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.
	Port *int `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 `json:"sourceLabels,omitempty"`

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

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

func (*L4MatchAttributes) DeepCopy

func (in *L4MatchAttributes) DeepCopy() *L4MatchAttributes

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L4MatchAttributes.

func (*L4MatchAttributes) DeepCopyInto

func (in *L4MatchAttributes) DeepCopyInto(out *L4MatchAttributes)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ListenerMatch

type ListenerMatch struct {
	// The service port/gateway port to which traffic is being
	// sent/received. If not specified, matches all listeners. Even though
	// inbound listeners are generated for the instance/pod ports, only
	// service ports should be used to match listeners.
	PortNumber uint32 `json:"portNumber,omitempty"`
	// Instead of using specific port numbers, a set of ports matching
	// a given service's port name can be selected. Matching is case
	// insensitive.
	// Not implemented.
	// $hide_from_docs
	PortName string `json:"portName,omitempty"`
	// Match a specific filter chain in a listener. If specified, the
	// patch will be applied to the filter chain (and a specific
	// filter if specified) and not to other filter chains in the
	// listener.
	FilterChain *FilterChainMatch `json:"filterChain,omitempty"`
	// Match a specific listener by its name. The listeners generated
	// by Pilot are typically named as IP:Port.
	Name string `json:"name,omitempty"`
}

Conditions specified in a listener match must be met for the patch to be applied to a specific listener across all filter chains, or a specific filter chain inside the listener.

func (*ListenerMatch) DeepCopy

func (in *ListenerMatch) DeepCopy() *ListenerMatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenerMatch.

func (*ListenerMatch) DeepCopyInto

func (in *ListenerMatch) DeepCopyInto(out *ListenerMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LoadBalancerSettings

type LoadBalancerSettings struct {

	// Standard load balancing algorithms that require no tuning.
	Simple *SimpleLB `json:"simple,omitempty"`

	// Consistent Hash-based load balancing can be used to provide soft
	// session affinity based on HTTP headers, cookies or other
	// properties. This load balancing policy is applicable only for HTTP
	// connections. The affinity to a particular destination host will be
	// lost when one or more hosts are added/removed from the destination
	// service.
	ConsistentHash *ConsistentHashLB `json:"consistentHash,omitempty"`
}

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/upstream/load_balancing/load_balancing) for more details.

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

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: bookinfo-ratings

spec:

host: ratings.prod.svc.cluster.local
trafficPolicy:
  loadBalancer:
    simple: ROUND_ROBIN

```

The following example sets up sticky sessions for the ratings service hashing-based load balancer for the same ratings service using the the User cookie as the hash key.

```yaml

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: bookinfo-ratings
spec:
  host: ratings.prod.svc.cluster.local
  trafficPolicy:
    loadBalancer:
      consistentHash:
        httpCookie:
          name: user
          ttl: 0s

```

func (*LoadBalancerSettings) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerSettings.

func (*LoadBalancerSettings) DeepCopyInto

func (in *LoadBalancerSettings) DeepCopyInto(out *LoadBalancerSettings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OutboundTrafficPolicy

type OutboundTrafficPolicy struct {
	Mode *OutboundTrafficPolicyMode `json:"mode,omitempty"`
}

`OutboundTrafficPolicy` sets the default behavior of the sidecar for handling outbound traffic from the application. If your application uses one or more external services that are not known apriori, setting the policy to `ALLOW_ANY` will cause the sidecars to route any unknown traffic originating from the application to its requested destination. Users are strongly encouraged to use `ServiceEntry` configurations to explicitly declare any external dependencies, instead of using `ALLOW_ANY`, so that traffic to these services can be monitored.

func (*OutboundTrafficPolicy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutboundTrafficPolicy.

func (*OutboundTrafficPolicy) DeepCopyInto

func (in *OutboundTrafficPolicy) DeepCopyInto(out *OutboundTrafficPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OutboundTrafficPolicyMode

type OutboundTrafficPolicyMode string
const (
	// Outbound traffic will be restricted to services defined in the
	// service registry as well as those defined through `ServiceEntry` configurations.
	OutboundTrafficPolicyRegistryOnly OutboundTrafficPolicyMode = "REGISTRY_ONLY"
	// Outbound traffic to unknown destinations will be allowed, in case
	// there are no services or `ServiceEntry` configurations for the destination port.
	OutboundTrafficPolicyAllowAny OutboundTrafficPolicyMode = "ALLOW_ANY"
)

type OutlierDetection

type OutlierDetection struct {
	// Number of errors before a host is ejected from the connection
	// pool. Defaults to 5. When the upstream host is accessed over HTTP, a
	// 502, 503 or 504 return code qualifies as an error. When the upstream host
	// is accessed over an opaque TCP connection, connect timeouts and
	// connection error/failure events qualify as an error.
	ConsecutiveErrors int32 `json:"consecutiveErrors,omitempty"`

	// Number of gateway errors before a host is ejected from the connection pool.
	// When the upstream host is accessed over HTTP, a 502, 503, or 504 return
	// code qualifies as a gateway error. When the upstream host is accessed over
	// an opaque TCP connection, connect timeouts and connection error/failure
	// events qualify as a gateway error.
	// This feature is disabled by default or when set to the value 0.
	//
	// Note that consecutive_gateway_errors and consecutive_5xx_errors can be
	// used separately or together. Because the errors counted by
	// consecutive_gateway_errors are also included in consecutive_5xx_errors,
	// if the value of consecutive_gateway_errors is greater than or equal to
	// the value of consecutive_5xx_errors, consecutive_gateway_errors will have
	// no effect.
	ConsecutiveGatewayErrors *uint32 `json:"consecutiveGatewayErrors,omitempty"`

	// Number of 5xx errors before a host is ejected from the connection pool.
	// When the upstream host is accessed over an opaque TCP connection, connect
	// timeouts, connection error/failure and request failure events qualify as a
	// 5xx error.
	// This feature defaults to 5 but can be disabled by setting the value to 0.
	//
	// Note that consecutive_gateway_errors and consecutive_5xx_errors can be
	// used separately or together. Because the errors counted by
	// consecutive_gateway_errors are also included in consecutive_5xx_errors,
	// if the value of consecutive_gateway_errors is greater than or equal to
	// the value of consecutive_5xx_errors, consecutive_gateway_errors will have
	// no effect.
	Consecutive5XxErrors *uint32 `json:"consecutive5xxErrors,omitempty"`

	// Time interval between ejection sweep analysis. format:
	// 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
	Interval *string `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 *string `json:"baseEjectionTime,omitempty"`

	// Maximum % of hosts in the load balancing pool for the upstream
	// service that can be ejected. Defaults to 10%.
	MaxEjectionPercent *int32 `json:"maxEjectionPercent,omitempty"`

	// Outlier detection will be enabled as long as the associated load balancing
	// pool has at least min_health_percent hosts in healthy mode. When the
	// percentage of healthy hosts in the load balancing pool drops below this
	// threshold, outlier detection will be disabled and the proxy will load balance
	// across all hosts in the pool (healthy and unhealthy). The threshold can be
	// disabled by setting it to 0%. The default is 0% as it's not typically
	// applicable in k8s environments with few pods per service.
	MinHealthPercent *int32 `json:"minHealthPercent,omitempty"`
}

A Circuit breaker implementation that tracks the status of each individual host in the upstream service. Applicable to both HTTP and TCP services. For HTTP services, hosts that continually return 5xx errors for API calls are ejected from the pool for a pre-defined period of time. For TCP services, connection timeouts or connection failures to a given host counts as an error when measuring the consecutive errors metric. See Envoy's [outlier detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/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.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: reviews-cb-policy

spec:

host: reviews.prod.svc.cluster.local
trafficPolicy:
  connectionPool:
    tcp:
      maxConnections: 100
    http:
      http2MaxRequests: 1000
      maxRequestsPerConnection: 10
  outlierDetection:
    consecutiveErrors: 7
    interval: 5m
    baseEjectionTime: 15m

```

func (*OutlierDetection) DeepCopy

func (in *OutlierDetection) DeepCopy() *OutlierDetection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutlierDetection.

func (*OutlierDetection) DeepCopyInto

func (in *OutlierDetection) DeepCopyInto(out *OutlierDetection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Patch

type Patch struct {
	// Determines how the patch should be applied.
	Operation PatchOperation `json:"operation,omitempty"`
	// The JSON config of the object being patched. This will be merged using
	// json merge semantics with the existing proto in the path.
	Value json.RawMessage `json:"value,omitempty"`
}

Patch specifies how the selected object should be modified.

func (*Patch) DeepCopy

func (in *Patch) DeepCopy() *Patch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Patch.

func (*Patch) DeepCopyInto

func (in *Patch) DeepCopyInto(out *Patch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PatchContext

type PatchContext string

PatchContext selects a class of configurations based on the traffic flow direction and workload type.

const (
	// All listeners/routes/clusters in both sidecars and gateways.
	PatchContextAny PatchContext = "ANY"
	// Inbound listener/route/cluster in sidecar.
	PatchContextSidecarInbound PatchContext = "SIDECAR_INBOUND"
	// Outbound listener/route/cluster in sidecar.
	PatchContextSidecarOutbound PatchContext = "SIDECAR_OUTBOUND"
	// Gateway listener/route/cluster.
	PatchContextGateway PatchContext = "GATEWAY"
)

type PatchOperation

type PatchOperation string

Operation denotes how the patch should be applied to the selected configuration.

const (
	PatchOperationInvalid PatchOperation = "INVALID"
	// Merge the provided config with the generated config using
	// json merge semantics.
	PatchOperationMerge PatchOperation = "MERGE"
	// Add the provided config to an existing list (of listeners,
	// clusters, virtual hosts, network filters, or http
	// filters). This operation will be ignored when applyTo is set
	// to ROUTE_CONFIGURATION, or HTTP_ROUTE.
	PatchOperationAdd PatchOperation = "ADD"
	// Remove the selected object from the list (of listeners,
	// clusters, virtual hosts, network filters, or http
	// filters). Does not require a value to be specified. This
	// operation will be ignored when applyTo is set to
	// ROUTE_CONFIGURATION, or HTTP_ROUTE.
	PatchOperationRemove PatchOperation = "REMOVE"
	// Insert operation on an array of named objects. This operation
	// is typically useful only in the context of filters, where the
	// order of filters matter. For clusters and virtual hosts,
	// order of the element in the array does not matter. Insert
	// before the selected filter or sub filter. If no filter is
	// selected, the specified filter will be inserted at the front
	// of the list.
	PatchOperationInsertBefore PatchOperation = "INSERT_BEFORE"
	// Insert operation on an array of named objects. This operation
	// is typically useful only in the context of filters, where the
	// order of filters matter. For clusters and virtual hosts,
	// order of the element in the array does not matter. Insert
	// after the selected filter or sub filter. If no filter is
	// selected, the specified filter will be inserted at the end
	// of the list.
	PatchOperationInsertAfter PatchOperation = "INSERT_AFTER"
	// Insert operation on an array of named objects. This operation
	// is typically useful only in the context of filters, where the
	// order of filters matter. For clusters and virtual hosts,
	// order of the element in the array does not matter. Insert
	// first in the list based on the presence of selected filter or not.
	// This is specifically useful when you want your filter first in the
	// list based on a match condition specified in Match clause.
	PatchOperationInsertFirst PatchOperation = "INSERT_FIRST"
)

type Percentage

type Percentage struct {
	Value float32 `json:"value"`
}

Percent specifies a percentage in the range of [0.0, 100.0].

func (*Percentage) DeepCopy

func (in *Percentage) DeepCopy() *Percentage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Percentage.

func (*Percentage) DeepCopyInto

func (in *Percentage) DeepCopyInto(out *Percentage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Port

type Port struct {
	// REQUIRED: A valid non-negative integer port number.
	Number int `json:"number"`

	// REQUIRED: The protocol exposed on the port.
	// MUST BE one of HTTP|HTTPS|GRPC|HTTP2|MONGO|TCP|TLS.
	// TLS implies the connection will be routed based on the SNI header to
	// the destination without terminating the TLS connection.
	Protocol PortProtocol `json:"protocol"`

	// Label assigned to the port.
	Name string `json:"name,omitempty"`
}

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

func (*Port) DeepCopy

func (in *Port) DeepCopy() *Port

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Port.

func (*Port) DeepCopyInto

func (in *Port) DeepCopyInto(out *Port)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PortProtocol

type PortProtocol string
const (
	ProtocolHTTP    PortProtocol = "HTTP"
	ProtocolHTTPS   PortProtocol = "HTTPS"
	ProtocolGRPC    PortProtocol = "GRPC"
	ProtocolGRPCWeb PortProtocol = "GRPC-Web"
	ProtocolHTTP2   PortProtocol = "HTTP2"
	ProtocolMongo   PortProtocol = "Mongo"
	ProtocolTCP     PortProtocol = "TCP"
	ProtocolTLS     PortProtocol = "TLS"
)

type PortSelector

type PortSelector struct {
	// Valid port number
	Number uint32 `json:"number"`
}

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

func (*PortSelector) DeepCopy

func (in *PortSelector) DeepCopy() *PortSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortSelector.

func (*PortSelector) DeepCopyInto

func (in *PortSelector) DeepCopyInto(out *PortSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PortTrafficPolicy

type PortTrafficPolicy struct {
	TrafficPolicyCommon `json:",inline"`

	// Specifies the port name or number of a port on the destination service
	// on which this policy is being applied.
	Port *PortSelector `json:"port,omitempty"`
}

Traffic policies that apply to specific ports of the service

func (*PortTrafficPolicy) DeepCopy

func (in *PortTrafficPolicy) DeepCopy() *PortTrafficPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortTrafficPolicy.

func (*PortTrafficPolicy) DeepCopyInto

func (in *PortTrafficPolicy) DeepCopyInto(out *PortTrafficPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProxyMatch

type ProxyMatch struct {
	// A regular expression in golang regex format (RE2) that can be
	// used to select proxies using a specific version of istio
	// proxy. The Istio version for a given proxy is obtained from the
	// node metadata field ISTIO_VERSION supplied by the proxy when
	// connecting to Pilot. This value is embedded as an environment
	// variable (ISTIO_META_ISTIO_VERSION) in the Istio proxy docker
	// image. Custom proxy implementations should provide this metadata
	// variable to take advantage of the Istio version check option.
	ProxyVersion string `json:"proxyVersion,omitempty"`
	// Match on the node metadata supplied by a proxy when connecting
	// to Istio Pilot. Note that while Envoy's node metadata is of
	// type Struct, only string key-value pairs are processed by
	// Pilot. All keys specified in the metadata must match with exact
	// values. The match will fail if any of the specified keys are
	// absent or the values fail to match.
	Metadata map[string]string `json:"metadata,omitempty"`
}

One or more properties of the proxy to match on.

func (*ProxyMatch) DeepCopy

func (in *ProxyMatch) DeepCopy() *ProxyMatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyMatch.

func (*ProxyMatch) DeepCopyInto

func (in *ProxyMatch) DeepCopyInto(out *ProxyMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReadinessProbe added in v0.0.12

type ReadinessProbe struct {
	// Number of seconds after the container has started before readiness probes are initiated.
	InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"`
	// Number of seconds after which the probe times out.
	// Defaults to 1 second. Minimum value is 1 second.
	TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`
	// How often (in seconds) to perform the probe.
	// Default to 10 seconds. Minimum value is 1 second.
	PeriodSeconds int32 `json:"periodSeconds,omitempty"`
	// Minimum consecutive successes for the probe to be considered successful after having failed.
	// Defaults to 1 second.
	SuccessThreshold int32 `json:"successThreshold,omitempty"`
	// Minimum consecutive failures for the probe to be considered failed after having succeeded.
	// Defaults to 3 seconds.
	FailureThreshold int32 `json:"failureThreshold,omitempty"`

	// Users can only provide one configuration for health-checks (tcp, http, exec),
	// and this is expressed as a one-of. All the other configuration values
	// hold true for any of the health-check methods.
	HTTPGet   *HTTPHealthCheckConfig `json:"httpGet,omitempty"`
	TCPSocket *TCPHealthCheckConfig  `json:"tcpSocket,omitempty"`
	Exec      *ExecHealthCheckConfig `json:"exec,omitempty"`
}

func (*ReadinessProbe) DeepCopy added in v0.0.12

func (in *ReadinessProbe) DeepCopy() *ReadinessProbe

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadinessProbe.

func (*ReadinessProbe) DeepCopyInto added in v0.0.12

func (in *ReadinessProbe) DeepCopyInto(out *ReadinessProbe)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RouteConfigurationMatch

type RouteConfigurationMatch struct {
	// The service port number or gateway server port number for which
	// this route configuration was generated. If omitted, applies to
	// route configurations for all ports.
	PortNumber uint32 `json:"portNumber,omitempty"`
	// Applicable only for GATEWAY context. The gateway server port
	// name for which this route configuration was generated.
	PortName string `json:"portName,omitempty"`
	// The Istio gateway config's namespace/name for which this route
	// configuration was generated. Applies only if the context is
	// GATEWAY. Should be in the namespace/name format. Use this field
	// in conjunction with the portNumber and portName to accurately
	// select the Envoy route configuration for a specific HTTPS
	// server within a gateway config object.
	Gateway string `json:"gateway,omitempty"`
	// Match a specific virtual host in a route configuration and
	// apply the patch to the virtual host.
	Vhost *VirtualHostMatch `json:"vhost,omitempty"`
	// Route configuration name to match on. Can be used to match a
	// specific route configuration by name, such as the internally
	// generated "http_proxy" route configuration for all sidecars.
	Name string `json:"name,omitempty"`
}

Conditions specified in RouteConfigurationMatch must be met for the patch to be applied to a route configuration object or a specific virtual host within the route configuration.

func (*RouteConfigurationMatch) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteConfigurationMatch.

func (*RouteConfigurationMatch) DeepCopyInto

func (in *RouteConfigurationMatch) DeepCopyInto(out *RouteConfigurationMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RouteDestination

type RouteDestination struct {
	// REQUIRED. Destination uniquely identifies the instances of a service
	// to which the request/connection should be forwarded to.
	Destination *Destination `json:"destination"`

	// 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 one destination in a rule, the weight value is assumed to
	// be 100.
	Weight *int `json:"weight,omitempty"`
}

L4 routing rule weighted destination.

func (*RouteDestination) DeepCopy

func (in *RouteDestination) DeepCopy() *RouteDestination

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteDestination.

func (*RouteDestination) DeepCopyInto

func (in *RouteDestination) DeepCopyInto(out *RouteDestination)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RouteMatch

type RouteMatch struct {
	// The Route objects generated by default are named as
	// "default".  Route objects generated using a virtual service
	// will carry the name used in the virtual service's HTTP
	// routes.
	Name string `json:"name,omitempty"`
	// Match a route with specific action type.
	Action *RouteMatchAction `json:"action,omitempty"`
}

Match a specific route inside a virtual host in a route configuration.

func (*RouteMatch) DeepCopy

func (in *RouteMatch) DeepCopy() *RouteMatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteMatch.

func (*RouteMatch) DeepCopyInto

func (in *RouteMatch) DeepCopyInto(out *RouteMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RouteMatchAction

type RouteMatchAction string

Action refers to the route action taken by Envoy when a http route matches.

const (
	// All three route actions
	RouteMatchActionAny RouteMatchAction = "ANY"
	// Route traffic to a cluster / weighted clusters.
	RouteMatchActionRoute RouteMatchAction = "ROUTE"
	// Redirect request.
	RouteMatchActionRedirect RouteMatchAction = "REDIRECT"
	// directly respond to a request with specific payload.
	RouteMatchActionDirectResponse RouteMatchAction = "DIRECT_RESPONSE"
)

type Server

type Server struct {
	// REQUIRED: The Port on which the proxy should listen for incoming
	// connections.
	Port *Port `json:"port"`

	// REQUIRED. One or more hosts exposed by this gateway.
	// While typically applicable to
	// HTTP services, it can also be used for TCP services using TLS with SNI.
	// A host is specified as a `dnsName` with an optional `namespace/` prefix.
	// The `dnsName` should be specified using FQDN format, optionally including
	// a wildcard character in the left-most component (e.g., `prod/*.example.com`).
	// Set the `dnsName` to `*` to select all `VirtualService` hosts from the
	// specified namespace (e.g.,`prod/*`).
	//
	// The `namespace` can be set to `*` or `.`, representing any or the current
	// namespace, respectively. For example, `*/foo.example.com` selects the
	// service from any available namespace while `./foo.example.com` only selects
	// the service from the namespace of the sidecar. The default, if no `namespace/`
	// is specified, is `*/`, that is, select services from any namespace.
	// Any associated `DestinationRule` in the selected namespace will also be used.
	//
	// A `VirtualService` must be bound to the gateway and must have one or
	// more hosts that match the hosts specified in a server. The match
	// could be an exact match or a suffix match with the server's hosts. For
	// example, if the server's hosts specifies `*.example.com`, a
	// `VirtualService` with hosts `dev.example.com` or `prod.example.com` will
	// match. However, a `VirtualService` with host `example.com` or
	// `newexample.com` will not match.
	//
	// NOTE: Only virtual services exported to the gateway's namespace
	// (e.g., `exportTo` value of `*`) can be referenced.
	// Private configurations (e.g., `exportTo` set to `.`) will not be
	// available. Refer to the `exportTo` setting in `VirtualService`,
	// `DestinationRule`, and `ServiceEntry` configurations for details.
	Hosts []string `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 *TLSOptions `json:"tls,omitempty"`

	// The loopback IP endpoint or Unix domain socket to which traffic should
	// be forwarded to by default. Format should be `127.0.0.1:PORT` or
	// `unix:///path/to/socket` or `unix://@foobar` (Linux abstract namespace).
	DefaultEndpoint *string `json:"defaultEndpoint,omitempty"`
}

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

```yaml apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata:

name: my-ingress

spec:

selector:
  app: my-ingress-gateway
servers:
- port:
    number: 80
    name: http2
    protocol: HTTP2
  hosts:
  - "*"

```

Another example

```yaml apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata:

name: my-tcp-ingress

spec:

selector:
  app: my-tcp-ingress-gateway
servers:
- port:
    number: 27018
    name: mongo
    protocol: MONGO
  hosts:
  - "*"

```

The following is an example of TLS configuration for port 443

```yaml apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata:

name: my-tls-ingress

spec:

selector:
  app: my-tls-ingress-gateway
servers:
- port:
    number: 443
    name: https
    protocol: HTTPS
  hosts:
  - "*"
  tls:
    mode: SIMPLE
    serverCertificate: /etc/certs/server.pem
    privateKey: /etc/certs/privatekey.pem

```

func (*Server) DeepCopy

func (in *Server) DeepCopy() *Server

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Server.

func (*Server) DeepCopyInto

func (in *Server) DeepCopyInto(out *Server)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceEntry

type ServiceEntry struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ServiceEntrySpec `json:"spec"`
}

`ServiceEntry` enables adding additional entries into Istio's internal service registry, so that auto-discovered services in the mesh can access/route to these manually specified services. A service entry describes the properties of a service (DNS name, VIPs, ports, protocols, endpoints). These services could be external to the mesh (e.g., web APIs) or mesh-internal services that are not part of the platform's service registry (e.g., a set of VMs talking to services in Kubernetes).

The following example declares a few external APIs accessed by internal applications over HTTPS. The sidecar inspects the SNI value in the ClientHello message to route to the appropriate external service.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:

name: external-svc-https

spec:

hosts:
- api.dropboxapi.com
- www.googleapis.com
- api.facebook.com
location: MESH_EXTERNAL
ports:
- number: 443
  name: https
  protocol: TLS
resolution: DNS

```

The following configuration adds a set of MongoDB instances running on unmanaged VMs to Istio's registry, so that these services can be treated as any other service in the mesh. The associated DestinationRule is used to initiate mTLS connections to the database instances.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:

name: external-svc-mongocluster

spec:

hosts:
- mymongodb.somedomain # not used
addresses:
- 192.192.192.192/24 # VIPs
ports:
- number: 27018
  name: mongodb
  protocol: MONGO
location: MESH_INTERNAL
resolution: STATIC
endpoints:
- address: 2.2.2.2
- address: 3.3.3.3

```

and the associated DestinationRule

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: mtls-mongocluster

spec:

host: mymongodb.somedomain
trafficPolicy:
  tls:
    mode: MUTUAL
    clientCertificate: /etc/certs/myclientcert.pem
    privateKey: /etc/certs/client_private_key.pem
    caCertificates: /etc/certs/rootcacerts.pem

```

The following example uses a combination of service entry and TLS routing in a virtual service to steer traffic based on the SNI value to an internal egress firewall.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:

name: external-svc-redirect

spec:

hosts:
- wikipedia.org
- "*.wikipedia.org"
location: MESH_EXTERNAL
ports:
- number: 443
  name: https
  protocol: TLS
resolution: NONE

```

And the associated VirtualService to route based on the SNI value.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: tls-routing

spec:

hosts:
- wikipedia.org
- "*.wikipedia.org"
tls:
- match:
  - sniHosts:
    - wikipedia.org
    - "*.wikipedia.org"
  route:
  - destination:
      host: internal-egress-firewall.ns1.svc.cluster.local

```

The virtual service with TLS match serves to override the default SNI match. In the absence of a virtual service, traffic will be forwarded to the wikipedia domains.

The following example demonstrates the use of a dedicated egress gateway through which all external service traffic is forwarded. The 'exportTo' field allows for control over the visibility of a service declaration to other namespaces in the mesh. By default, a service is exported to all namespaces. The following example restricts the visibility to the current namespace, represented by ".", so that it cannot be used by other namespaces.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:

name: external-svc-httpbin
namespace : egress

spec:

hosts:
- httpbin.com
exportTo:
- "."
location: MESH_EXTERNAL
ports:
- number: 80
  name: http
  protocol: HTTP
resolution: DNS

```

Define a gateway to handle all egress traffic.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata:

name: istio-egressgateway
namespace: istio-system

spec:

selector:
  istio: egressgateway
servers:
- port:
    number: 80
    name: http
    protocol: HTTP
  hosts:
  - "*"

```

And the associated `VirtualService` to route from the sidecar to the gateway service (`istio-egressgateway.istio-system.svc.cluster.local`), as well as route from the gateway to the external service. Note that the virtual service is exported to all namespaces enabling them to route traffic through the gateway to the external service. Forcing traffic to go through a managed middle proxy like this is a common practice.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: gateway-routing
namespace: egress

spec:

hosts:
- httpbin.com
exportTo:
- "*"
gateways:
- mesh
- istio-egressgateway
http:
- match:
  - port: 80
    gateways:
    - mesh
  route:
  - destination:
      host: istio-egressgateway.istio-system.svc.cluster.local
- match:
  - port: 80
    gateways:
    - istio-egressgateway
  route:
  - destination:
      host: httpbin.com

```

The following example demonstrates the use of wildcards in the hosts for external services. 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`.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:

name: external-svc-wildcard-example

spec:

hosts:
- "*.bar.com"
location: MESH_EXTERNAL
ports:
- number: 80
  name: http
  protocol: HTTP
resolution: NONE

```

The following example demonstrates a service that is available via a Unix Domain Socket on the host of the client. The resolution must be set to STATIC to use Unix address endpoints.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:

name: unix-domain-socket-example

spec:

hosts:
- "example.unix.local"
location: MESH_EXTERNAL
ports:
- number: 80
  name: http
  protocol: HTTP
resolution: STATIC
endpoints:
- address: unix:///var/run/example/socket

```

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

```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:

name: external-svc-dns

spec:

hosts:
- foo.bar.com
location: MESH_EXTERNAL
ports:
- number: 80
  name: http
  protocol: HTTP
resolution: DNS
endpoints:
- address: us.foo.bar.com
  ports:
    https: 8080
- address: uk.foo.bar.com
  ports:
    https: 9080
- address: in.foo.bar.com
  ports:
    https: 7080

```

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

The following example illustrates the usage of a `ServiceEntry` containing a subject alternate name whose format conforms to the [SPIFFE standard](https://github.com/spiffe/spiffe/blob/master/standards/SPIFFE-ID.md):

```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:

name: httpbin
namespace : httpbin-ns

spec:

hosts:
- httpbin.com
location: MESH_INTERNAL
ports:
- number: 80
  name: http
  protocol: HTTP
resolution: STATIC
endpoints:
- address: 2.2.2.2
- address: 3.3.3.3
subjectAltNames:
- "spiffe://cluster.local/ns/httpbin-ns/sa/httpbin-service-account"

```

func (*ServiceEntry) DeepCopy

func (in *ServiceEntry) DeepCopy() *ServiceEntry

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceEntry.

func (*ServiceEntry) DeepCopyInto

func (in *ServiceEntry) DeepCopyInto(out *ServiceEntry)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceEntry) DeepCopyObject

func (in *ServiceEntry) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ServiceEntryEndpoint

type ServiceEntryEndpoint struct {
	// REQUIRED: Address associated with the network endpoint without the
	// port.  Domain names can be used if and only if the resolution is set
	// to DNS, and must be fully-qualified without wildcards. Use the form
	// unix:///absolute/path/to/socket for Unix domain socket endpoints.
	Address *string `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. Do not use for `unix://` addresses.
	Ports map[string]uint32 `json:"ports,omitempty"`

	// One or more labels associated with the endpoint.
	Labels map[string]string `json:"labels,omitempty"`

	// Network enables Istio to group endpoints resident in the same L3
	// domain/network. All endpoints in the same network are assumed to be
	// directly reachable from one another. When endpoints in different
	// networks cannot reach each other directly, an Istio Gateway can be
	// used to establish connectivity (usually using the
	// AUTO_PASSTHROUGH mode in a Gateway Server). This is
	// an advanced configuration used typically for spanning an Istio mesh
	// over multiple clusters.
	Network *string `json:"network,omitempty"`

	// The locality associated with the endpoint. A locality corresponds
	// to a failure domain (e.g., country/region/zone). Arbitrary failure
	// domain hierarchies can be represented by separating each
	// encapsulating failure domain by /. For example, the locality of an
	// an endpoint in US, in US-East-1 region, within availability zone
	// az-1, in data center rack r11 can be represented as
	// us/us-east-1/az-1/r11. Istio will configure the sidecar to route to
	// endpoints within the same locality as the sidecar. If none of the
	// endpoints in the locality are available, endpoints parent locality
	// (but within the same network ID) will be chosen. For example, if
	// there are two endpoints in same network (networkID "n1"), say e1
	// with locality us/us-east-1/az-1/r11 and e2 with locality
	// us/us-east-1/az-2/r12, a sidecar from us/us-east-1/az-1/r11 locality
	// will prefer e1 from the same locality over e2 from a different
	// locality. Endpoint e2 could be the IP associated with a gateway
	// (that bridges networks n1 and n2), or the IP associated with a
	// standard service endpoint.
	Locality *string `json:"locality,omitempty"`

	// The load balancing weight associated with the endpoint. Endpoints
	// with higher weights will receive proportionally higher traffic.
	Weight *uint32 `json:"weight,omitempty"`
}

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

func (*ServiceEntryEndpoint) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceEntryEndpoint.

func (*ServiceEntryEndpoint) DeepCopyInto

func (in *ServiceEntryEndpoint) DeepCopyInto(out *ServiceEntryEndpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceEntryList

type ServiceEntryList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []ServiceEntry `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object ServiceEntryList is a list of ServiceEntry resources

func (*ServiceEntryList) DeepCopy

func (in *ServiceEntryList) DeepCopy() *ServiceEntryList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceEntryList.

func (*ServiceEntryList) DeepCopyInto

func (in *ServiceEntryList) DeepCopyInto(out *ServiceEntryList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceEntryList) DeepCopyObject

func (in *ServiceEntryList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ServiceEntryLocation

type ServiceEntryLocation string

Location specifies whether the service is part of Istio mesh or outside the mesh. Location determines the behavior of several features, such as service-to-service mTLS authentication, policy enforcement, etc. When communicating with services outside the mesh, Istio's mTLS authentication is disabled, and policy enforcement is performed on the client-side as opposed to server-side.

const (
	// Signifies that the service is external to the mesh. Typically used
	// to indicate external services consumed through APIs.
	MeshExternal ServiceEntryLocation = "MESH_EXTERNAL"

	// Signifies that the service is part of the mesh. Typically used to
	// indicate services added explicitly as part of expanding the service
	// mesh to include unmanaged infrastructure (e.g., VMs added to a
	// Kubernetes based service mesh).
	MeshInternal ServiceEntryLocation = "MESH_INTERNAL"
)

type ServiceEntryResolution

type ServiceEntryResolution string

Resolution determines how the proxy will resolve the IP addresses of the network endpoints associated with the service, so that it can route to one of them. The resolution mode specified here has no impact on how the application resolves the IP address associated with the service. The application may still have to use DNS to resolve the service to an IP so that the outbound traffic can be captured by the Proxy. Alternatively, for HTTP services, the application could directly communicate with the proxy (e.g., by setting HTTP_PROXY) to talk to these services.

const (
	// 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.
	NONE ServiceEntryResolution = "NONE"

	// Use the static IP addresses specified in endpoints (see below) as the
	// backing instances associated with the service.
	STATIC ServiceEntryResolution = "STATIC"

	// Attempt to resolve the IP address by querying the ambient DNS,
	// 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.  DNS resolution cannot be used with Unix
	// domain socket endpoints.
	DNS ServiceEntryResolution = "DNS"
)

type ServiceEntrySpec

type ServiceEntrySpec struct {
	// REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
	// name with wildcard prefix.
	//
	// 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
	// 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
	// 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
	// will be matched against the hosts field.
	//
	// Note that when resolution is set to type DNS
	// and no endpoints are specified, the host field will be used as the DNS name
	// of the endpoint to route traffic to.
	Hosts []string `json:"hosts,omitempty"`

	// The virtual IP addresses associated with the service. Could be CIDR
	// prefix. For HTTP traffic, generated route configurations will include http route
	// domains for both the `addresses` and `hosts` field values and the destination will
	// be identified based on the HTTP Host/Authority header.
	// If one or more IP addresses are specified,
	// the incoming traffic will be identified as belonging to this service
	// if the destination IP matches the IP/CIDRs specified in the addresses
	// field. If the Addresses field is empty, traffic will be identified
	// solely based on the destination port. In such scenarios, the port on
	// which the 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. Unix domain socket
	// addresses are not supported in this field.
	Addresses []string `json:"addresses,omitempty"`

	// REQUIRED. The ports associated with the external service. If the
	// Endpoints are Unix domain socket addresses, there must be exactly one
	// port.
	Ports []*Port `json:"ports,omitempty"`

	// Specify whether the service should be considered external to the mesh
	// or part of the mesh.
	Location *ServiceEntryLocation `json:"location,omitempty"`

	// REQUIRED: Service discovery mode for the hosts. Care must be taken
	// when setting the resolution mode to NONE for a TCP port without
	// accompanying IP addresses. In such cases, traffic to any IP on
	// said port will be allowed (i.e. 0.0.0.0:<port>).
	Resolution *ServiceEntryResolution `json:"resolution,omitempty"`

	// One or more endpoints associated with the service.
	Endpoints []*ServiceEntryEndpoint `json:"endpoints,omitempty"`

	// A list of namespaces to which this service is exported. Exporting a service
	// allows it to be used by sidecars, gateways and virtual services defined in
	// other namespaces. This feature provides a mechanism for service owners
	// and mesh administrators to control the visibility of services across
	// namespace boundaries.
	//
	// If no namespaces are specified then the service is exported to all
	// namespaces by default.
	//
	// The value "." is reserved and defines an export to the same namespace that
	// the service is declared in. Similarly the value "*" is reserved and
	// defines an export to all namespaces.
	//
	// For a Kubernetes Service, the equivalent effect can be achieved by setting
	// the annotation "networking.istio.io/exportTo" to a comma-separated list
	// of namespace names.
	//
	// NOTE: in the current release, the `exportTo` value is restricted to
	// "." or "*" (i.e., the current namespace or all namespaces).
	ExportTo []string `json:"exportTo,omitempty"`

	// The list of subject alternate names allowed for workload instances that
	// implement this service. This information is used to enforce
	// [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
	// If specified, the proxy will verify that the server
	// certificate's subject alternate name matches one of the specified values.
	SubjectAltNames []string `json:"subjectAltNames,omitempty"`
}

func (*ServiceEntrySpec) DeepCopy

func (in *ServiceEntrySpec) DeepCopy() *ServiceEntrySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceEntrySpec.

func (*ServiceEntrySpec) DeepCopyInto

func (in *ServiceEntrySpec) DeepCopyInto(out *ServiceEntrySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Sidecar

type Sidecar struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec SidecarSpec `json:"spec"`
}

Sidecar describes the configuration of the sidecar proxy that mediates inbound and outbound communication to the workload instance it is attached to. By default, Istio will program all sidecar proxies in the mesh with the necessary configuration required to reach every workload instance in the mesh, as well as accept traffic on all the ports associated with the workload. The `SidecarSpec` configuration provides a way to fine tune the set of ports, protocols that the proxy will accept when forwarding traffic to and from the workload. In addition, it is possible to restrict the set of services that the proxy can reach when forwarding outbound traffic from workload instances.

Services and configuration in a mesh are organized into one or more namespaces (e.g., a Kubernetes namespace or a CF org/space). A `SidecarSpec` configuration in a namespace will apply to one or more workload instances in the same namespace, selected using the `workloadSelector` field. In the absence of a `workloadSelector`, it will apply to all workload instances in the same namespace. When determining the `SidecarSpec` configuration to be applied to a workload instance, preference will be given to the resource with a `workloadSelector` that selects this workload instance, over a `SidecarSpec` configuration without any `workloadSelector`.

NOTE 1: *_Each namespace can have only one `SidecarSpec` configuration without any `workloadSelector`_*. The behavior of the system is undefined if more than one selector-less `SidecarSpec` configurations exist in a given namespace. The behavior of the system is undefined if two or more `SidecarSpec` configurations with a `workloadSelector` select the same workload instance.

NOTE 2: *_A `SidecarSpec` configuration in the `MeshConfig` [root namespace](https://istio.io/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig) will be applied by default to all namespaces without a `SidecarSpec` configuration_*. This global default `SidecarSpec` configuration should not have any `workloadSelector`.

The example below declares a global default `SidecarSpec` configuration in the root namespace called `istio-config`, that configures sidecars in all namespaces to allow egress traffic only to other workloads in the same namespace, and to services in the `istio-system` namespace.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: SidecarSpec metadata:

name: default
namespace: istio-config

spec:

egress:
- hosts:
  - "./*"
  - "istio-system/*"

```

The example below declares a `SidecarSpec` configuration in the `prod-us1` namespace that overrides the global default defined above, and configures the sidecars in the namespace to allow egress traffic to public services in the `prod-us1`, `prod-apis`, and the `istio-system` namespaces.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: SidecarSpec metadata:

name: default
namespace: prod-us1

spec:

egress:
- hosts:
  - "prod-us1/*"
  - "prod-apis/*"
  - "istio-system/*"

```

The example below declares a `SidecarSpec` configuration in the `prod-us1` namespace that accepts inbound HTTP traffic on port 9080 and forwards it to the attached workload instance listening on a Unix domain socket. In the egress direction, in addition to the `istio-system` namespace, the sidecar proxies only HTTP traffic bound for port 9080 for services in the `prod-us1` namespace.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: SidecarSpec metadata:

name: default
namespace: prod-us1

spec:

ingress:
- port:
    number: 9080
    protocol: HTTP
    name: somename
  defaultEndpoint: unix:///var/run/someuds.sock
egress:
- port:
    number: 9080
    protocol: HTTP
    name: egresshttp
  hosts:
  - "prod-us1/*"
- hosts:
  - "istio-system/*"

```

If the workload is deployed without IPTables-based traffic capture, the `SidecarSpec` configuration is the only way to configure the ports on the proxy attached to the workload instance. The following example declares a `SidecarSpec` configuration in the `prod-us1` namespace for all pods with labels `app: productpage` belonging to the `productpage.prod-us1` service. Assuming that these pods are deployed without IPtable rules (i.e. the `istio-init` container) and the proxy metadata `ISTIO_META_INTERCEPTION_MODE` is set to `NONE`, the specification, below, allows such pods to receive HTTP traffic on port 9080 and forward it to the application listening on `127.0.0.1:8080`. It also allows the application to communicate with a backing MySQL database on `127.0.0.1:3306`, that then gets proxied to the externally hosted MySQL service at `mysql.foo.com:3306`.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: SidecarSpec metadata:

name: no-ip-tables
namespace: prod-us1

spec:

workloadSelector:
  labels:
    app: productpage
ingress:
- port:
    number: 9080 # binds to proxy_instance_ip:9080 (0.0.0.0:9080, if no unicast IP is available for the instance)
    protocol: HTTP
    name: somename
  defaultEndpoint: 127.0.0.1:8080
  captureMode: NONE # not needed if metadata is set for entire proxy
egress:
- port:
    number: 3306
    protocol: MYSQL
    name: egressmysql
  captureMode: NONE # not needed if metadata is set for entire proxy
  bind: 127.0.0.1
  hosts:
  - "*/mysql.foo.com"

```

And the associated service entry for routing to `mysql.foo.com:3306`

```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:

name: external-svc-mysql
namespace: ns1

spec:

hosts:
- mysql.foo.com
ports:
- number: 3306
  name: mysql
  protocol: MYSQL
location: MESH_EXTERNAL
resolution: DNS

```

It is also possible to mix and match traffic capture modes in a single proxy. For example, consider a setup where internal services are on the `192.168.0.0/16` subnet. So, IP tables are setup on the VM to capture all outbound traffic on `192.168.0.0/16` subnet. Assume that the VM has an additional network interface on `172.16.0.0/16` subnet for inbound traffic. The following `SidecarSpec` configuration allows the VM to expose a listener on `172.16.1.32:80` (the VM's IP) for traffic arriving from the `172.16.0.0/16` subnet. Note that in this scenario, the `ISTIO_META_INTERCEPTION_MODE` metadata on the proxy in the VM should contain `REDIRECT` or `TPROXY` as its value, implying that IP tables based traffic capture is active.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: SidecarSpec metadata:

name: partial-ip-tables
namespace: prod-us1

spec:

workloadSelector:
  labels:
    app: productpage
ingress:
- bind: 172.16.1.32
  port:
    number: 80 # binds to 172.16.1.32:80
    protocol: HTTP
    name: somename
  defaultEndpoint: 127.0.0.1:8080
  captureMode: NONE
egress:
  # use the system detected defaults
  # sets up configuration to handle outbound traffic to services
  # in 192.168.0.0/16 subnet, based on information provided by the
  # service registry
- captureMode: IPTABLES
  hosts:
  - "*/*"

```

func (*Sidecar) DeepCopy

func (in *Sidecar) DeepCopy() *Sidecar

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sidecar.

func (*Sidecar) DeepCopyInto

func (in *Sidecar) DeepCopyInto(out *Sidecar)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Sidecar) DeepCopyObject

func (in *Sidecar) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SidecarList

type SidecarList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Sidecar `json:"items"`
}

SidecarList is a list of Sidecar resources

func (*SidecarList) DeepCopy

func (in *SidecarList) DeepCopy() *SidecarList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SidecarList.

func (*SidecarList) DeepCopyInto

func (in *SidecarList) DeepCopyInto(out *SidecarList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SidecarList) DeepCopyObject

func (in *SidecarList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SidecarSpec

type SidecarSpec struct {
	// Criteria used to select the specific set of pods/VMs on which this
	// `SidecarSpec` configuration should be applied. If omitted, the `SidecarSpec`
	// configuration will be applied to all workload instances in the same namespace.
	WorkloadSelector *WorkloadSelector `json:"workloadSelector,omitempty"`
	// Ingress specifies the configuration of the sidecar for processing
	// inbound traffic to the attached workload instance. If omitted, Istio will
	// automatically configure the sidecar based on the information about the workload
	// obtained from the orchestration platform (e.g., exposed ports, services,
	// etc.). If specified, inbound ports are configured if and only if the
	// workload instance is associated with a service.
	Ingress []*IstioIngressListener `json:"ingress,omitempty"`
	// Egress specifies the configuration of the sidecar for processing
	// outbound traffic from the attached workload instance to other services in the
	// mesh.
	Egress []*IstioEgressListener `json:"egress"`
	// This allows to configure the outbound traffic policy.
	// If your application uses one or more external
	// services that are not known apriori, setting the policy to `ALLOW_ANY`
	// will cause the sidecars to route any unknown traffic originating from
	// the application to its requested destination.
	OutboundTrafficPolicy *OutboundTrafficPolicy `json:"outboundTrafficPolicy,omitempty"`
}

SidecarSpec describes the configuration of the sidecar proxy that mediates inbound and outbound communication of the workload instance to which it is attached.

func (*SidecarSpec) DeepCopy

func (in *SidecarSpec) DeepCopy() *SidecarSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SidecarSpec.

func (*SidecarSpec) DeepCopyInto

func (in *SidecarSpec) DeepCopyInto(out *SidecarSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SimpleLB

type SimpleLB string

Standard load balancing algorithms that require no tuning.

const (
	// Round Robin policy. Default
	SimpleLBRoundRobin SimpleLB = "ROUND_ROBIN"

	// 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.
	SimpleLBLeastConn SimpleLB = "LEAST_CONN"

	// 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.
	SimpleLBRandom SimpleLB = "RANDOM"

	// 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.
	SimpleLBPassthrough SimpleLB = "PASSTHROUGH"
)

type SubFilterMatch

type SubFilterMatch struct {
	// The filter name to match on.
	Name string `json:"name,omitempty"`
}

Conditions to match a specific filter within another filter. This field is typically useful to match a HTTP filter inside the envoy.http_connection_manager network filter. This could also be applicable for thrift filters.

func (*SubFilterMatch) DeepCopy

func (in *SubFilterMatch) DeepCopy() *SubFilterMatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubFilterMatch.

func (*SubFilterMatch) DeepCopyInto

func (in *SubFilterMatch) DeepCopyInto(out *SubFilterMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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 `json:"name"`

	// 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 `json:"labels"`

	// 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 `json:"trafficPolicy,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(https://istio.io/docs/reference/config/networking/v1alpha3/virtual-service/#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).

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: bookinfo-ratings

spec:

host: ratings.prod.svc.cluster.local
trafficPolicy:
  loadBalancer:
    simple: LEAST_CONN
subsets:
- name: testversion
  labels:
    version: v3
  trafficPolicy:
    loadBalancer:
      simple: ROUND_ROBIN

```

**Note:** Policies specified for subsets will not take effect until a route rule explicitly sends traffic to this subset.

One or more labels are typically required to identify the subset destination, however, when the corresponding DestinationRule represents a host that supports multiple SNI hosts (e.g., an egress gateway), a subset without labels may be meaningful. In this case a traffic policy with TLSSettings(#TLSSettings) can be used to identify a specific SNI host corresponding to the named subset.

func (*Subset) DeepCopy

func (in *Subset) DeepCopy() *Subset

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subset.

func (*Subset) DeepCopyInto

func (in *Subset) DeepCopyInto(out *Subset)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TCPHealthCheckConfig added in v0.0.12

type TCPHealthCheckConfig struct {
	// Host to connect to, defaults to localhost.
	Host string `json:"host,omitempty"`
	// REQUIRED. Port of host.
	Port uint32 `json:"port"`
}

func (*TCPHealthCheckConfig) DeepCopy added in v0.0.12

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPHealthCheckConfig.

func (*TCPHealthCheckConfig) DeepCopyInto added in v0.0.12

func (in *TCPHealthCheckConfig) DeepCopyInto(out *TCPHealthCheckConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TCPKeepalive

type TCPKeepalive struct {
	// Maximum number of keepalive probes to send without response before
	// deciding the connection is dead. Default is to use the OS level configuration
	// (unless overridden, Linux defaults to 9.)
	Probes *uint32 `json:"probes,omitempty"`
	// The time duration a connection needs to be idle before keep-alive
	// probes start being sent. Default is to use the OS level configuration
	// (unless overridden, Linux defaults to 7200s (ie 2 hours.)
	Time *string `json:"time,omitempty"`
	// The time duration between keep-alive probes.
	// Default is to use the OS level configuration
	// (unless overridden, Linux defaults to 75s.)
	Interval *string `json:"interval,omitempty"`
}

TCP keepalive.

func (*TCPKeepalive) DeepCopy

func (in *TCPKeepalive) DeepCopy() *TCPKeepalive

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPKeepalive.

func (*TCPKeepalive) DeepCopyInto

func (in *TCPKeepalive) DeepCopyInto(out *TCPKeepalive)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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 `json:"match"`

	// The destination to which the connection should be forwarded to.
	Route []*RouteDestination `json:"route"`
}

Describes match conditions and actions for routing TCP traffic. The following routing rule forwards traffic arriving at port 27017 for mongo.prod.svc.cluster.local to another Mongo server on port 5555.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: bookinfo-Mongo

spec:

hosts:
- mongo.prod.svc.cluster.local
tcp:
- match:
  - port: 27017
  route:
  - destination:
      host: mongo.backup.svc.cluster.local
      port:
        number: 5555

```

func (*TCPRoute) DeepCopy

func (in *TCPRoute) DeepCopy() *TCPRoute

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPRoute.

func (*TCPRoute) DeepCopyInto

func (in *TCPRoute) DeepCopyInto(out *TCPRoute)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TCPSettings

type TCPSettings struct {
	// Maximum number of HTTP1 /TCP connections to a destination host.
	MaxConnections *int32 `json:"maxConnections,omitempty"`

	// TCP connection timeout.
	ConnectTimeout *string `json:"connectTimeout,omitempty"`

	// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
	TCPKeepalive *TCPKeepalive `json:"tcpKeepalive,omitempty"`
}

Settings common to both HTTP and TCP upstream connections.

func (*TCPSettings) DeepCopy

func (in *TCPSettings) DeepCopy() *TCPSettings

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPSettings.

func (*TCPSettings) DeepCopyInto

func (in *TCPSettings) DeepCopyInto(out *TCPSettings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TLSMatchAttributes

type TLSMatchAttributes struct {
	// REQUIRED. SNI (server name indicator) to match on. Wildcard prefixes
	// can be used in the SNI value, e.g., *.com will match foo.example.com
	// as well as example.com. An SNI value must be a subset (i.e., fall
	// within the domain) of the corresponding virtual serivce's hosts.
	SniHosts []string `json:"sniHosts"`

	// IPv4 or IPv6 ip addresses of destination with optional subnet.  E.g.,
	// a.b.c.d/xx form or just a.b.c.d.
	DestinationSubnets []string `json:"destinationSubnets,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.
	Port *int `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 `json:"sourceLabels,omitempty"`

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

TLS connection match attributes.

func (*TLSMatchAttributes) DeepCopy

func (in *TLSMatchAttributes) DeepCopy() *TLSMatchAttributes

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSMatchAttributes.

func (*TLSMatchAttributes) DeepCopyInto

func (in *TLSMatchAttributes) DeepCopyInto(out *TLSMatchAttributes)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TLSMode

type TLSMode string

TLS modes enforced by the proxy

const (
	// The SNI string presented by the client will be used as the match
	// criterion in a VirtualService TLS route to determine the
	// destination service from the service registry.
	TLSModePassThrough TLSMode = "PASSTHROUGH"

	// Secure connections with standard TLS semantics.
	TLSModeSimple TLSMode = "SIMPLE"

	// Secure connections to the downstream using mutual TLS by presenting
	// server certificates for authentication.
	TLSModeMutual TLSMode = "MUTUAL"

	// Similar to the passthrough mode, except servers with this TLS mode
	// do not require an associated VirtualService to map from the SNI
	// value to service in the registry. The destination details such as
	// the service/subset/port are encoded in the SNI value. The proxy
	// will forward to the upstream (Envoy) cluster (a group of
	// endpoints) specified by the SNI value. This server is typically
	// used to provide connectivity between services in disparate L3
	// networks that otherwise do not have direct connectivity between
	// their respective endpoints. Use of this mode assumes that both the
	// source and the destination are using Istio mTLS to secure traffic.
	TLSModeMutualAutoPassThrough TLSMode = "AUTO_PASSTHROUGH"

	// Secure connections from the downstream using mutual TLS by presenting
	// server certificates for authentication.
	// Compared to Mutual mode, this mode uses certificates, representing
	// gateway workload identity, generated automatically by Istio for
	// mTLS authentication. When this mode is used, all other fields in
	// `TLSOptions` should be empty.
	TLSModeIstioMutual TLSMode = "ISTIO_MUTUAL"
)

type TLSOptions

type TLSOptions struct {
	// If set to true, the load balancer will send a 301 redirect for all
	// http connections, asking the clients to use HTTPS.
	HTTPSRedirect *bool `json:"httpsRedirect,omitempty"`

	// Optional: Indicates whether connections to this port should be
	// secured using TLS. The value of this field determines how TLS is
	// enforced.
	Mode 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 `json:"serverCertificate,omitempty"`

	// REQUIRED if mode is `SIMPLE` or `MUTUAL`. The path to the file
	// holding the server's private key.
	PrivateKey *string `json:"privateKey,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 `json:"caCertificates,omitempty"`

	// The credentialName stands for a unique identifier that can be used
	// to identify the serverCertificate and the privateKey. The
	// credentialName appended with suffix "-cacert" is used to identify
	// the CaCertificates associated with this server. Gateway workloads
	// capable of fetching credentials from a remote credential store such
	// as Kubernetes secrets, will be configured to retrieve the
	// serverCertificate and the privateKey using credentialName, instead
	// of using the file system paths specified above. If using mutual TLS,
	// gateway workload instances will retrieve the CaCertificates using
	// credentialName-cacert. The semantics of the name are platform
	// dependent.  In Kubernetes, the default Istio supplied credential
	// server expects the credentialName to match the name of the
	// Kubernetes secret that holds the server certificate, the private
	// key, and the CA certificate (if using mutual TLS). Set the
	// `ISTIO_META_USER_SDS` metadata variable in the gateway's proxy to
	// enable the dynamic credential fetching feature.
	CredentialName *string `json:"credentialName,omitempty"`

	// A list of alternate names to verify the subject identity in the
	// certificate presented by the client.
	SubjectAltNames []string `json:"subjectAltNames,omitempty"`

	// An optional list of base64-encoded SHA-256 hashes of the SKPIs of
	// authorized client certificates.
	// Note: When both verify_certificate_hash and verify_certificate_spki
	// are specified, a hash matching either value will result in the
	// certificate being accepted.
	VerifyCertificateSpki []string `json:"verifyCertificateSpki,omitempty"`

	// An optional list of hex-encoded SHA-256 hashes of the
	// authorized client certificates. Both simple and colon separated
	// formats are acceptable.
	// Note: When both verify_certificate_hash and verify_certificate_spki
	// are specified, a hash matching either value will result in the
	// certificate being accepted.
	VerifyCertificateHash []string `json:"verifyCertificateHash,omitempty"`

	// Optional: Minimum TLS protocol version.
	MinProtocolVersion *TLSProtocol `json:"minProtocolVersion,omitempty"`

	// Optional: Maximum TLS protocol version.
	MaxProtocolVersion *TLSProtocol `json:"maxProtocolVersion,omitempty"`

	// Optional: If specified, only support the specified cipher list.
	// Otherwise default to the default cipher list supported by Envoy.
	CipherSuites []string `json:"cipherSuites,omitempty"`
}

func (*TLSOptions) DeepCopy

func (in *TLSOptions) DeepCopy() *TLSOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSOptions.

func (*TLSOptions) DeepCopyInto

func (in *TLSOptions) DeepCopyInto(out *TLSOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TLSProtocol

type TLSProtocol string

TLS protocol versions.

const (
	// Automatically choose the optimal TLS version.
	TLSProtocolAuto TLSProtocol = "TLS_AUTO"

	// TLS version 1.0
	TLSProtocolV10 TLSProtocol = "TLSV1_0"

	// TLS version 1.1
	TLSProtocolV11 TLSProtocol = "TLSV1_1"

	// TLS version 1.2
	TLSProtocolV12 TLSProtocol = "TLSV1_2"

	// TLS version 1.3
	TLSProtocolV13 TLSProtocol = "TLSV1_3"
)

type TLSRoute

type TLSRoute struct {
	// REQUIRED. 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 []TLSMatchAttributes `json:"match"`

	// The destination to which the connection should be forwarded to.
	Route []*RouteDestination `json:"route"`
}

Describes match conditions and actions for routing unterminated TLS traffic (TLS/HTTPS) The following routing rule forwards unterminated TLS traffic arriving at port 443 of gateway called mygateway to internal services in the mesh based on the SNI value.

```yaml kind: VirtualService metadata:

name: bookinfo-sni

spec:

hosts:
- '*.bookinfo.com'
gateways:
- mygateway
tls:
- match:
  - port: 443
    sniHosts:
    - login.bookinfo.com
  route:
  - destination:
      host: login.prod.svc.cluster.local
- match:
  - port: 443
    sniHosts:
    - reviews.bookinfo.com
  route:
  - destination:
      host: reviews.prod.svc.cluster.local

```

func (*TLSRoute) DeepCopy

func (in *TLSRoute) DeepCopy() *TLSRoute

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSRoute.

func (*TLSRoute) DeepCopyInto

func (in *TLSRoute) DeepCopyInto(out *TLSRoute)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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 TLSmode `json:"mode"`

	// REQUIRED if mode is `MUTUAL`. The path to the file holding the
	// client-side TLS certificate to use.
	// Should be empty if mode is `ISTIO_MUTUAL`.
	ClientCertificate *string `json:"clientCertificate,omitempty"`

	// REQUIRED if mode is `MUTUAL`. The path to the file holding the
	// client's private key.
	// Should be empty if mode is `ISTIO_MUTUAL`.
	PrivateKey *string `json:"privateKey,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.
	// Should be empty if mode is `ISTIO_MUTUAL`.
	CaCertificates *string `json:"caCertificates,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.
	// If specified, this list overrides the value of subject_alt_names
	// from the ServiceEntry.
	SubjectAltNames []string `json:"subjectAltNames,omitempty"`

	// SNI string to present to the server during TLS handshake.
	SNI *string `json:"sni,omitempty"`
}

SSL/TLS related settings for upstream connections. See Envoy's [TLS context](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/auth/cert.proto.html) 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.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: db-mtls

spec:

host: mydbserver.prod.svc.cluster.local
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.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: tls-foo

spec:

host: "*.foo.com"
trafficPolicy:
  tls:
    mode: SIMPLE

```

The following rule configures a client to use Istio mutual TLS when talking to rating services.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: ratings-istio-mtls

spec:

host: ratings.prod.svc.cluster.local
trafficPolicy:
  tls:
    mode: ISTIO_MUTUAL

```

func (*TLSSettings) DeepCopy

func (in *TLSSettings) DeepCopy() *TLSSettings

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSettings.

func (*TLSSettings) DeepCopyInto

func (in *TLSSettings) DeepCopyInto(out *TLSSettings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TLSmode

type TLSmode string

TLS connection mode

const (
	// Do not setup a TLS connection to the upstream endpoint.
	TLSmodeDisable TLSmode = "DISABLE"

	// Originate a TLS connection to the upstream endpoint.
	TLSmodeSimple TLSmode = "SIMPLE"

	// Secure connections to the upstream using mutual TLS by presenting
	// client certificates for authentication.
	TLSmodeMutual TLSmode = "MUTUAL"

	// Secure connections to the upstream using mutual TLS by presenting
	// client certificates for authentication.
	// Compared to Mutual mode, this mode uses certificates generated
	// automatically by Istio for mTLS authentication. When this mode is
	// used, all other fields in `TLSSettings` should be empty.
	TLSmodeIstioMutual TLSmode = "ISTIO_MUTUAL"
)

type TrafficPolicy

type TrafficPolicy struct {
	TrafficPolicyCommon `json:",inline"`

	// Traffic policies specific to individual ports. Note that port level
	// settings will override the destination-level settings. Traffic
	// settings specified at the destination-level will not be inherited when
	// overridden by port-level settings, i.e. default values will be applied
	// to fields omitted in port-level traffic policies.
	PortLevelSettings []PortTrafficPolicy `json:"portLevelSettings,omitempty"`
}

Traffic policies to apply for a specific destination, across all destination ports. See DestinationRule for examples.

func (*TrafficPolicy) DeepCopy

func (in *TrafficPolicy) DeepCopy() *TrafficPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficPolicy.

func (*TrafficPolicy) DeepCopyInto

func (in *TrafficPolicy) DeepCopyInto(out *TrafficPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TrafficPolicyCommon

type TrafficPolicyCommon struct {
	// Settings controlling the load balancer algorithms.
	LoadBalancer *LoadBalancerSettings `json:"loadBalancer,omitempty"`

	// Settings controlling the volume of connections to an upstream service.
	ConnectionPool *ConnectionPoolSettings `json:"connectionPool,omitempty"`

	// Settings controlling eviction of unhealthy hosts from the load balancing pool.
	OutlierDetection *OutlierDetection `json:"outlierDetection,omitempty"`

	// TLS related settings for connections to the upstream service.
	TLS *TLSSettings `json:"tls,omitempty"`
}

func (*TrafficPolicyCommon) DeepCopy

func (in *TrafficPolicyCommon) DeepCopy() *TrafficPolicyCommon

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficPolicyCommon.

func (*TrafficPolicyCommon) DeepCopyInto

func (in *TrafficPolicyCommon) DeepCopyInto(out *TrafficPolicyCommon)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VirtualHostMatch

type VirtualHostMatch struct {
	// The VirtualHosts objects generated by Istio are named as
	// host:port, where the host typically corresponds to the
	// VirtualService's host field or the hostname of a service in the
	// registry.
	Name string `json:"name,omitempty"`
	// Match a specific route within the virtual host.
	Route *RouteMatch `json:"route,omitempty"`
}

Match a specific virtual host inside a route configuration.

func (*VirtualHostMatch) DeepCopy

func (in *VirtualHostMatch) DeepCopy() *VirtualHostMatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualHostMatch.

func (*VirtualHostMatch) DeepCopyInto

func (in *VirtualHostMatch) DeepCopyInto(out *VirtualHostMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VirtualService

type VirtualService struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec VirtualServiceSpec `json:"spec"`
}

Configuration affecting traffic routing. Here are a few terms useful to define in the context of traffic routing.

`Service` a unit of application behavior bound to a unique name in a service registry. Services consist of multiple network *endpoints* implemented by workload instances running on pods, containers, VMs etc.

`Service versions (a.k.a. subsets)` - In a continuous deployment scenario, for a given service, there can be distinct subsets of instances running different variants of the application binary. These variants are not necessarily different API versions. They could be iterative changes to the same service, deployed in different environments (prod, staging, dev, etc.). Common scenarios where this occurs include A/B testing, canary rollouts, etc. The choice of a particular version can be decided based on various criterion (headers, url, etc.) and/or by weights assigned to each version. Each service has a default version consisting of all its instances.

`Source` - A downstream client calling a service.

`Host` - The address used by a client when attempting to connect to a service.

`Access model` - Applications address only the destination service (Host) without knowledge of individual service versions (subsets). The actual choice of the version is determined by the proxy/sidecar, enabling the application code to decouple itself from the evolution of dependent services.

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 on Kubernetes, routes all HTTP traffic by default to pods of the reviews service with label "version: v1". In addition, HTTP requests with path starting with /wpcatalog/ or /consumercatalog/ will be rewritten to /newcatalog and sent to pods with label "version: v2".

```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:

name: reviews-route

spec:

hosts:
- reviews.prod.svc.cluster.local
http:
- name: "reviews-v2-routes"
  match:
  - uri:
      prefix: "/wpcatalog"
  - uri:
      prefix: "/consumercatalog"
  rewrite:
    uri: "/newcatalog"
  route:
  - destination:
      host: reviews.prod.svc.cluster.local
      subset: v2
- name: "reviews-v1-route"
  route:
  - destination:
      host: reviews.prod.svc.cluster.local
      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`.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:

name: reviews-destination

spec:

host: reviews.prod.svc.cluster.local
subsets:
- name: v1
  labels:
    version: v1
- name: v2
  labels:
    version: v2

```

func (*VirtualService) DeepCopy

func (in *VirtualService) DeepCopy() *VirtualService

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualService.

func (*VirtualService) DeepCopyInto

func (in *VirtualService) DeepCopyInto(out *VirtualService)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VirtualService) DeepCopyObject

func (in *VirtualService) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VirtualServiceList

type VirtualServiceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []VirtualService `json:"items"`
}

VirtualServiceList is a list of VirtualService resources

func (*VirtualServiceList) DeepCopy

func (in *VirtualServiceList) DeepCopy() *VirtualServiceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServiceList.

func (*VirtualServiceList) DeepCopyInto

func (in *VirtualServiceList) DeepCopyInto(out *VirtualServiceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VirtualServiceList) DeepCopyObject

func (in *VirtualServiceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VirtualServiceSpec

type VirtualServiceSpec struct {
	// REQUIRED. The destination hosts to which traffic is being sent. Could
	// be a DNS name with wildcard prefix or an IP address.  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.
	//
	// A single VirtualService can be used to describe all the traffic
	// properties of the corresponding hosts, including those for multiple
	// HTTP and TCP ports. Alternatively, the traffic properties of a host
	// can be defined using more than one VirtualService, with certain
	// caveats. Refer to the
	// [Operations Guide](https://istio.io/docs/ops/traffic-management/deploy-guidelines/#multiple-virtual-services-and-destination-rules-for-the-same-host)
	// for details.
	//
	// *Note for Kubernetes users*: When short names are used (e.g. "reviews"
	// instead of "reviews.default.svc.cluster.local"), Istio will interpret
	// the short name based on the namespace of the rule, not the service. A
	// rule in the "default" namespace containing a host "reviews" will be
	// interpreted as "reviews.default.svc.cluster.local", irrespective of
	// the actual namespace associated with the reviews service. _To avoid
	// potential misconfigurations, it is recommended to always use fully
	// qualified domain names over short names._
	//
	// 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 are allowed
	// only for services defined via the Gateway.
	Hosts []string `json:"hosts"`

	// 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 protocol-specific 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 `json:"gateways,omitempty"`

	// An ordered list of route rules for HTTP traffic. HTTP routes will be
	// applied to platform service ports named 'http-*'/'http2-*'/'grpc-*', gateway
	// ports with protocol HTTP/HTTP2/GRPC/ TLS-terminated-HTTPS and service
	// entry ports using HTTP/HTTP2/GRPC protocols.  The first rule matching
	// an incoming request is used.
	HTTP []HTTPRoute `json:"http,omitempty"`

	// An ordered list of route rule for non-terminated TLS & HTTPS
	// traffic. Routing is typically performed using the SNI value presented
	// by the ClientHello message. TLS routes will be applied to platform
	// service ports named 'https-*', 'tls-*', unterminated gateway ports using
	// HTTPS/TLS protocols (i.e. with "passthrough" TLS mode) and service
	// entry ports using HTTPS/TLS protocols.  The first rule matching an
	// incoming request is used.  NOTE: Traffic 'https-*' or 'tls-*' ports
	// without associated virtual service will be treated as opaque TCP
	// traffic.
	TLS []TLSRoute `json:"tls,omitempty"`

	// An ordered list of route rules for opaque TCP traffic. TCP routes will
	// be applied to any port that is not a HTTP or TLS port. The first rule
	// matching an incoming request is used.
	TCP []TCPRoute `json:"tcp,omitempty"`

	// A list of namespaces to which this virtual service is exported. Exporting a
	// virtual service allows it to be used by sidecars and gateways defined in
	// other namespaces. This feature provides a mechanism for service owners
	// and mesh administrators to control the visibility of virtual services
	// across namespace boundaries.
	//
	// If no namespaces are specified then the virtual service is exported to all
	// namespaces by default.
	//
	// The value "." is reserved and defines an export to the same namespace that
	// the virtual service is declared in. Similarly the value "*" is reserved and
	// defines an export to all namespaces.
	//
	// NOTE: in the current release, the `exportTo` value is restricted to
	// "." or "*" (i.e., the current namespace or all namespaces).
	ExportTo []string `json:"exportTo,omitempty"`
}

Configuration affecting traffic routing.

func (*VirtualServiceSpec) DeepCopy

func (in *VirtualServiceSpec) DeepCopy() *VirtualServiceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServiceSpec.

func (*VirtualServiceSpec) DeepCopyInto

func (in *VirtualServiceSpec) DeepCopyInto(out *VirtualServiceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkloadEntry

type WorkloadEntry struct {
	v1.TypeMeta   `json:",inline"`
	v1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the implementation of this definition.
	Spec   WorkloadEntrySpec    `json:"spec"`
	Status istioApi.IstioStatus `json:"status"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object WorkloadEntry

func (*WorkloadEntry) DeepCopy

func (in *WorkloadEntry) DeepCopy() *WorkloadEntry

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEntry.

func (*WorkloadEntry) DeepCopyInto

func (in *WorkloadEntry) DeepCopyInto(out *WorkloadEntry)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkloadEntry) DeepCopyObject

func (in *WorkloadEntry) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WorkloadEntryList

type WorkloadEntryList struct {
	v1.TypeMeta `json:",inline"`
	v1.ListMeta `json:"metadata"`
	Items       []WorkloadEntry `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object WorkloadEntryList is a collection of EnvoyFilters.

func (*WorkloadEntryList) DeepCopy

func (in *WorkloadEntryList) DeepCopy() *WorkloadEntryList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEntryList.

func (*WorkloadEntryList) DeepCopyInto

func (in *WorkloadEntryList) DeepCopyInto(out *WorkloadEntryList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkloadEntryList) DeepCopyObject

func (in *WorkloadEntryList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WorkloadEntrySpec

type WorkloadEntrySpec struct {
	// Address associated with the network endpoint without the
	// port.  Domain names can be used if and only if the resolution is set
	// to DNS, and must be fully-qualified without wildcards. Use the form
	// unix:///absolute/path/to/socket for Unix domain socket endpoints.
	Address string `json:"address"`
	// Set of ports associated with the endpoint. The ports must be
	// associated with a port name that was declared as part of the
	// service. Do not use for `unix://` addresses.
	Ports map[string]uint32 `json:"ports,omitempty"`
	// One or more labels associated with the endpoint.
	Labels map[string]string `json:"labels,omitempty"`
	// Network enables Istio to group endpoints resident in the same L3
	// domain/network. All endpoints in the same network are assumed to be
	// directly reachable from one another. When endpoints in different
	// networks cannot reach each other directly, an Istio Gateway can be
	// used to establish connectivity (usually using the
	// `AUTO_PASSTHROUGH` mode in a Gateway Server). This is
	// an advanced configuration used typically for spanning an Istio mesh
	// over multiple clusters.
	Network string `json:"network,omitempty"`
	// The locality associated with the endpoint. A locality corresponds
	// to a failure domain (e.g., country/region/zone). Arbitrary failure
	// domain hierarchies can be represented by separating each
	// encapsulating failure domain by /. For example, the locality of an
	// an endpoint in US, in US-East-1 region, within availability zone
	// az-1, in data center rack r11 can be represented as
	// us/us-east-1/az-1/r11. Istio will configure the sidecar to route to
	// endpoints within the same locality as the sidecar. If none of the
	// endpoints in the locality are available, endpoints parent locality
	// (but within the same network ID) will be chosen. For example, if
	// there are two endpoints in same network (networkID "n1"), say e1
	// with locality us/us-east-1/az-1/r11 and e2 with locality
	// us/us-east-1/az-2/r12, a sidecar from us/us-east-1/az-1/r11 locality
	// will prefer e1 from the same locality over e2 from a different
	// locality. Endpoint e2 could be the IP associated with a gateway
	// (that bridges networks n1 and n2), or the IP associated with a
	// standard service endpoint.
	Locality string `json:"locality,omitempty"`
	// The load balancing weight associated with the endpoint. Endpoints
	// with higher weights will receive proportionally higher traffic.
	Weight uint32 `json:"weight,omitempty"`
	// The service account associated with the workload if a sidecar
	// is present in the workload. The service account must be present
	// in the same namespace as the configuration ( WorkloadEntry or a
	// ServiceEntry)
	ServiceAccount string `json:"serviceAccount,omitempty"`
}

`WorkloadEntry` enables operators to describe the properties of a single non-Kubernetes workload such as a VM or a bare metal server as it is are onboarded into the mesh. A `WorkloadEntry` must be accompanied by an Istio `ServiceEntry` that selects the workload through the appropriate labels and provides the service definition for a `MESH_INTERNAL` service (hostnames, port properties, etc.). A `ServiceEntry` object can select multiple workload entries as well as Kubernetes pods based on the label selector specified in the service entry.

When a workload connects to `istiod`, the status field in the custom resource will be updated to indicate the health of the workload along with other details, similar to how Kubernetes updates the status of a pod.

The following example declares a workload entry representing a VM for the `details.bookinfo.com` service. This VM has sidecar installed and bootstrapped using the `details-legacy` service account. The sidecar receives HTTP traffic on port 80 (wrapped in istio mutual TLS) and forwards it to the application on the localhost on the same port.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: WorkloadEntry metadata:

name: details-svc

spec:

# use of the service account indicates that the workload has a
# sidecar proxy bootstrapped with this service account. Pods with
# sidecars will automatically communicate with the workload using
# istio mutual TLS.
serviceAccount: details-legacy
address: 2.2.2.2
labels:
  app: details-legacy
  instance-id: vm1
# ports if not specified will be the same as service ports

```

and the associated service entry

```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:

name: details-svc

spec:

hosts:
- details.bookinfo.com
location: MESH_INTERNAL
ports:
- number: 80
  name: http
  protocol: HTTP
resolution: STATIC
workloadSelector:
  labels:
    app: details-legacy

```

The following example declares the same VM workload using its fully qualified DNS name. The service entry's resolution mode should be changed to DNS to indicate that the client-side sidecars should dynamically resolve the DNS name at runtime before forwarding the request.

```yaml apiVersion: networking.istio.io/v1alpha3 kind: WorkloadEntry metadata:

name: details-svc

spec:

# use of the service account indicates that the workload has a
# sidecar proxy bootstrapped with this service account. Pods with
# sidecars will automatically communicate with the workload using
# istio mutual TLS.
serviceAccount: details-legacy
address: vm1.vpc01.corp.net
labels:
  app: details-legacy
  instance-id: vm1
# ports if not specified will be the same as service ports

```

and the associated service entry

```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:

name: details-svc

spec:

hosts:
- details.bookinfo.com
location: MESH_INTERNAL
ports:
- number: 80
  name: http
  protocol: HTTP
resolution: DNS
workloadSelector:
  labels:
    app: details-legacy

```

func (*WorkloadEntrySpec) DeepCopy

func (in *WorkloadEntrySpec) DeepCopy() *WorkloadEntrySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEntrySpec.

func (*WorkloadEntrySpec) DeepCopyInto

func (in *WorkloadEntrySpec) DeepCopyInto(out *WorkloadEntrySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkloadGroup added in v0.0.12

type WorkloadGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              WorkloadGroupSpec    `json:"spec"`
	Status            istioApi.IstioStatus `json:"status"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object WorkloadGroup

func (*WorkloadGroup) DeepCopy added in v0.0.12

func (in *WorkloadGroup) DeepCopy() *WorkloadGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadGroup.

func (*WorkloadGroup) DeepCopyInto added in v0.0.12

func (in *WorkloadGroup) DeepCopyInto(out *WorkloadGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkloadGroup) DeepCopyObject added in v0.0.12

func (in *WorkloadGroup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WorkloadGroupList added in v0.0.12

type WorkloadGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []WorkloadGroup `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object WorkloadGroupList is a list of WorkloadGroup resources

func (*WorkloadGroupList) DeepCopy added in v0.0.12

func (in *WorkloadGroupList) DeepCopy() *WorkloadGroupList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadGroupList.

func (*WorkloadGroupList) DeepCopyInto added in v0.0.12

func (in *WorkloadGroupList) DeepCopyInto(out *WorkloadGroupList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkloadGroupList) DeepCopyObject added in v0.0.12

func (in *WorkloadGroupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WorkloadGroupObjectMeta added in v0.0.12

type WorkloadGroupObjectMeta struct {
	// Labels to attach.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations to attach.
	Annotations map[string]string `json:"annotations,omitempty"`
}

WorkloadGroupObjectMeta describes metadata that will be attached to a `WorkloadEntry`. It is a subset of the supported Kubernetes metadata.

func (*WorkloadGroupObjectMeta) DeepCopy added in v0.0.12

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadGroupObjectMeta.

func (*WorkloadGroupObjectMeta) DeepCopyInto added in v0.0.12

func (in *WorkloadGroupObjectMeta) DeepCopyInto(out *WorkloadGroupObjectMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkloadGroupSpec added in v0.0.12

type WorkloadGroupSpec struct {
	// Metadata that will be used for all corresponding `WorkloadEntries`.
	// User labels for a workload group should be set here in `metadata` rather than in `template`.
	Metadata *WorkloadGroupObjectMeta `json:"metadata,omitempty"`
	// REQUIRED. Template to be used for the generation of `WorkloadEntry` resources that belong to this `WorkloadGroup`.
	// Please note that `address` and `labels` fields should not be set in the template, and an empty `serviceAccount`
	// should default to `default`. The workload identities (mTLS certificates) will be bootstrapped using the
	// specified service account's token. Workload entries in this group will be in the same namespace as the
	// workload group, and inherit the labels and annotations from the above `metadata` field.
	Template *WorkloadEntrySpec `json:"template"`
	// `ReadinessProbe` describes the configuration the user must provide for health-checking on their workload.
	// This configuration mirrors K8S in both syntax and logic for the most part.
	Probe *ReadinessProbe `json:"probe,omitempty"`
}

func (*WorkloadGroupSpec) DeepCopy added in v0.0.12

func (in *WorkloadGroupSpec) DeepCopy() *WorkloadGroupSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadGroupSpec.

func (*WorkloadGroupSpec) DeepCopyInto added in v0.0.12

func (in *WorkloadGroupSpec) DeepCopyInto(out *WorkloadGroupSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkloadSelector

type WorkloadSelector struct {
	// One or more labels that indicate a specific set of pods/VMs
	// on which this `SidecarSpec` configuration should be applied. The scope of
	// label search is restricted to the configuration namespace in which the
	// the resource is present.
	Labels map[string]string `json:"labels"`
}

WorkloadSelector specifies the criteria used to determine if the `Gateway`, `SidecarSpec`, or `EnvoyFilter` configuration can be applied to a proxy. The matching criteria includes the metadata associated with a proxy, workload instance info such as labels attached to the pod/VM, or any other info that the proxy provides to Istio during the initial handshake. If multiple conditions are specified, all conditions need to match in order for the workload instance to be selected. Currently, only label based selection mechanism is supported.

func (*WorkloadSelector) DeepCopy

func (in *WorkloadSelector) DeepCopy() *WorkloadSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadSelector.

func (*WorkloadSelector) DeepCopyInto

func (in *WorkloadSelector) DeepCopyInto(out *WorkloadSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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