mirror of https://github.com/istio/api.git
Add v1beta1 for Networking APIs (#1232)
* Add v1beta1 networking APIs * rebase and regen
This commit is contained in:
parent
7f5243e44d
commit
7e12b4ec2f
7
Makefile
7
Makefile
|
|
@ -53,12 +53,14 @@ else
|
|||
endif
|
||||
|
||||
export TARGET_OUT ?= $(shell pwd)/out/$(TARGET_OS)_$(TARGET_ARCH)
|
||||
export TARGET_OUT_LINUX ?= $(shell pwd)/out/linux_amd64
|
||||
|
||||
ifeq ($(BUILD_WITH_CONTAINER),1)
|
||||
export TARGET_OUT = /work/out/$(TARGET_OS)_$(TARGET_ARCH)
|
||||
export TARGET_OUT_LINUX = /work/out/linux_amd64
|
||||
CONTAINER_CLI ?= docker
|
||||
DOCKER_SOCKET_MOUNT ?= -v /var/run/docker.sock:/var/run/docker.sock
|
||||
IMG ?= gcr.io/istio-testing/build-tools:master-2019-12-15T16-17-48
|
||||
IMG ?= gcr.io/istio-testing/build-tools:master-2020-01-06T18-35-13
|
||||
UID = $(shell id -u)
|
||||
GID = `grep docker /etc/group | cut -f3 -d:`
|
||||
PWD = $(shell pwd)
|
||||
|
|
@ -87,7 +89,7 @@ endif
|
|||
|
||||
ifneq (,$(wildcard $(HOME)/.kube))
|
||||
$(info Using local Kubernetes configuration $(HOME)/.kube)
|
||||
CONDITIONAL_HOST_MOUNTS+=--mount type=bind,source="$(HOME)/.kube",destination="/home/.kube",readonly
|
||||
CONDITIONAL_HOST_MOUNTS+=--mount type=bind,source="$(HOME)/.kube",destination="/home/.kube"
|
||||
endif
|
||||
|
||||
ENV_VARS:=
|
||||
|
|
@ -104,6 +106,7 @@ RUN = $(CONTAINER_CLI) run -t -i --sig-proxy=true -u $(UID):$(GID) --rm \
|
|||
-e TARGET_ARCH="$(TARGET_ARCH)" \
|
||||
-e TARGET_OS="$(TARGET_OS)" \
|
||||
-e TARGET_OUT="$(TARGET_OUT)" \
|
||||
-e TARGET_OUT_LINUX="$(TARGET_OUT_LINUX)" \
|
||||
-e USER="${USER}" \
|
||||
$(ENV_VARS) \
|
||||
-v /etc/passwd:/etc/passwd:ro \
|
||||
|
|
|
|||
|
|
@ -316,12 +316,28 @@ networking_v1alpha3_k8s_gos := \
|
|||
$(networking_v1alpha3_pb_gos) $(networking_v1alpha3_pb_docs) $(networking_v1alpha3_pb_pythons) $(networking_v1alpha3_k8s_gos): $(networking_v1alpha3_protos)
|
||||
@$(protolock) status
|
||||
@$(protoc) $(gogofast_plugin) $(protoc_gen_k8s_support_plugins) $(protoc_gen_docs_plugin_per_file)$(networking_v1alpha3_path) $(protoc_gen_python_plugin) $^
|
||||
@cp -r /tmp/istio.io/api/networking/* networking
|
||||
@cp -r /tmp/istio.io/api/networking/v1alpha3/* networking/v1alpha3
|
||||
|
||||
generate-networking: $(networking_v1alpha3_pb_gos) $(networking_v1alpha3_pb_docs) $(networking_v1alpha3_pb_pythons) $(networking_v1alpha3_k8s_gos)
|
||||
networking_v1beta1_path := networking/v1beta1
|
||||
networking_v1beta1_protos := $(wildcard $(networking_v1beta1_path)/*.proto)
|
||||
networking_v1beta1_pb_gos := $(networking_v1beta1_protos:.proto=.pb.go)
|
||||
networking_v1beta1_pb_pythons := $(patsubst $(networking_v1beta1_path)/%.proto,$(python_output_path)/$(networking_v1beta1_path)/%_pb2.py,$(networking_v1beta1_protos))
|
||||
networking_v1beta1_pb_docs := $(networking_v1beta1_protos:.proto=.pb.html)
|
||||
networking_v1beta1_openapi := $(networking_v1beta1_protos:.proto=.gen.json)
|
||||
networking_v1beta1_k8s_gos := \
|
||||
$(patsubst $(networking_v1beta1_path)/%.proto,$(networking_v1beta1_path)/%_json.gen.go,$(shell grep -l "^ *oneof " $(networking_v1beta1_protos))) \
|
||||
$(patsubst $(networking_v1beta1_path)/%.proto,$(networking_v1beta1_path)/%_deepcopy.gen.go,$(shell grep -l "+kubetype-gen" $(networking_v1beta1_protos)))
|
||||
|
||||
$(networking_v1beta1_pb_gos) $(networking_v1beta1_pb_docs) $(networking_v1beta1_pb_pythons) $(networking_v1beta1_k8s_gos): $(networking_v1beta1_protos)
|
||||
@$(protolock) status
|
||||
@$(protoc) $(gogofast_plugin) $(protoc_gen_k8s_support_plugins) $(protoc_gen_docs_plugin_per_file)$(networking_v1beta1_path) $(protoc_gen_python_plugin) $^
|
||||
@cp -r /tmp/istio.io/api/networking/v1beta1/* networking/v1beta1
|
||||
|
||||
generate-networking: $(networking_v1alpha3_pb_gos) $(networking_v1alpha3_pb_docs) $(networking_v1alpha3_pb_pythons) $(networking_v1alpha3_k8s_gos) $(networking_v1beta1_pb_gos) $(networking_v1beta1_pb_docs) $(networking_v1beta1_pb_pythons) $(networking_v1beta1_k8s_gos)
|
||||
|
||||
clean-networking:
|
||||
@rm -fr $(networking_v1alpha3_pb_gos) $(networking_v1alpha3_pb_docs) $(networking_v1alpha3_pb_pythons) $(networking_v1alpha3_k8s_gos)
|
||||
@rm -fr $(networking_v1alpha3_pb_gos) $(networking_v1alpha3_pb_docs) $(networking_v1alpha3_pb_pythons) $(networking_v1alpha3_k8s_gos) \
|
||||
$(networking_v1beta1_pb_gos) $(networking_v1beta1_pb_docs) $(networking_v1beta1_pb_pythons) $(networking_v1beta1_k8s_gos)
|
||||
|
||||
#####################
|
||||
# rbac/...
|
||||
|
|
@ -468,6 +484,7 @@ all_protos := \
|
|||
$(mixer_config_client_protos) \
|
||||
$(mixer_adapter_model_v1beta1_protos) \
|
||||
$(networking_v1alpha3_protos) \
|
||||
$(networking_v1beta1_protos) \
|
||||
$(rbac_v1alpha1_protos) \
|
||||
$(authn_v1alpha1_protos) \
|
||||
$(security_v1beta1_protos) \
|
||||
|
|
@ -483,6 +500,7 @@ all_openapi := \
|
|||
$(mixer_config_client_openapi) \
|
||||
$(mixer_adapter_model_v1beta1_openapi) \
|
||||
$(networking_v1alpha3_openapi) \
|
||||
$(networking_v1beta1_openapi) \
|
||||
$(rbac_v1alpha1_openapi) \
|
||||
$(authn_v1alpha1_openapi) \
|
||||
$(security_v1beta1_openapi) \
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
1b9a573989a5581fffead006b35476f4b683d114
|
||||
6c1331838dc0a627e306f83794b9a6407ce8a034
|
||||
|
|
|
|||
2
cue.yaml
2
cue.yaml
|
|
@ -25,6 +25,8 @@ directories:
|
|||
title: This package defines the Mixer API that the sidecar proxy uses to perform precondition checks, manage quotas, and report telemetry.
|
||||
networking/v1alpha3:
|
||||
- mode: perFile
|
||||
networking/v1beta1:
|
||||
- mode: perFile
|
||||
policy/v1beta1:
|
||||
- mode: all
|
||||
rbac/v1alpha1:
|
||||
|
|
|
|||
|
|
@ -2885,6 +2885,9 @@ spec:
|
|||
type: object
|
||||
versions:
|
||||
- name: v1alpha3
|
||||
served: true
|
||||
storage: false
|
||||
- name: v1beta1
|
||||
served: true
|
||||
storage: true
|
||||
|
||||
|
|
@ -3328,6 +3331,9 @@ spec:
|
|||
type: object
|
||||
versions:
|
||||
- name: v1alpha3
|
||||
served: true
|
||||
storage: false
|
||||
- name: v1beta1
|
||||
served: true
|
||||
storage: true
|
||||
|
||||
|
|
@ -3473,6 +3479,9 @@ spec:
|
|||
type: object
|
||||
versions:
|
||||
- name: v1alpha3
|
||||
served: true
|
||||
storage: false
|
||||
- name: v1beta1
|
||||
served: true
|
||||
storage: true
|
||||
|
||||
|
|
@ -3596,6 +3605,9 @@ spec:
|
|||
type: object
|
||||
versions:
|
||||
- name: v1alpha3
|
||||
served: true
|
||||
storage: false
|
||||
- name: v1beta1
|
||||
served: true
|
||||
storage: true
|
||||
|
||||
|
|
@ -4271,6 +4283,9 @@ spec:
|
|||
type: object
|
||||
versions:
|
||||
- name: v1alpha3
|
||||
served: true
|
||||
storage: false
|
||||
- name: v1beta1
|
||||
served: true
|
||||
storage: true
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,6 @@ func (TLSSettings_TLSmode) EnumDescriptor() ([]byte, []int) {
|
|||
// <!-- crd generation tags
|
||||
// +cue-gen:DestinationRule:groupName:networking.istio.io
|
||||
// +cue-gen:DestinationRule:version:v1alpha3
|
||||
// +cue-gen:DestinationRule:storageVersion
|
||||
// +cue-gen:DestinationRule:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:DestinationRule:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:DestinationRule:subresource:status
|
||||
|
|
|
|||
|
|
@ -105,7 +105,6 @@ option go_package = "istio.io/api/networking/v1alpha3";
|
|||
// <!-- crd generation tags
|
||||
// +cue-gen:DestinationRule:groupName:networking.istio.io
|
||||
// +cue-gen:DestinationRule:version:v1alpha3
|
||||
// +cue-gen:DestinationRule:storageVersion
|
||||
// +cue-gen:DestinationRule:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:DestinationRule:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:DestinationRule:subresource:status
|
||||
|
|
|
|||
|
|
@ -298,7 +298,6 @@ func (Server_TLSOptions_TLSProtocol) EnumDescriptor() ([]byte, []int) {
|
|||
// <!-- crd generation tags
|
||||
// +cue-gen:Gateway:groupName:networking.istio.io
|
||||
// +cue-gen:Gateway:version:v1alpha3
|
||||
// +cue-gen:Gateway:storageVersion
|
||||
// +cue-gen:Gateway:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:Gateway:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:Gateway:subresource:status
|
||||
|
|
|
|||
|
|
@ -203,7 +203,6 @@ option go_package = "istio.io/api/networking/v1alpha3";
|
|||
// <!-- crd generation tags
|
||||
// +cue-gen:Gateway:groupName:networking.istio.io
|
||||
// +cue-gen:Gateway:version:v1alpha3
|
||||
// +cue-gen:Gateway:storageVersion
|
||||
// +cue-gen:Gateway:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:Gateway:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:Gateway:subresource:status
|
||||
|
|
|
|||
|
|
@ -431,7 +431,6 @@ func (ServiceEntry_Resolution) EnumDescriptor() ([]byte, []int) {
|
|||
// <!-- crd generation tags
|
||||
// +cue-gen:ServiceEntry:groupName:networking.istio.io
|
||||
// +cue-gen:ServiceEntry:version:v1alpha3
|
||||
// +cue-gen:ServiceEntry:storageVersion
|
||||
// +cue-gen:ServiceEntry:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:ServiceEntry:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:ServiceEntry:subresource:status
|
||||
|
|
|
|||
|
|
@ -345,7 +345,6 @@ option go_package = "istio.io/api/networking/v1alpha3";
|
|||
// <!-- crd generation tags
|
||||
// +cue-gen:ServiceEntry:groupName:networking.istio.io
|
||||
// +cue-gen:ServiceEntry:version:v1alpha3
|
||||
// +cue-gen:ServiceEntry:storageVersion
|
||||
// +cue-gen:ServiceEntry:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:ServiceEntry:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:ServiceEntry:subresource:status
|
||||
|
|
|
|||
|
|
@ -299,7 +299,6 @@ func (OutboundTrafficPolicy_Mode) EnumDescriptor() ([]byte, []int) {
|
|||
// <!-- crd generation tags
|
||||
// +cue-gen:Sidecar:groupName:networking.istio.io
|
||||
// +cue-gen:Sidecar:version:v1alpha3
|
||||
// +cue-gen:Sidecar:storageVersion
|
||||
// +cue-gen:Sidecar:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:Sidecar:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:Sidecar:subresource:status
|
||||
|
|
|
|||
|
|
@ -236,7 +236,6 @@ option go_package = "istio.io/api/networking/v1alpha3";
|
|||
// <!-- crd generation tags
|
||||
// +cue-gen:Sidecar:groupName:networking.istio.io
|
||||
// +cue-gen:Sidecar:version:v1alpha3
|
||||
// +cue-gen:Sidecar:storageVersion
|
||||
// +cue-gen:Sidecar:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:Sidecar:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:Sidecar:subresource:status
|
||||
|
|
|
|||
|
|
@ -122,7 +122,6 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|||
// <!-- crd generation tags
|
||||
// +cue-gen:VirtualService:groupName:networking.istio.io
|
||||
// +cue-gen:VirtualService:version:v1alpha3
|
||||
// +cue-gen:VirtualService:storageVersion
|
||||
// +cue-gen:VirtualService:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:VirtualService:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:VirtualService:subresource:status
|
||||
|
|
|
|||
|
|
@ -124,7 +124,6 @@ option go_package = "istio.io/api/networking/v1alpha3";
|
|||
// <!-- crd generation tags
|
||||
// +cue-gen:VirtualService:groupName:networking.istio.io
|
||||
// +cue-gen:VirtualService:version:v1alpha3
|
||||
// +cue-gen:VirtualService:storageVersion
|
||||
// +cue-gen:VirtualService:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:VirtualService:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:VirtualService:subresource:status
|
||||
|
|
|
|||
|
|
@ -0,0 +1,467 @@
|
|||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Configuration affecting load balancing, outlier detection, etc.",
|
||||
"version": "v1beta1"
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"istio.networking.v1beta1.DestinationRule": {
|
||||
"description": "DestinationRule defines policies that apply to traffic intended for a service after routing has occurred.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"host": {
|
||||
"description": "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/service-entry/#ServiceEntry). Rules defined for services that do not exist in the service registry will be ignored.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"trafficPolicy": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.TrafficPolicy"
|
||||
},
|
||||
"subsets": {
|
||||
"description": "One or more named sets that represent individual versions of a service. Traffic policies can be overridden at subset level.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Subset"
|
||||
}
|
||||
},
|
||||
"exportTo": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.TrafficPolicy": {
|
||||
"description": "Traffic policies to apply for a specific destination, across all destination ports. See DestinationRule for examples.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"loadBalancer": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.LoadBalancerSettings"
|
||||
},
|
||||
"connectionPool": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.ConnectionPoolSettings"
|
||||
},
|
||||
"outlierDetection": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.OutlierDetection"
|
||||
},
|
||||
"tls": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.TLSSettings"
|
||||
},
|
||||
"portLevelSettings": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.TrafficPolicy.PortTrafficPolicy"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.Subset": {
|
||||
"description": "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/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).",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Name of the subset. The service name and the subset name can be used for traffic splitting in a route rule.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"trafficPolicy": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.TrafficPolicy"
|
||||
},
|
||||
"labels": {
|
||||
"description": "Labels apply a filter over the endpoints of a service in the service registry. See route rules for examples of usage.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.LoadBalancerSettings": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"simple"
|
||||
],
|
||||
"properties": {
|
||||
"localityLbSetting": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.LocalityLoadBalancerSetting"
|
||||
},
|
||||
"simple": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.LoadBalancerSettings.SimpleLB"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"consistentHash"
|
||||
],
|
||||
"properties": {
|
||||
"localityLbSetting": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.LocalityLoadBalancerSetting"
|
||||
},
|
||||
"consistentHash": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.LoadBalancerSettings.ConsistentHashLB"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"istio.networking.v1beta1.ConnectionPoolSettings": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tcp": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.ConnectionPoolSettings.TCPSettings"
|
||||
},
|
||||
"http": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.ConnectionPoolSettings.HTTPSettings"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.OutlierDetection": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"interval": {
|
||||
"description": "Time interval between ejection sweep analysis. format: 1h/1m/1s/1ms. MUST BE \u003e=1ms. Default is 10s.",
|
||||
"type": "string"
|
||||
},
|
||||
"consecutiveErrors": {
|
||||
"description": "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. $hide_from_docs",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"deprecated": true
|
||||
},
|
||||
"consecutiveGatewayErrors": {
|
||||
"description": "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.",
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
"consecutive5xxErrors": {
|
||||
"description": "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.",
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
"baseEjectionTime": {
|
||||
"description": "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 \u003e=1ms. Default is 30s.",
|
||||
"type": "string"
|
||||
},
|
||||
"maxEjectionPercent": {
|
||||
"description": "Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. Defaults to 10%.",
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"minHealthPercent": {
|
||||
"description": "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.",
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.TLSSettings": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"mode": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.TLSSettings.TLSmode"
|
||||
},
|
||||
"clientCertificate": {
|
||||
"description": "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`.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"privateKey": {
|
||||
"description": "REQUIRED if mode is `MUTUAL`. The path to the file holding the client's private key. Should be empty if mode is `ISTIO_MUTUAL`.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"caCertificates": {
|
||||
"description": "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`.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"subjectAltNames": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"sni": {
|
||||
"description": "SNI string to present to the server during TLS handshake.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.TrafficPolicy.PortTrafficPolicy": {
|
||||
"description": "Traffic policies that apply to specific ports of the service",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"loadBalancer": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.LoadBalancerSettings"
|
||||
},
|
||||
"connectionPool": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.ConnectionPoolSettings"
|
||||
},
|
||||
"outlierDetection": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.OutlierDetection"
|
||||
},
|
||||
"tls": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.TLSSettings"
|
||||
},
|
||||
"port": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.PortSelector"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.PortSelector": {
|
||||
"description": "PortSelector specifies the number of a port to be used for matching or selection for final routing.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"number": {
|
||||
"description": "Valid port number",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.LocalityLoadBalancerSetting": {
|
||||
"description": "Locality-weighted load balancing allows administrators to control the distribution of traffic to endpoints based on the localities of where the traffic originates and where it will terminate. These localities are specified using arbitrary labels that designate a hierarchy of localities in {region}/{zone}/{sub-zone} form. For additional detail refer to [Locality Weight](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight) The following example shows how to setup locality weights mesh-wide.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"distribute": {
|
||||
"description": "Optional: only one of distribute or failover can be set. Explicitly specify loadbalancing weight across different zones and geographical locations. Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight) If empty, the locality weight is set according to the endpoints number within it.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.LocalityLoadBalancerSetting.Distribute"
|
||||
}
|
||||
},
|
||||
"failover": {
|
||||
"description": "Optional: only failover or distribute can be set. Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy. Should be used together with OutlierDetection to detect unhealthy endpoints. Note: if no OutlierDetection specified, this will not take effect.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.LocalityLoadBalancerSetting.Failover"
|
||||
}
|
||||
},
|
||||
"enabled": {
|
||||
"description": "enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.",
|
||||
"type": "boolean",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.LoadBalancerSettings.SimpleLB": {
|
||||
"description": "Standard load balancing algorithms that require no tuning.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ROUND_ROBIN",
|
||||
"LEAST_CONN",
|
||||
"RANDOM",
|
||||
"PASSTHROUGH"
|
||||
]
|
||||
},
|
||||
"istio.networking.v1beta1.LoadBalancerSettings.ConsistentHashLB": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"httpHeaderName"
|
||||
],
|
||||
"properties": {
|
||||
"minimumRingSize": {
|
||||
"description": "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.",
|
||||
"type": "integer"
|
||||
},
|
||||
"httpHeaderName": {
|
||||
"description": "Hash based on a specific HTTP header.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"httpCookie"
|
||||
],
|
||||
"properties": {
|
||||
"minimumRingSize": {
|
||||
"description": "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.",
|
||||
"type": "integer"
|
||||
},
|
||||
"httpCookie": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.LoadBalancerSettings.ConsistentHashLB.HTTPCookie"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"useSourceIp"
|
||||
],
|
||||
"properties": {
|
||||
"minimumRingSize": {
|
||||
"description": "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.",
|
||||
"type": "integer"
|
||||
},
|
||||
"useSourceIp": {
|
||||
"description": "Hash based on the source IP address.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"istio.networking.v1beta1.LoadBalancerSettings.ConsistentHashLB.HTTPCookie": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "Path to set for the cookie.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "Name of the cookie.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"ttl": {
|
||||
"description": "Lifetime of the cookie.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.ConnectionPoolSettings.TCPSettings": {
|
||||
"description": "Settings common to both HTTP and TCP upstream connections.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"maxConnections": {
|
||||
"description": "Maximum number of HTTP1 /TCP connections to a destination host. Default 2^32-1.",
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"connectTimeout": {
|
||||
"description": "TCP connection timeout.",
|
||||
"type": "string"
|
||||
},
|
||||
"tcpKeepalive": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.ConnectionPoolSettings.TCPSettings.TcpKeepalive"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.ConnectionPoolSettings.HTTPSettings": {
|
||||
"description": "Settings applicable to HTTP1.1/HTTP2/GRPC connections.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"http1MaxPendingRequests": {
|
||||
"description": "Maximum number of pending HTTP requests to a destination. Default 2^32-1.",
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"http2MaxRequests": {
|
||||
"description": "Maximum number of requests to a backend. Default 2^32-1.",
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"maxRequestsPerConnection": {
|
||||
"description": "Maximum number of requests per connection to a backend. Setting this parameter to 1 disables keep alive. Default 0, meaning \"unlimited\", up to 2^29.",
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"maxRetries": {
|
||||
"description": "Maximum number of retries that can be outstanding to all hosts in a cluster at a given time. Defaults to 2^32-1.",
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"idleTimeout": {
|
||||
"description": "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, the default is 1 hour. 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.",
|
||||
"type": "string"
|
||||
},
|
||||
"h2UpgradePolicy": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.ConnectionPoolSettings.TCPSettings.TcpKeepalive": {
|
||||
"description": "TCP keepalive.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"time": {
|
||||
"description": "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.)",
|
||||
"type": "string"
|
||||
},
|
||||
"probes": {
|
||||
"description": "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.)",
|
||||
"type": "integer"
|
||||
},
|
||||
"interval": {
|
||||
"description": "The time duration between keep-alive probes. Default is to use the OS level configuration (unless overridden, Linux defaults to 75s.)",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy": {
|
||||
"description": "Policy for upgrading http1.1 connections to http2.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"DEFAULT",
|
||||
"DO_NOT_UPGRADE",
|
||||
"UPGRADE"
|
||||
]
|
||||
},
|
||||
"istio.networking.v1beta1.TLSSettings.TLSmode": {
|
||||
"description": "TLS connection mode",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"DISABLE",
|
||||
"SIMPLE",
|
||||
"MUTUAL",
|
||||
"ISTIO_MUTUAL"
|
||||
]
|
||||
},
|
||||
"istio.networking.v1beta1.LocalityLoadBalancerSetting.Distribute": {
|
||||
"description": "Describes how traffic originating in the 'from' zone or sub-zone is distributed over a set of 'to' zones. Syntax for specifying a zone is {region}/{zone}/{sub-zone} and terminal wildcards are allowed on any segment of the specification. Examples: * - matches all localities us-west/* - all zones and sub-zones within the us-west region us-west/zone-1/* - all sub-zones within us-west/zone-1",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"from": {
|
||||
"description": "Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "Map of upstream localities to traffic distribution weights. The sum of all weights should be == 100. Any locality not assigned a weight will receive no traffic.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.LocalityLoadBalancerSetting.Failover": {
|
||||
"description": "Specify the traffic failover policy across regions. Since zone and sub-zone failover is supported by default this only needs to be specified for regions when the operator needs to constrain traffic failover so that the default behavior of failing over to any endpoint globally does not apply. This is useful when failing over traffic across regions would not improve service health or may need to be restricted for other reasons like regulatory controls.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"from": {
|
||||
"description": "Originating region.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "Destination region the traffic will fail over to when endpoints in the 'from' region becomes unhealthy.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,781 @@
|
|||
// Copyright 2020 Istio Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
syntax = "proto3";
|
||||
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "networking/v1beta1/virtual_service.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
// $schema: istio.networking.v1beta1.DestinationRule
|
||||
// $title: Destination Rule
|
||||
// $description: Configuration affecting load balancing, outlier detection, etc.
|
||||
// $location: https://istio.io/docs/reference/config/networking/destination-rule.html
|
||||
// $aliases: [/docs/reference/config/networking/v1beta1/destination-rule]
|
||||
|
||||
// `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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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
|
||||
// ```
|
||||
package istio.networking.v1beta1;
|
||||
|
||||
option go_package = "istio.io/api/networking/v1beta1";
|
||||
|
||||
// DestinationRule defines policies that apply to traffic intended for a service
|
||||
// after routing has occurred.
|
||||
//
|
||||
// <!-- crd generation tags
|
||||
// +cue-gen:DestinationRule:groupName:networking.istio.io
|
||||
// +cue-gen:DestinationRule:version:v1beta1
|
||||
// +cue-gen:DestinationRule:storageVersion
|
||||
// +cue-gen:DestinationRule:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:DestinationRule:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:DestinationRule:subresource:status
|
||||
// +cue-gen:DestinationRule:scope:Namespaced
|
||||
// +cue-gen:DestinationRule:resource:categories=istio-io,networking-istio-io,shortNames=dr
|
||||
// +cue-gen:DestinationRule:printerColumn:name=Host,type=string,JSONPath=.spec.host,description="The name of a service from the service registry"
|
||||
// +cue-gen:DestinationRule:printerColumn:name=Age,type=date,JSONPath=.metadata.creationTimestamp,description="CreationTimestamp is a timestamp
|
||||
// representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations.
|
||||
// Clients may not set this value. It is represented in RFC3339 form and is in UTC.
|
||||
// Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata"
|
||||
// -->
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=networking.istio.io/v1beta1
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message DestinationRule {
|
||||
// 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/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.
|
||||
string host = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Traffic policies to apply (load balancing policy, connection pool
|
||||
// sizes, outlier detection).
|
||||
TrafficPolicy traffic_policy = 2;
|
||||
|
||||
// One or more named sets that represent individual versions of a
|
||||
// service. Traffic policies can be overridden at subset level.
|
||||
repeated Subset subsets = 3;
|
||||
|
||||
// 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).
|
||||
repeated string export_to = 4;
|
||||
}
|
||||
|
||||
// Traffic policies to apply for a specific destination, across all
|
||||
// destination ports. See DestinationRule for examples.
|
||||
message TrafficPolicy {
|
||||
// Settings controlling the load balancer algorithms.
|
||||
LoadBalancerSettings load_balancer = 1;
|
||||
|
||||
// Settings controlling the volume of connections to an upstream service
|
||||
ConnectionPoolSettings connection_pool = 2;
|
||||
|
||||
// Settings controlling eviction of unhealthy hosts from the load balancing pool
|
||||
OutlierDetection outlier_detection = 3;
|
||||
|
||||
// TLS related settings for connections to the upstream service.
|
||||
TLSSettings tls = 4;
|
||||
|
||||
// Traffic policies that apply to specific ports of the service
|
||||
message PortTrafficPolicy {
|
||||
// Specifies the number of a port on the destination service
|
||||
// on which this policy is being applied.
|
||||
PortSelector port = 1;
|
||||
|
||||
// Settings controlling the load balancer algorithms.
|
||||
LoadBalancerSettings load_balancer = 2;
|
||||
|
||||
// Settings controlling the volume of connections to an upstream service
|
||||
ConnectionPoolSettings connection_pool = 3;
|
||||
|
||||
// Settings controlling eviction of unhealthy hosts from the load balancing pool
|
||||
OutlierDetection outlier_detection = 4;
|
||||
|
||||
// TLS related settings for connections to the upstream service.
|
||||
TLSSettings tls = 5;
|
||||
}
|
||||
|
||||
// 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.
|
||||
repeated PortTrafficPolicy port_level_settings = 5;
|
||||
}
|
||||
|
||||
// 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/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/v1beta1
|
||||
// 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.
|
||||
message Subset {
|
||||
// Name of the subset. The service name and the subset name can
|
||||
// be used for traffic splitting in a route rule.
|
||||
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Labels apply a filter over the endpoints of a service in the
|
||||
// service registry. See route rules for examples of usage.
|
||||
map<string, string> labels = 2;
|
||||
|
||||
// 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 traffic_policy = 3;
|
||||
}
|
||||
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// kind: DestinationRule
|
||||
// metadata:
|
||||
// name: bookinfo-ratings
|
||||
// spec:
|
||||
// host: ratings.prod.svc.cluster.local
|
||||
// trafficPolicy:
|
||||
// loadBalancer:
|
||||
// consistentHash:
|
||||
// httpCookie:
|
||||
// name: user
|
||||
// ttl: 0s
|
||||
// ```
|
||||
//
|
||||
message LoadBalancerSettings {
|
||||
// Standard load balancing algorithms that require no tuning.
|
||||
enum SimpleLB {
|
||||
// Round Robin policy. Default
|
||||
ROUND_ROBIN = 0;
|
||||
|
||||
// The least request load balancer uses an O(1) algorithm which selects
|
||||
// two random healthy hosts and picks the host which has fewer active
|
||||
// requests.
|
||||
LEAST_CONN = 1;
|
||||
|
||||
// The random load balancer selects a random healthy host. The random
|
||||
// load balancer generally performs better than round robin if no health
|
||||
// checking policy is configured.
|
||||
RANDOM = 2;
|
||||
|
||||
// This option will forward the connection to the original IP address
|
||||
// requested by the caller without doing any form of load
|
||||
// balancing. This option must be used with care. It is meant for
|
||||
// advanced use cases. Refer to Original Destination load balancer in
|
||||
// Envoy for further details.
|
||||
PASSTHROUGH = 3;
|
||||
};
|
||||
|
||||
// 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.
|
||||
message ConsistentHashLB {
|
||||
// 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.
|
||||
message HTTPCookie {
|
||||
// Name of the cookie.
|
||||
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
// Path to set for the cookie.
|
||||
string path = 2;
|
||||
// Lifetime of the cookie.
|
||||
google.protobuf.Duration ttl = 3 [(google.api.field_behavior) = REQUIRED, (gogoproto.stdduration) = true];
|
||||
};
|
||||
|
||||
// The hash key to use.
|
||||
oneof hash_key {
|
||||
// Hash based on a specific HTTP header.
|
||||
string http_header_name = 1;
|
||||
|
||||
// Hash based on HTTP cookie.
|
||||
HTTPCookie http_cookie = 2;
|
||||
|
||||
// Hash based on the source IP address.
|
||||
bool use_source_ip = 3;
|
||||
};
|
||||
|
||||
// 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.
|
||||
uint64 minimum_ring_size = 4;
|
||||
};
|
||||
|
||||
// (-- TODO: Enable Subset load balancing after moving to v2 API Also
|
||||
// look into enabling Priotity based load balancing for spilling over
|
||||
// from one priority pool to another. --)
|
||||
|
||||
// Upstream load balancing policy.
|
||||
oneof lb_policy {
|
||||
SimpleLB simple = 1;
|
||||
ConsistentHashLB consistent_hash = 2;
|
||||
}
|
||||
|
||||
// Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
|
||||
// between this object and the object one in MeshConfig
|
||||
LocalityLoadBalancerSetting locality_lb_setting = 3;
|
||||
}
|
||||
|
||||
// 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/v1beta1
|
||||
// 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
|
||||
// ```
|
||||
message ConnectionPoolSettings {
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
message TCPSettings {
|
||||
// TCP keepalive.
|
||||
message TcpKeepalive {
|
||||
// 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.)
|
||||
uint32 probes = 1;
|
||||
|
||||
// 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.)
|
||||
google.protobuf.Duration time = 2;
|
||||
|
||||
// The time duration between keep-alive probes.
|
||||
// Default is to use the OS level configuration
|
||||
// (unless overridden, Linux defaults to 75s.)
|
||||
google.protobuf.Duration interval = 3;
|
||||
};
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host. Default 2^32-1.
|
||||
int32 max_connections = 1;
|
||||
|
||||
// TCP connection timeout.
|
||||
google.protobuf.Duration connect_timeout = 2;
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
|
||||
TcpKeepalive tcp_keepalive = 3;
|
||||
};
|
||||
|
||||
// Settings applicable to HTTP1.1/HTTP2/GRPC connections.
|
||||
message HTTPSettings {
|
||||
// Maximum number of pending HTTP requests to a destination. Default 2^32-1.
|
||||
int32 http1_max_pending_requests = 1;
|
||||
|
||||
// Maximum number of requests to a backend. Default 2^32-1.
|
||||
int32 http2_max_requests = 2;
|
||||
|
||||
// Maximum number of requests per connection to a backend. Setting this
|
||||
// parameter to 1 disables keep alive. Default 0, meaning "unlimited",
|
||||
// up to 2^29.
|
||||
int32 max_requests_per_connection = 3;
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts in a
|
||||
// cluster at a given time. Defaults to 2^32-1.
|
||||
int32 max_retries = 4;
|
||||
|
||||
// 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, the default is 1 hour. 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.
|
||||
google.protobuf.Duration idle_timeout = 5;
|
||||
|
||||
// Policy for upgrading http1.1 connections to http2.
|
||||
enum H2UpgradePolicy {
|
||||
// Use the global default.
|
||||
DEFAULT = 0;
|
||||
// Do not upgrade the connection to http2.
|
||||
// This opt-out option overrides the default.
|
||||
DO_NOT_UPGRADE = 1;
|
||||
// Upgrade the connection to http2.
|
||||
// This opt-in option overrides the default.
|
||||
UPGRADE = 2;
|
||||
};
|
||||
// Specify if http1.1 connection should be upgraded to http2 for the associated destination.
|
||||
H2UpgradePolicy h2_upgrade_policy = 6;
|
||||
};
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
TCPSettings tcp = 1;
|
||||
// HTTP connection pool settings.
|
||||
HTTPSettings http = 2;
|
||||
}
|
||||
|
||||
// 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 HTTP1 connections
|
||||
// with no more than 10 req/connection to the "reviews" service. In addition,
|
||||
// it sets a limit of 1000 concurrent HTTP2 requests and configures upstream
|
||||
// hosts to be scanned every 5 mins so that any host that fails 7 consecutive
|
||||
// times with a 502, 503, or 504 error code will be ejected for 15 minutes.
|
||||
//
|
||||
// ```yaml
|
||||
// apiVersion: networking.istio.io/v1beta1
|
||||
// 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
|
||||
// ```
|
||||
message OutlierDetection {
|
||||
// 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.
|
||||
// $hide_from_docs
|
||||
int32 consecutive_errors = 1 [deprecated=true];
|
||||
|
||||
// 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.
|
||||
google.protobuf.UInt32Value consecutive_gateway_errors = 6;
|
||||
|
||||
// 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.
|
||||
google.protobuf.UInt32Value consecutive_5xx_errors = 7;
|
||||
|
||||
// Time interval between ejection sweep analysis. format:
|
||||
// 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
|
||||
google.protobuf.Duration interval = 2;
|
||||
|
||||
// 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.
|
||||
google.protobuf.Duration base_ejection_time = 3;
|
||||
|
||||
// Maximum % of hosts in the load balancing pool for the upstream
|
||||
// service that can be ejected. Defaults to 10%.
|
||||
int32 max_ejection_percent = 4;
|
||||
|
||||
// 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.
|
||||
int32 min_health_percent = 5;
|
||||
}
|
||||
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// kind: DestinationRule
|
||||
// metadata:
|
||||
// name: ratings-istio-mtls
|
||||
// spec:
|
||||
// host: ratings.prod.svc.cluster.local
|
||||
// trafficPolicy:
|
||||
// tls:
|
||||
// mode: ISTIO_MUTUAL
|
||||
// ```
|
||||
message TLSSettings {
|
||||
// TLS connection mode
|
||||
enum TLSmode {
|
||||
// Do not setup a TLS connection to the upstream endpoint.
|
||||
DISABLE = 0;
|
||||
|
||||
// Originate a TLS connection to the upstream endpoint.
|
||||
SIMPLE = 1;
|
||||
|
||||
// Secure connections to the upstream using mutual TLS by presenting
|
||||
// client certificates for authentication.
|
||||
MUTUAL = 2;
|
||||
|
||||
// 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.
|
||||
ISTIO_MUTUAL = 3;
|
||||
};
|
||||
|
||||
// Indicates whether connections to this port should be secured
|
||||
// using TLS. The value of this field determines how TLS is enforced.
|
||||
TLSmode mode = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// 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`.
|
||||
string client_certificate = 2;
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`. The path to the file holding the
|
||||
// client's private key.
|
||||
// Should be empty if mode is `ISTIO_MUTUAL`.
|
||||
string private_key = 3;
|
||||
|
||||
// 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`.
|
||||
string ca_certificates = 4;
|
||||
|
||||
// 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.
|
||||
repeated string subject_alt_names = 5;
|
||||
|
||||
// SNI string to present to the server during TLS handshake.
|
||||
string sni = 6;
|
||||
}
|
||||
|
||||
// Locality-weighted load balancing allows administrators to control the
|
||||
// distribution of traffic to endpoints based on the localities of where the
|
||||
// traffic originates and where it will terminate. These localities are
|
||||
// specified using arbitrary labels that designate a hierarchy of localities in
|
||||
// {region}/{zone}/{sub-zone} form. For additional detail refer to
|
||||
// [Locality Weight](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
|
||||
// The following example shows how to setup locality weights mesh-wide.
|
||||
//
|
||||
// Given a mesh with workloads and their service deployed to "us-west/zone1/*"
|
||||
// and "us-west/zone2/*". This example specifies that when traffic accessing a
|
||||
// service originates from workloads in "us-west/zone1/*", 80% of the traffic
|
||||
// will be sent to endpoints in "us-west/zone1/*", i.e the same zone, and the
|
||||
// remaining 20% will go to endpoints in "us-west/zone2/*". This setup is
|
||||
// intended to favor routing traffic to endpoints in the same locality.
|
||||
// A similar setting is specified for traffic originating in "us-west/zone2/*".
|
||||
//
|
||||
// ```yaml
|
||||
// distribute:
|
||||
// - from: us-west/zone1/*
|
||||
// to:
|
||||
// "us-west/zone1/*": 80
|
||||
// "us-west/zone2/*": 20
|
||||
// - from: us-west/zone2/*
|
||||
// to:
|
||||
// "us-west/zone1/*": 20
|
||||
// "us-west/zone2/*": 80
|
||||
// ```
|
||||
//
|
||||
// If the goal of the operator is not to distribute load across zones and
|
||||
// regions but rather to restrict the regionality of failover to meet other
|
||||
// operational requirements an operator can set a 'failover' policy instead of
|
||||
// a 'distribute' policy.
|
||||
//
|
||||
// The following example sets up a locality failover policy for regions.
|
||||
// Assume a service resides in zones within us-east, us-west & eu-west
|
||||
// this example specifies that when endpoints within us-east become unhealthy
|
||||
// traffic should failover to endpoints in any zone or sub-zone within eu-west
|
||||
// and similarly us-west should failover to us-east.
|
||||
//
|
||||
// ```yaml
|
||||
// failover:
|
||||
// - from: us-east
|
||||
// to: eu-west
|
||||
// - from: us-west
|
||||
// to: us-east
|
||||
// ```
|
||||
// Locality load balancing settings.
|
||||
message LocalityLoadBalancerSetting{
|
||||
// Describes how traffic originating in the 'from' zone or sub-zone is
|
||||
// distributed over a set of 'to' zones. Syntax for specifying a zone is
|
||||
// {region}/{zone}/{sub-zone} and terminal wildcards are allowed on any
|
||||
// segment of the specification. Examples:
|
||||
// * - matches all localities
|
||||
// us-west/* - all zones and sub-zones within the us-west region
|
||||
// us-west/zone-1/* - all sub-zones within us-west/zone-1
|
||||
message Distribute{
|
||||
// Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
|
||||
string from = 1;
|
||||
|
||||
// Map of upstream localities to traffic distribution weights. The sum of
|
||||
// all weights should be == 100. Any locality not assigned a weight will
|
||||
// receive no traffic.
|
||||
map<string, uint32> to = 2;
|
||||
};
|
||||
|
||||
// Specify the traffic failover policy across regions. Since zone and sub-zone
|
||||
// failover is supported by default this only needs to be specified for
|
||||
// regions when the operator needs to constrain traffic failover so that
|
||||
// the default behavior of failing over to any endpoint globally does not
|
||||
// apply. This is useful when failing over traffic across regions would not
|
||||
// improve service health or may need to be restricted for other reasons
|
||||
// like regulatory controls.
|
||||
message Failover{
|
||||
// Originating region.
|
||||
string from = 1;
|
||||
|
||||
// Destination region the traffic will fail over to when endpoints in
|
||||
// the 'from' region becomes unhealthy.
|
||||
string to = 2;
|
||||
};
|
||||
|
||||
// Optional: only one of distribute or failover can be set.
|
||||
// Explicitly specify loadbalancing weight across different zones and geographical locations.
|
||||
// Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
|
||||
// If empty, the locality weight is set according to the endpoints number within it.
|
||||
repeated Distribute distribute = 1;
|
||||
|
||||
// Optional: only failover or distribute can be set.
|
||||
// Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
|
||||
// Should be used together with OutlierDetection to detect unhealthy endpoints.
|
||||
// Note: if no OutlierDetection specified, this will not take effect.
|
||||
repeated Failover failover = 2;
|
||||
|
||||
// enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
|
||||
// e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
|
||||
google.protobuf.BoolValue enabled = 3;
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: networking/v1beta1/destination_rule.proto
|
||||
|
||||
// `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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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
|
||||
// ```
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/gogo/protobuf/types"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// DeepCopyInto supports using DestinationRule within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *DestinationRule) DeepCopyInto(out *DestinationRule) {
|
||||
p := proto.Clone(in).(*DestinationRule)
|
||||
*out = *p
|
||||
}
|
||||
|
|
@ -0,0 +1,272 @@
|
|||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: networking/v1beta1/destination_rule.proto
|
||||
|
||||
// `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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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
|
||||
// ```
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/gogo/protobuf/types"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for DestinationRule
|
||||
func (this *DestinationRule) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for DestinationRule
|
||||
func (this *DestinationRule) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for TrafficPolicy
|
||||
func (this *TrafficPolicy) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for TrafficPolicy
|
||||
func (this *TrafficPolicy) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for TrafficPolicy_PortTrafficPolicy
|
||||
func (this *TrafficPolicy_PortTrafficPolicy) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for TrafficPolicy_PortTrafficPolicy
|
||||
func (this *TrafficPolicy_PortTrafficPolicy) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Subset
|
||||
func (this *Subset) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Subset
|
||||
func (this *Subset) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for LoadBalancerSettings
|
||||
func (this *LoadBalancerSettings) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for LoadBalancerSettings
|
||||
func (this *LoadBalancerSettings) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for LoadBalancerSettings_ConsistentHashLB
|
||||
func (this *LoadBalancerSettings_ConsistentHashLB) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for LoadBalancerSettings_ConsistentHashLB
|
||||
func (this *LoadBalancerSettings_ConsistentHashLB) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for LoadBalancerSettings_ConsistentHashLB_HTTPCookie
|
||||
func (this *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for LoadBalancerSettings_ConsistentHashLB_HTTPCookie
|
||||
func (this *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for ConnectionPoolSettings
|
||||
func (this *ConnectionPoolSettings) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for ConnectionPoolSettings
|
||||
func (this *ConnectionPoolSettings) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for ConnectionPoolSettings_TCPSettings
|
||||
func (this *ConnectionPoolSettings_TCPSettings) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for ConnectionPoolSettings_TCPSettings
|
||||
func (this *ConnectionPoolSettings_TCPSettings) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for ConnectionPoolSettings_TCPSettings_TcpKeepalive
|
||||
func (this *ConnectionPoolSettings_TCPSettings_TcpKeepalive) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for ConnectionPoolSettings_TCPSettings_TcpKeepalive
|
||||
func (this *ConnectionPoolSettings_TCPSettings_TcpKeepalive) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for ConnectionPoolSettings_HTTPSettings
|
||||
func (this *ConnectionPoolSettings_HTTPSettings) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for ConnectionPoolSettings_HTTPSettings
|
||||
func (this *ConnectionPoolSettings_HTTPSettings) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for OutlierDetection
|
||||
func (this *OutlierDetection) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for OutlierDetection
|
||||
func (this *OutlierDetection) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for TLSSettings
|
||||
func (this *TLSSettings) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for TLSSettings
|
||||
func (this *TLSSettings) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for LocalityLoadBalancerSetting
|
||||
func (this *LocalityLoadBalancerSetting) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for LocalityLoadBalancerSetting
|
||||
func (this *LocalityLoadBalancerSetting) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for LocalityLoadBalancerSetting_Distribute
|
||||
func (this *LocalityLoadBalancerSetting_Distribute) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for LocalityLoadBalancerSetting_Distribute
|
||||
func (this *LocalityLoadBalancerSetting_Distribute) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for LocalityLoadBalancerSetting_Failover
|
||||
func (this *LocalityLoadBalancerSetting_Failover) MarshalJSON() ([]byte, error) {
|
||||
str, err := DestinationRuleMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for LocalityLoadBalancerSetting_Failover
|
||||
func (this *LocalityLoadBalancerSetting_Failover) UnmarshalJSON(b []byte) error {
|
||||
return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
DestinationRuleMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
DestinationRuleUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{}
|
||||
)
|
||||
|
|
@ -0,0 +1,174 @@
|
|||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Configuration affecting edge load balancer.",
|
||||
"version": "v1beta1"
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"istio.networking.v1beta1.Gateway": {
|
||||
"description": "Gateway describes a load balancer operating at the edge of the mesh receiving incoming or outgoing HTTP/TCP connections.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"servers": {
|
||||
"description": "A list of server specifications.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Server"
|
||||
}
|
||||
},
|
||||
"selector": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.Server": {
|
||||
"description": "`Server` describes the properties of the proxy on a given load balancer port. For example,",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tls": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Server.TLSOptions"
|
||||
},
|
||||
"port": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Port"
|
||||
},
|
||||
"bind": {
|
||||
"description": "The ip or the Unix domain socket to which the listener should be bound to. Format: `x.x.x.x` or `unix:///path/to/uds` or `unix://@foobar` (Linux abstract namespace). When using Unix domain sockets, the port number should be 0.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"hosts": {
|
||||
"description": "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/*`).",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"defaultEndpoint": {
|
||||
"description": "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).",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.Port": {
|
||||
"description": "Port describes the properties of a specific port of a service.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Label assigned to the port.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"number": {
|
||||
"description": "A valid non-negative integer port number.",
|
||||
"type": "integer"
|
||||
},
|
||||
"protocol": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.Server.TLSOptions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"mode": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Server.TLSOptions.TLSmode"
|
||||
},
|
||||
"privateKey": {
|
||||
"description": "REQUIRED if mode is `SIMPLE` or `MUTUAL`. The path to the file holding the server's private key.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"caCertificates": {
|
||||
"description": "REQUIRED if mode is `MUTUAL`. The path to a file containing certificate authority certificates to use in verifying a presented client side certificate.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"subjectAltNames": {
|
||||
"description": "A list of alternate names to verify the subject identity in the certificate presented by the client.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"httpsRedirect": {
|
||||
"description": "If set to true, the load balancer will send a 301 redirect for all http connections, asking the clients to use HTTPS.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"serverCertificate": {
|
||||
"description": "REQUIRED if mode is `SIMPLE` or `MUTUAL`. The path to the file holding the server-side TLS certificate to use.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"credentialName": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"verifyCertificateSpki": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"verifyCertificateHash": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"minProtocolVersion": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Server.TLSOptions.TLSProtocol"
|
||||
},
|
||||
"maxProtocolVersion": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Server.TLSOptions.TLSProtocol"
|
||||
},
|
||||
"cipherSuites": {
|
||||
"description": "Optional: If specified, only support the specified cipher list. Otherwise default to the default cipher list supported by Envoy.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.Server.TLSOptions.TLSmode": {
|
||||
"description": "TLS modes enforced by the proxy",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"PASSTHROUGH",
|
||||
"SIMPLE",
|
||||
"MUTUAL",
|
||||
"AUTO_PASSTHROUGH",
|
||||
"ISTIO_MUTUAL"
|
||||
]
|
||||
},
|
||||
"istio.networking.v1beta1.Server.TLSOptions.TLSProtocol": {
|
||||
"description": "TLS protocol versions.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"TLS_AUTO",
|
||||
"TLSV1_0",
|
||||
"TLSV1_1",
|
||||
"TLSV1_2",
|
||||
"TLSV1_3"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,722 @@
|
|||
---
|
||||
title: Gateway
|
||||
description: Configuration affecting edge load balancer.
|
||||
location: https://istio.io/docs/reference/config/networking/gateway.html
|
||||
layout: protoc-gen-docs
|
||||
generator: protoc-gen-docs
|
||||
schema: istio.networking.v1beta1.Gateway
|
||||
aliases: [/docs/reference/config/networking/v1beta1/gateway]
|
||||
number_of_entries: 6
|
||||
---
|
||||
<p><code>Gateway</code> 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.</p>
|
||||
|
||||
<p>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 <code>app:
|
||||
my-gateway-controller</code>. 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.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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:
|
||||
- "*"
|
||||
</code></pre>
|
||||
|
||||
<p>The Gateway specification above describes the L4-L6 properties of a load
|
||||
balancer. A <code>VirtualService</code> can then be bound to a gateway to control
|
||||
the forwarding of traffic arriving at a particular host or gateway port.</p>
|
||||
|
||||
<p>For example, the following VirtualService splits traffic for
|
||||
<code>https://uk.bookinfo.com/reviews</code>, <code>https://eu.bookinfo.com/reviews</code>,
|
||||
<code>http://uk.bookinfo.com:9080/reviews</code>,
|
||||
<code>http://eu.bookinfo.com:9080/reviews</code> 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 <code>http://uk.bookinfo.com</code>
|
||||
gets redirected to <code>https://uk.bookinfo.com</code> (i.e. 80 redirects to 443).</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<p>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 <code>mesh</code>.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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"
|
||||
</code></pre>
|
||||
|
||||
<h2 id="Gateway">Gateway</h2>
|
||||
<section>
|
||||
<p>Gateway describes a load balancer operating at the edge of the mesh
|
||||
receiving incoming or outgoing HTTP/TCP connections.</p>
|
||||
|
||||
<table class="message-fields">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Required</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="Gateway-servers">
|
||||
<td><code>servers</code></td>
|
||||
<td><code><a href="#Server">Server[]</a></code></td>
|
||||
<td>
|
||||
<p>A list of server specifications.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Gateway-selector">
|
||||
<td><code>selector</code></td>
|
||||
<td><code>map<string, string></code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="Port">Port</h2>
|
||||
<section>
|
||||
<p>Port describes the properties of a specific port of a service.</p>
|
||||
|
||||
<table class="message-fields">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Required</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="Port-number">
|
||||
<td><code>number</code></td>
|
||||
<td><code>uint32</code></td>
|
||||
<td>
|
||||
<p>A valid non-negative integer port number.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Port-protocol">
|
||||
<td><code>protocol</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Port-name">
|
||||
<td><code>name</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>Label assigned to the port.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="Server">Server</h2>
|
||||
<section>
|
||||
<p><code>Server</code> describes the properties of the proxy on a given load balancer
|
||||
port. For example,</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: my-ingress
|
||||
spec:
|
||||
selector:
|
||||
app: my-ingress-gateway
|
||||
servers:
|
||||
- port:
|
||||
number: 80
|
||||
name: http2
|
||||
protocol: HTTP2
|
||||
hosts:
|
||||
- "*"
|
||||
</code></pre>
|
||||
|
||||
<p>Another example</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: my-tcp-ingress
|
||||
spec:
|
||||
selector:
|
||||
app: my-tcp-ingress-gateway
|
||||
servers:
|
||||
- port:
|
||||
number: 27018
|
||||
name: mongo
|
||||
protocol: MONGO
|
||||
hosts:
|
||||
- "*"
|
||||
</code></pre>
|
||||
|
||||
<p>The following is an example of TLS configuration for port 443</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<table class="message-fields">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Required</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="Server-port">
|
||||
<td><code>port</code></td>
|
||||
<td><code><a href="#Port">Port</a></code></td>
|
||||
<td>
|
||||
<p>The Port on which the proxy should listen for incoming
|
||||
connections.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-hosts">
|
||||
<td><code>hosts</code></td>
|
||||
<td><code>string[]</code></td>
|
||||
<td>
|
||||
<p>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 <code>dnsName</code> with an optional <code>namespace/</code> prefix.
|
||||
The <code>dnsName</code> should be specified using FQDN format, optionally including
|
||||
a wildcard character in the left-most component (e.g., <code>prod/*.example.com</code>).
|
||||
Set the <code>dnsName</code> to <code>*</code> to select all <code>VirtualService</code> hosts from the
|
||||
specified namespace (e.g.,<code>prod/*</code>).</p>
|
||||
|
||||
<p>The <code>namespace</code> can be set to <code>*</code> or <code>.</code>, representing any or the current
|
||||
namespace, respectively. For example, <code>*/foo.example.com</code> selects the
|
||||
service from any available namespace while <code>./foo.example.com</code> only selects
|
||||
the service from the namespace of the sidecar. The default, if no <code>namespace/</code>
|
||||
is specified, is <code>*/</code>, that is, select services from any namespace.
|
||||
Any associated <code>DestinationRule</code> in the selected namespace will also be used.</p>
|
||||
|
||||
<p>A <code>VirtualService</code> 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 <code>*.example.com</code>, a
|
||||
<code>VirtualService</code> with hosts <code>dev.example.com</code> or <code>prod.example.com</code> will
|
||||
match. However, a <code>VirtualService</code> with host <code>example.com</code> or
|
||||
<code>newexample.com</code> will not match.</p>
|
||||
|
||||
<p>NOTE: Only virtual services exported to the gateway’s namespace
|
||||
(e.g., <code>exportTo</code> value of <code>*</code>) can be referenced.
|
||||
Private configurations (e.g., <code>exportTo</code> set to <code>.</code>) will not be
|
||||
available. Refer to the <code>exportTo</code> setting in <code>VirtualService</code>,
|
||||
<code>DestinationRule</code>, and <code>ServiceEntry</code> configurations for details.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-tls">
|
||||
<td><code>tls</code></td>
|
||||
<td><code><a href="#Server-TLSOptions">TLSOptions</a></code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-default_endpoint">
|
||||
<td><code>defaultEndpoint</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>The loopback IP endpoint or Unix domain socket to which traffic should
|
||||
be forwarded to by default. Format should be <code>127.0.0.1:PORT</code> or
|
||||
<code>unix:///path/to/socket</code> or <code>unix://@foobar</code> (Linux abstract namespace).</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="Server-TLSOptions">Server.TLSOptions</h2>
|
||||
<section>
|
||||
<table class="message-fields">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Required</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="Server-TLSOptions-https_redirect">
|
||||
<td><code>httpsRedirect</code></td>
|
||||
<td><code>bool</code></td>
|
||||
<td>
|
||||
<p>If set to true, the load balancer will send a 301 redirect for all
|
||||
http connections, asking the clients to use HTTPS.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-mode">
|
||||
<td><code>mode</code></td>
|
||||
<td><code><a href="#Server-TLSOptions-TLSmode">TLSmode</a></code></td>
|
||||
<td>
|
||||
<p>Optional: Indicates whether connections to this port should be
|
||||
secured using TLS. The value of this field determines how TLS is
|
||||
enforced.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-server_certificate">
|
||||
<td><code>serverCertificate</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>REQUIRED if mode is <code>SIMPLE</code> or <code>MUTUAL</code>. The path to the file
|
||||
holding the server-side TLS certificate to use.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-private_key">
|
||||
<td><code>privateKey</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>REQUIRED if mode is <code>SIMPLE</code> or <code>MUTUAL</code>. The path to the file
|
||||
holding the server’s private key.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-ca_certificates">
|
||||
<td><code>caCertificates</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>REQUIRED if mode is <code>MUTUAL</code>. The path to a file containing
|
||||
certificate authority certificates to use in verifying a presented
|
||||
client side certificate.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-credential_name">
|
||||
<td><code>credentialName</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>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
|
||||
<code>ISTIO_META_USER_SDS</code> metadata variable in the gateway’s proxy to
|
||||
enable the dynamic credential fetching feature.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-subject_alt_names">
|
||||
<td><code>subjectAltNames</code></td>
|
||||
<td><code>string[]</code></td>
|
||||
<td>
|
||||
<p>A list of alternate names to verify the subject identity in the
|
||||
certificate presented by the client.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-verify_certificate_spki">
|
||||
<td><code>verifyCertificateSpki</code></td>
|
||||
<td><code>string[]</code></td>
|
||||
<td>
|
||||
<p>An optional list of base64-encoded SHA-256 hashes of the SKPIs of
|
||||
authorized client certificates.
|
||||
Note: When both verify<em>certificate</em>hash and verify<em>certificate</em>spki
|
||||
are specified, a hash matching either value will result in the
|
||||
certificate being accepted.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-verify_certificate_hash">
|
||||
<td><code>verifyCertificateHash</code></td>
|
||||
<td><code>string[]</code></td>
|
||||
<td>
|
||||
<p>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<em>certificate</em>hash and verify<em>certificate</em>spki
|
||||
are specified, a hash matching either value will result in the
|
||||
certificate being accepted.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-min_protocol_version">
|
||||
<td><code>minProtocolVersion</code></td>
|
||||
<td><code><a href="#Server-TLSOptions-TLSProtocol">TLSProtocol</a></code></td>
|
||||
<td>
|
||||
<p>Optional: Minimum TLS protocol version.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-max_protocol_version">
|
||||
<td><code>maxProtocolVersion</code></td>
|
||||
<td><code><a href="#Server-TLSOptions-TLSProtocol">TLSProtocol</a></code></td>
|
||||
<td>
|
||||
<p>Optional: Maximum TLS protocol version.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-cipher_suites">
|
||||
<td><code>cipherSuites</code></td>
|
||||
<td><code>string[]</code></td>
|
||||
<td>
|
||||
<p>Optional: If specified, only support the specified cipher list.
|
||||
Otherwise default to the default cipher list supported by Envoy.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="Server-TLSOptions-TLSProtocol">Server.TLSOptions.TLSProtocol</h2>
|
||||
<section>
|
||||
<p>TLS protocol versions.</p>
|
||||
|
||||
<table class="enum-values">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="Server-TLSOptions-TLSProtocol-TLS_AUTO">
|
||||
<td><code>TLS_AUTO</code></td>
|
||||
<td>
|
||||
<p>Automatically choose the optimal TLS version.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-TLSProtocol-TLSV1_0">
|
||||
<td><code>TLSV1_0</code></td>
|
||||
<td>
|
||||
<p>TLS version 1.0</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-TLSProtocol-TLSV1_1">
|
||||
<td><code>TLSV1_1</code></td>
|
||||
<td>
|
||||
<p>TLS version 1.1</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-TLSProtocol-TLSV1_2">
|
||||
<td><code>TLSV1_2</code></td>
|
||||
<td>
|
||||
<p>TLS version 1.2</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-TLSProtocol-TLSV1_3">
|
||||
<td><code>TLSV1_3</code></td>
|
||||
<td>
|
||||
<p>TLS version 1.3</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="Server-TLSOptions-TLSmode">Server.TLSOptions.TLSmode</h2>
|
||||
<section>
|
||||
<p>TLS modes enforced by the proxy</p>
|
||||
|
||||
<table class="enum-values">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="Server-TLSOptions-TLSmode-PASSTHROUGH">
|
||||
<td><code>PASSTHROUGH</code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-TLSmode-SIMPLE">
|
||||
<td><code>SIMPLE</code></td>
|
||||
<td>
|
||||
<p>Secure connections with standard TLS semantics.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-TLSmode-MUTUAL">
|
||||
<td><code>MUTUAL</code></td>
|
||||
<td>
|
||||
<p>Secure connections to the downstream using mutual TLS by presenting
|
||||
server certificates for authentication.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-TLSmode-AUTO_PASSTHROUGH">
|
||||
<td><code>AUTO_PASSTHROUGH</code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Server-TLSOptions-TLSmode-ISTIO_MUTUAL">
|
||||
<td><code>ISTIO_MUTUAL</code></td>
|
||||
<td>
|
||||
<p>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
|
||||
<code>TLSOptions</code> should be empty.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
|
@ -0,0 +1,484 @@
|
|||
// Copyright 2020 Istio Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
import "google/api/field_behavior.proto";
|
||||
|
||||
// $schema: istio.networking.v1beta1.Gateway
|
||||
// $title: Gateway
|
||||
// $description: Configuration affecting edge load balancer.
|
||||
// $location: https://istio.io/docs/reference/config/networking/gateway.html
|
||||
// $aliases: [/docs/reference/config/networking/v1beta1/gateway]
|
||||
|
||||
// `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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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"
|
||||
// ```
|
||||
//
|
||||
package istio.networking.v1beta1;
|
||||
|
||||
option go_package = "istio.io/api/networking/v1beta1";
|
||||
|
||||
// Gateway describes a load balancer operating at the edge of the mesh
|
||||
// receiving incoming or outgoing HTTP/TCP connections.
|
||||
//
|
||||
// <!-- crd generation tags
|
||||
// +cue-gen:Gateway:groupName:networking.istio.io
|
||||
// +cue-gen:Gateway:version:v1beta1
|
||||
// +cue-gen:Gateway:storageVersion
|
||||
// +cue-gen:Gateway:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:Gateway:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:Gateway:subresource:status
|
||||
// +cue-gen:Gateway:scope:Namespaced
|
||||
// +cue-gen:Gateway:resource:categories=istio-io,networking-istio-io,shortNames=gw
|
||||
// -->
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=networking.istio.io/v1beta1
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message Gateway {
|
||||
// A list of server specifications.
|
||||
repeated Server servers = 1 [(google.api.field_behavior) = 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.
|
||||
map<string, string> selector = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// `Server` describes the properties of the proxy on a given load balancer
|
||||
// port. For example,
|
||||
//
|
||||
// ```yaml
|
||||
// apiVersion: networking.istio.io/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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
|
||||
// ```
|
||||
message Server {
|
||||
// The Port on which the proxy should listen for incoming
|
||||
// connections.
|
||||
Port port = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// $hide_from_docs
|
||||
// The ip or the Unix domain socket to which the listener should be bound
|
||||
// to. Format: `x.x.x.x` or `unix:///path/to/uds` or `unix://@foobar`
|
||||
// (Linux abstract namespace). When using Unix domain sockets, the port
|
||||
// number should be 0.
|
||||
string bind = 4;
|
||||
|
||||
// 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.
|
||||
repeated string hosts = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
message TLSOptions {
|
||||
// If set to true, the load balancer will send a 301 redirect for all
|
||||
// http connections, asking the clients to use HTTPS.
|
||||
bool https_redirect = 1;
|
||||
|
||||
// TLS modes enforced by the proxy
|
||||
enum TLSmode {
|
||||
// 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.
|
||||
PASSTHROUGH = 0;
|
||||
|
||||
// Secure connections with standard TLS semantics.
|
||||
SIMPLE = 1;
|
||||
|
||||
// Secure connections to the downstream using mutual TLS by presenting
|
||||
// server certificates for authentication.
|
||||
MUTUAL = 2;
|
||||
|
||||
// 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.
|
||||
AUTO_PASSTHROUGH = 3;
|
||||
|
||||
// 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.
|
||||
ISTIO_MUTUAL = 4;
|
||||
};
|
||||
|
||||
// Optional: Indicates whether connections to this port should be
|
||||
// secured using TLS. The value of this field determines how TLS is
|
||||
// enforced.
|
||||
TLSmode mode = 2;
|
||||
|
||||
// REQUIRED if mode is `SIMPLE` or `MUTUAL`. The path to the file
|
||||
// holding the server-side TLS certificate to use.
|
||||
string server_certificate = 3;
|
||||
|
||||
// REQUIRED if mode is `SIMPLE` or `MUTUAL`. The path to the file
|
||||
// holding the server's private key.
|
||||
string private_key = 4;
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`. The path to a file containing
|
||||
// certificate authority certificates to use in verifying a presented
|
||||
// client side certificate.
|
||||
string ca_certificates = 5;
|
||||
|
||||
// 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.
|
||||
string credential_name = 10;
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate presented by the client.
|
||||
repeated string subject_alt_names = 6;
|
||||
|
||||
// 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.
|
||||
repeated string verify_certificate_spki = 11;
|
||||
|
||||
// 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.
|
||||
repeated string verify_certificate_hash = 12;
|
||||
|
||||
// TLS protocol versions.
|
||||
enum TLSProtocol {
|
||||
// Automatically choose the optimal TLS version.
|
||||
TLS_AUTO = 0;
|
||||
|
||||
// TLS version 1.0
|
||||
TLSV1_0 = 1;
|
||||
|
||||
// TLS version 1.1
|
||||
TLSV1_1 = 2;
|
||||
|
||||
// TLS version 1.2
|
||||
TLSV1_2 = 3;
|
||||
|
||||
// TLS version 1.3
|
||||
TLSV1_3 = 4;
|
||||
}
|
||||
|
||||
// Optional: Minimum TLS protocol version.
|
||||
TLSProtocol min_protocol_version = 7;
|
||||
|
||||
// Optional: Maximum TLS protocol version.
|
||||
TLSProtocol max_protocol_version = 8;
|
||||
|
||||
// Optional: If specified, only support the specified cipher list.
|
||||
// Otherwise default to the default cipher list supported by Envoy.
|
||||
repeated string cipher_suites = 9;
|
||||
}
|
||||
|
||||
// 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.
|
||||
TLSOptions tls = 3;
|
||||
|
||||
// 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).
|
||||
string default_endpoint = 5;
|
||||
}
|
||||
|
||||
// Port describes the properties of a specific port of a service.
|
||||
message Port {
|
||||
// A valid non-negative integer port number.
|
||||
uint32 number = 1 [(google.api.field_behavior) = 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.
|
||||
string protocol = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Label assigned to the port.
|
||||
string name = 3;
|
||||
}
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: networking/v1beta1/gateway.proto
|
||||
|
||||
// `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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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"
|
||||
// ```
|
||||
//
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// DeepCopyInto supports using Gateway within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *Gateway) DeepCopyInto(out *Gateway) {
|
||||
p := proto.Clone(in).(*Gateway)
|
||||
*out = *p
|
||||
}
|
||||
|
|
@ -0,0 +1,239 @@
|
|||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: networking/v1beta1/gateway.proto
|
||||
|
||||
// `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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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"
|
||||
// ```
|
||||
//
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for Gateway
|
||||
func (this *Gateway) MarshalJSON() ([]byte, error) {
|
||||
str, err := GatewayMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Gateway
|
||||
func (this *Gateway) UnmarshalJSON(b []byte) error {
|
||||
return GatewayUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Server
|
||||
func (this *Server) MarshalJSON() ([]byte, error) {
|
||||
str, err := GatewayMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Server
|
||||
func (this *Server) UnmarshalJSON(b []byte) error {
|
||||
return GatewayUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Server_TLSOptions
|
||||
func (this *Server_TLSOptions) MarshalJSON() ([]byte, error) {
|
||||
str, err := GatewayMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Server_TLSOptions
|
||||
func (this *Server_TLSOptions) UnmarshalJSON(b []byte) error {
|
||||
return GatewayUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Port
|
||||
func (this *Port) MarshalJSON() ([]byte, error) {
|
||||
str, err := GatewayMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Port
|
||||
func (this *Port) UnmarshalJSON(b []byte) error {
|
||||
return GatewayUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
GatewayMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
GatewayUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{}
|
||||
)
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Configuration affecting service registry.",
|
||||
"version": "v1beta1"
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"istio.networking.v1beta1.Port": {
|
||||
"description": "Port describes the properties of a specific port of a service.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Label assigned to the port.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"number": {
|
||||
"description": "A valid non-negative integer port number.",
|
||||
"type": "integer"
|
||||
},
|
||||
"protocol": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.ServiceEntry": {
|
||||
"description": "ServiceEntry enables adding additional entries into Istio's internal service registry.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"exportTo": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"subjectAltNames": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"hosts": {
|
||||
"description": "The hosts associated with the ServiceEntry. Could be a DNS name with wildcard prefix.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"addresses": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"ports": {
|
||||
"description": "The ports associated with the external service. If the Endpoints are Unix domain socket addresses, there must be exactly one port.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Port"
|
||||
}
|
||||
},
|
||||
"location": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.ServiceEntry.Location"
|
||||
},
|
||||
"resolution": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.ServiceEntry.Resolution"
|
||||
},
|
||||
"endpoints": {
|
||||
"description": "One or more endpoints associated with the service.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.ServiceEntry.Endpoint"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.ServiceEntry.Location": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"MESH_EXTERNAL",
|
||||
"MESH_INTERNAL"
|
||||
]
|
||||
},
|
||||
"istio.networking.v1beta1.ServiceEntry.Resolution": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"NONE",
|
||||
"STATIC",
|
||||
"DNS"
|
||||
]
|
||||
},
|
||||
"istio.networking.v1beta1.ServiceEntry.Endpoint": {
|
||||
"description": "Endpoint defines a network address (IP or hostname) associated with the mesh service.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"labels": {
|
||||
"description": "One or more labels associated with the endpoint.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"ports": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"address": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"network": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"locality": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"weight": {
|
||||
"description": "The load balancing weight associated with the endpoint. Endpoints with higher weights will receive proportionally higher traffic.",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,676 @@
|
|||
---
|
||||
title: Service Entry
|
||||
description: Configuration affecting service registry.
|
||||
location: https://istio.io/docs/reference/config/networking/service-entry.html
|
||||
layout: protoc-gen-docs
|
||||
generator: protoc-gen-docs
|
||||
schema: istio.networking.v1beta1.ServiceEntry
|
||||
aliases: [/docs/reference/config/networking/v1beta1/service-entry]
|
||||
number_of_entries: 4
|
||||
---
|
||||
<p><code>ServiceEntry</code> 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).</p>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<p>and the associated DestinationRule</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<p>And the associated VirtualService to route based on the SNI value.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<p>Define a gateway to handle all egress traffic.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: istio-egressgateway
|
||||
namespace: istio-system
|
||||
spec:
|
||||
selector:
|
||||
istio: egressgateway
|
||||
servers:
|
||||
- port:
|
||||
number: 80
|
||||
name: http
|
||||
protocol: HTTP
|
||||
hosts:
|
||||
- "*"
|
||||
</code></pre>
|
||||
|
||||
<p>And the associated <code>VirtualService</code> to route from the sidecar to the
|
||||
gateway service (<code>istio-egressgateway.istio-system.svc.cluster.local</code>), 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.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<p>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 <code>NONE</code>.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
kind: ServiceEntry
|
||||
metadata:
|
||||
name: external-svc-wildcard-example
|
||||
spec:
|
||||
hosts:
|
||||
- "*.bar.com"
|
||||
location: MESH_EXTERNAL
|
||||
ports:
|
||||
- number: 80
|
||||
name: http
|
||||
protocol: HTTP
|
||||
resolution: NONE
|
||||
</code></pre>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<p>For HTTP-based services, it is possible to create a <code>VirtualService</code>
|
||||
backed by multiple DNS addressable endpoints. In such a scenario, the
|
||||
application can use the <code>HTTP_PROXY</code> environment variable to transparently
|
||||
reroute API calls for the <code>VirtualService</code> 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</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<p>With <code>HTTP_PROXY=http://localhost/</code>, calls from the application to
|
||||
<code>http://foo.bar.com</code> will be load balanced across the three domains
|
||||
specified above. In other words, a call to <code>http://foo.bar.com/baz</code> would
|
||||
be translated to <code>http://uk.foo.bar.com/baz</code>.</p>
|
||||
|
||||
<p>The following example illustrates the usage of a <code>ServiceEntry</code>
|
||||
containing a subject alternate name
|
||||
whose format conforms to the <a href="https://github.com/spiffe/spiffe/blob/master/standards/SPIFFE-ID.md">SPIFFE standard</a>:</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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"
|
||||
</code></pre>
|
||||
|
||||
<h2 id="ServiceEntry">ServiceEntry</h2>
|
||||
<section>
|
||||
<p>ServiceEntry enables adding additional entries into Istio’s internal
|
||||
service registry.</p>
|
||||
|
||||
<table class="message-fields">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Required</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="ServiceEntry-hosts">
|
||||
<td><code>hosts</code></td>
|
||||
<td><code>string[]</code></td>
|
||||
<td>
|
||||
<p>The hosts associated with the ServiceEntry. Could be a DNS
|
||||
name with wildcard prefix.</p>
|
||||
|
||||
<ol>
|
||||
<li>The hosts field is used to select matching hosts in VirtualServices and DestinationRules.</li>
|
||||
<li>For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.</li>
|
||||
<li>For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
|
||||
will be matched against the hosts field.</li>
|
||||
</ol>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-addresses">
|
||||
<td><code>addresses</code></td>
|
||||
<td><code>string[]</code></td>
|
||||
<td>
|
||||
<p>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 <code>addresses</code> and <code>hosts</code> 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.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-ports">
|
||||
<td><code>ports</code></td>
|
||||
<td><code><a href="https://istio.io/docs/reference/config/networking/gateway.html#Port">Port[]</a></code></td>
|
||||
<td>
|
||||
<p>The ports associated with the external service. If the
|
||||
Endpoints are Unix domain socket addresses, there must be exactly one
|
||||
port.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-location">
|
||||
<td><code>location</code></td>
|
||||
<td><code><a href="#ServiceEntry-Location">Location</a></code></td>
|
||||
<td>
|
||||
<p>Specify whether the service should be considered external to the mesh
|
||||
or part of the mesh.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-resolution">
|
||||
<td><code>resolution</code></td>
|
||||
<td><code><a href="#ServiceEntry-Resolution">Resolution</a></code></td>
|
||||
<td>
|
||||
<p>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. <code>0.0.0.0:<port></code>).</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-endpoints">
|
||||
<td><code>endpoints</code></td>
|
||||
<td><code><a href="#ServiceEntry-Endpoint">Endpoint[]</a></code></td>
|
||||
<td>
|
||||
<p>One or more endpoints associated with the service.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-export_to">
|
||||
<td><code>exportTo</code></td>
|
||||
<td><code>string[]</code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
<p>If no namespaces are specified then the service is exported to all
|
||||
namespaces by default.</p>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<p>NOTE: in the current release, the <code>exportTo</code> value is restricted to
|
||||
“.” or “*” (i.e., the current namespace or all namespaces).</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-subject_alt_names">
|
||||
<td><code>subjectAltNames</code></td>
|
||||
<td><code>string[]</code></td>
|
||||
<td>
|
||||
<p>The list of subject alternate names allowed for workload instances that
|
||||
implement this service. This information is used to enforce
|
||||
<a href="https://istio.io/docs/concepts/security/#secure-naming">secure-naming</a>.
|
||||
If specified, the proxy will verify that the server
|
||||
certificate’s subject alternate name matches one of the specified values.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="ServiceEntry-Endpoint">ServiceEntry.Endpoint</h2>
|
||||
<section>
|
||||
<p>Endpoint defines a network address (IP or hostname) associated with
|
||||
the mesh service.</p>
|
||||
|
||||
<table class="message-fields">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Required</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="ServiceEntry-Endpoint-address">
|
||||
<td><code>address</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-Endpoint-ports">
|
||||
<td><code>ports</code></td>
|
||||
<td><code>map<string, uint32></code></td>
|
||||
<td>
|
||||
<p>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 <code>unix://</code> addresses.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-Endpoint-labels">
|
||||
<td><code>labels</code></td>
|
||||
<td><code>map<string, string></code></td>
|
||||
<td>
|
||||
<p>One or more labels associated with the endpoint.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-Endpoint-network">
|
||||
<td><code>network</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>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
|
||||
<code>AUTO_PASSTHROUGH</code> mode in a Gateway Server). This is
|
||||
an advanced configuration used typically for spanning an Istio mesh
|
||||
over multiple clusters.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-Endpoint-locality">
|
||||
<td><code>locality</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-Endpoint-weight">
|
||||
<td><code>weight</code></td>
|
||||
<td><code>uint32</code></td>
|
||||
<td>
|
||||
<p>The load balancing weight associated with the endpoint. Endpoints
|
||||
with higher weights will receive proportionally higher traffic.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="ServiceEntry-Location">ServiceEntry.Location</h2>
|
||||
<section>
|
||||
<p>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.</p>
|
||||
|
||||
<table class="enum-values">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="ServiceEntry-Location-MESH_EXTERNAL">
|
||||
<td><code>MESH_EXTERNAL</code></td>
|
||||
<td>
|
||||
<p>Signifies that the service is external to the mesh. Typically used
|
||||
to indicate external services consumed through APIs.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-Location-MESH_INTERNAL">
|
||||
<td><code>MESH_INTERNAL</code></td>
|
||||
<td>
|
||||
<p>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).</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="ServiceEntry-Resolution">ServiceEntry.Resolution</h2>
|
||||
<section>
|
||||
<p>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.</p>
|
||||
|
||||
<table class="enum-values">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="ServiceEntry-Resolution-NONE">
|
||||
<td><code>NONE</code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-Resolution-STATIC">
|
||||
<td><code>STATIC</code></td>
|
||||
<td>
|
||||
<p>Use the static IP addresses specified in endpoints (see below) as the
|
||||
backing instances associated with the service.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ServiceEntry-Resolution-DNS">
|
||||
<td><code>DNS</code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
|
@ -0,0 +1,547 @@
|
|||
// Copyright 2020 Istio Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
import "google/api/field_behavior.proto";
|
||||
import "networking/v1beta1/gateway.proto";
|
||||
|
||||
// $schema: istio.networking.v1beta1.ServiceEntry
|
||||
// $title: Service Entry
|
||||
// $description: Configuration affecting service registry.
|
||||
// $location: https://istio.io/docs/reference/config/networking/service-entry.html
|
||||
// $aliases: [/docs/reference/config/networking/v1beta1/service-entry]
|
||||
|
||||
// `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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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"
|
||||
// ```
|
||||
//
|
||||
package istio.networking.v1beta1;
|
||||
|
||||
option go_package = "istio.io/api/networking/v1beta1";
|
||||
|
||||
// ServiceEntry enables adding additional entries into Istio's internal
|
||||
// service registry.
|
||||
//
|
||||
// <!-- crd generation tags
|
||||
// +cue-gen:ServiceEntry:groupName:networking.istio.io
|
||||
// +cue-gen:ServiceEntry:version:v1beta1
|
||||
// +cue-gen:ServiceEntry:storageVersion
|
||||
// +cue-gen:ServiceEntry:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:ServiceEntry:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:ServiceEntry:subresource:status
|
||||
// +cue-gen:ServiceEntry:scope:Namespaced
|
||||
// +cue-gen:ServiceEntry:resource:categories=istio-io,networking-istio-io,shortNames=se,plural=serviceentries
|
||||
// +cue-gen:ServiceEntry:printerColumn:name=Hosts,type=string,JSONPath=.spec.hosts,description="The hosts associated with the ServiceEntry"
|
||||
// +cue-gen:ServiceEntry:printerColumn:name=Location,type=string,JSONPath=.spec.location,description="Whether the service is external to the
|
||||
// mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL)"
|
||||
// +cue-gen:ServiceEntry:printerColumn:name=Resolution,type=string,JSONPath=.spec.resolution,description="Service discovery mode for the hosts
|
||||
// (NONE, STATIC, or DNS)"
|
||||
// +cue-gen:ServiceEntry:printerColumn:name=Age,type=date,JSONPath=.metadata.creationTimestamp,description="CreationTimestamp is a timestamp
|
||||
// representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations.
|
||||
// Clients may not set this value. It is represented in RFC3339 form and is in UTC.
|
||||
// Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata"
|
||||
// -->
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=networking.istio.io/v1beta1
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message ServiceEntry {
|
||||
// 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.
|
||||
repeated string hosts = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// 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.
|
||||
repeated string addresses = 2;
|
||||
|
||||
// The ports associated with the external service. If the
|
||||
// Endpoints are Unix domain socket addresses, there must be exactly one
|
||||
// port.
|
||||
repeated Port ports = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// 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.
|
||||
enum Location {
|
||||
// Signifies that the service is external to the mesh. Typically used
|
||||
// to indicate external services consumed through APIs.
|
||||
MESH_EXTERNAL = 0;
|
||||
|
||||
// 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).
|
||||
MESH_INTERNAL = 1;
|
||||
};
|
||||
|
||||
// Specify whether the service should be considered external to the mesh
|
||||
// or part of the mesh.
|
||||
Location location = 4;
|
||||
|
||||
// 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.
|
||||
enum Resolution {
|
||||
// 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 = 0;
|
||||
|
||||
// Use the static IP addresses specified in endpoints (see below) as the
|
||||
// backing instances associated with the service.
|
||||
STATIC = 1;
|
||||
|
||||
// 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 = 2;
|
||||
};
|
||||
|
||||
// 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 resolution = 5 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Endpoint defines a network address (IP or hostname) associated with
|
||||
// the mesh service.
|
||||
message Endpoint {
|
||||
// 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.
|
||||
string address = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// 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.
|
||||
map<string, uint32> ports = 2;
|
||||
|
||||
// One or more labels associated with the endpoint.
|
||||
map<string, string> labels = 3;
|
||||
|
||||
// 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.
|
||||
string network = 4;
|
||||
|
||||
// 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.
|
||||
string locality = 5;
|
||||
|
||||
// The load balancing weight associated with the endpoint. Endpoints
|
||||
// with higher weights will receive proportionally higher traffic.
|
||||
uint32 weight = 6;
|
||||
};
|
||||
|
||||
// One or more endpoints associated with the service.
|
||||
repeated Endpoint endpoints = 6;
|
||||
|
||||
// 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).
|
||||
repeated string export_to = 7;
|
||||
|
||||
// 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.
|
||||
repeated string subject_alt_names = 8;
|
||||
}
|
||||
|
|
@ -0,0 +1,335 @@
|
|||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: networking/v1beta1/service_entry.proto
|
||||
|
||||
// `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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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"
|
||||
// ```
|
||||
//
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// DeepCopyInto supports using ServiceEntry within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *ServiceEntry) DeepCopyInto(out *ServiceEntry) {
|
||||
p := proto.Clone(in).(*ServiceEntry)
|
||||
*out = *p
|
||||
}
|
||||
|
|
@ -0,0 +1,358 @@
|
|||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: networking/v1beta1/service_entry.proto
|
||||
|
||||
// `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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// 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"
|
||||
// ```
|
||||
//
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for ServiceEntry
|
||||
func (this *ServiceEntry) MarshalJSON() ([]byte, error) {
|
||||
str, err := ServiceEntryMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for ServiceEntry
|
||||
func (this *ServiceEntry) UnmarshalJSON(b []byte) error {
|
||||
return ServiceEntryUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for ServiceEntry_Endpoint
|
||||
func (this *ServiceEntry_Endpoint) MarshalJSON() ([]byte, error) {
|
||||
str, err := ServiceEntryMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for ServiceEntry_Endpoint
|
||||
func (this *ServiceEntry_Endpoint) UnmarshalJSON(b []byte) error {
|
||||
return ServiceEntryUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
ServiceEntryMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
ServiceEntryUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{}
|
||||
)
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Configuration affecting network reachability of a sidecar.",
|
||||
"version": "v1beta1"
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"istio.networking.v1beta1.Port": {
|
||||
"description": "Port describes the properties of a specific port of a service.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Label assigned to the port.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"number": {
|
||||
"description": "A valid non-negative integer port number.",
|
||||
"type": "integer"
|
||||
},
|
||||
"protocol": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.Sidecar": {
|
||||
"description": "`Sidecar` describes the configuration of the sidecar proxy that mediates inbound and outbound communication of the workload instance to which it is attached.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"workloadSelector": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.WorkloadSelector"
|
||||
},
|
||||
"ingress": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.IstioIngressListener"
|
||||
}
|
||||
},
|
||||
"egress": {
|
||||
"description": "Egress specifies the configuration of the sidecar for processing outbound traffic from the attached workload instance to other services in the mesh.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.IstioEgressListener"
|
||||
}
|
||||
},
|
||||
"outboundTrafficPolicy": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.OutboundTrafficPolicy"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.WorkloadSelector": {
|
||||
"description": "`WorkloadSelector` specifies the criteria used to determine if the `Gateway`, `Sidecar`, 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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"labels": {
|
||||
"description": "One or more labels that indicate a specific set of pods/VMs on which this `Sidecar` configuration should be applied. The scope of label search is restricted to the configuration namespace in which the the resource is present.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.IstioIngressListener": {
|
||||
"description": "`IstioIngressListener` specifies the properties of an inbound traffic listener on the sidecar proxy attached to a workload instance.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"port": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Port"
|
||||
},
|
||||
"bind": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"defaultEndpoint": {
|
||||
"description": "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`",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"captureMode": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.CaptureMode"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.IstioEgressListener": {
|
||||
"description": "`IstioEgressListener` specifies the properties of an outbound traffic listener on the sidecar proxy attached to a workload instance.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"port": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Port"
|
||||
},
|
||||
"bind": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"hosts": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"captureMode": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.CaptureMode"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.OutboundTrafficPolicy": {
|
||||
"description": "`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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"mode": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.OutboundTrafficPolicy.Mode"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.CaptureMode": {
|
||||
"description": "`CaptureMode` describes how traffic to a listener is expected to be captured. Applicable only when the listener is bound to an IP.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"DEFAULT",
|
||||
"IPTABLES",
|
||||
"NONE"
|
||||
]
|
||||
},
|
||||
"istio.networking.v1beta1.OutboundTrafficPolicy.Mode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"REGISTRY_ONLY",
|
||||
"ALLOW_ANY"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,608 @@
|
|||
---
|
||||
title: Sidecar
|
||||
description: Configuration affecting network reachability of a sidecar.
|
||||
location: https://istio.io/docs/reference/config/networking/sidecar.html
|
||||
layout: protoc-gen-docs
|
||||
generator: protoc-gen-docs
|
||||
schema: istio.networking.v1beta1.Sidecar
|
||||
aliases: [/docs/reference/config/networking/v1beta1/sidecar]
|
||||
number_of_entries: 7
|
||||
---
|
||||
<p><code>Sidecar</code> 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 <code>Sidecar</code> 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.</p>
|
||||
|
||||
<p>Services and configuration in a mesh are organized into one or more
|
||||
namespaces (e.g., a Kubernetes namespace or a CF org/space). A <code>Sidecar</code>
|
||||
configuration in a namespace will apply to one or more workload instances in the same
|
||||
namespace, selected using the <code>workloadSelector</code> field. In the absence of a
|
||||
<code>workloadSelector</code>, it will apply to all workload instances in the same
|
||||
namespace. When determining the <code>Sidecar</code> configuration to be applied to a
|
||||
workload instance, preference will be given to the resource with a
|
||||
<code>workloadSelector</code> that selects this workload instance, over a <code>Sidecar</code> configuration
|
||||
without any <code>workloadSelector</code>.</p>
|
||||
|
||||
<p>NOTE 1: <em><em>Each namespace can have only one <code>Sidecar</code> configuration without any
|
||||
<code>workloadSelector</code></em></em>. The behavior of the system is undefined if more
|
||||
than one selector-less <code>Sidecar</code> configurations exist in a given namespace. The
|
||||
behavior of the system is undefined if two or more <code>Sidecar</code> configurations
|
||||
with a <code>workloadSelector</code> select the same workload instance.</p>
|
||||
|
||||
<p>NOTE 2: <em><em>A <code>Sidecar</code> configuration in the <code>MeshConfig</code>
|
||||
<a href="https://istio.io/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig">root namespace</a>
|
||||
will be applied by default to all namespaces without a <code>Sidecar</code>
|
||||
configuration</em></em>. This global default <code>Sidecar</code> configuration should not have
|
||||
any <code>workloadSelector</code>.</p>
|
||||
|
||||
<p>The example below declares a global default <code>Sidecar</code> configuration in the
|
||||
root namespace called <code>istio-config</code>, that configures sidecars in
|
||||
all namespaces to allow egress traffic only to other workloads in
|
||||
the same namespace, and to services in the <code>istio-system</code> namespace.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
kind: Sidecar
|
||||
metadata:
|
||||
name: default
|
||||
namespace: istio-config
|
||||
spec:
|
||||
egress:
|
||||
- hosts:
|
||||
- "./*"
|
||||
- "istio-system/*"
|
||||
</code></pre>
|
||||
|
||||
<p>The example below declares a <code>Sidecar</code> configuration in the <code>prod-us1</code>
|
||||
namespace that overrides the global default defined above, and
|
||||
configures the sidecars in the namespace to allow egress traffic to
|
||||
public services in the <code>prod-us1</code>, <code>prod-apis</code>, and the <code>istio-system</code>
|
||||
namespaces.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
kind: Sidecar
|
||||
metadata:
|
||||
name: default
|
||||
namespace: prod-us1
|
||||
spec:
|
||||
egress:
|
||||
- hosts:
|
||||
- "prod-us1/*"
|
||||
- "prod-apis/*"
|
||||
- "istio-system/*"
|
||||
</code></pre>
|
||||
|
||||
<p>The example below declares a <code>Sidecar</code> configuration in the <code>prod-us1</code> 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 <code>istio-system</code> namespace, the sidecar
|
||||
proxies only HTTP traffic bound for port 9080 for services in the
|
||||
<code>prod-us1</code> namespace.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
kind: Sidecar
|
||||
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/*"
|
||||
</code></pre>
|
||||
|
||||
<p>If the workload is deployed without IPTables-based traffic capture, the
|
||||
<code>Sidecar</code> configuration is the only way to configure the ports on the proxy
|
||||
attached to the workload instance. The following example declares a <code>Sidecar</code>
|
||||
configuration in the <code>prod-us1</code> namespace for all pods with labels
|
||||
<code>app: productpage</code> belonging to the <code>productpage.prod-us1</code> service. Assuming
|
||||
that these pods are deployed without IPtable rules (i.e. the <code>istio-init</code>
|
||||
container) and the proxy metadata <code>ISTIO_META_INTERCEPTION_MODE</code> is set to
|
||||
<code>NONE</code>, the specification, below, allows such pods to receive HTTP traffic
|
||||
on port 9080 and forward it to the application listening on
|
||||
<code>127.0.0.1:8080</code>. It also allows the application to communicate with a
|
||||
backing MySQL database on <code>127.0.0.1:3306</code>, that then gets proxied to the
|
||||
externally hosted MySQL service at <code>mysql.foo.com:3306</code>.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
kind: Sidecar
|
||||
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"
|
||||
</code></pre>
|
||||
|
||||
<p>And the associated service entry for routing to <code>mysql.foo.com:3306</code></p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
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
|
||||
</code></pre>
|
||||
|
||||
<p>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
|
||||
<code>192.168.0.0/16</code> subnet. So, IP tables are setup on the VM to capture all
|
||||
outbound traffic on <code>192.168.0.0/16</code> subnet. Assume that the VM has an
|
||||
additional network interface on <code>172.16.0.0/16</code> subnet for inbound
|
||||
traffic. The following <code>Sidecar</code> configuration allows the VM to expose a
|
||||
listener on <code>172.16.1.32:80</code> (the VM’s IP) for traffic arriving from the
|
||||
<code>172.16.0.0/16</code> subnet. Note that in this scenario, the
|
||||
<code>ISTIO_META_INTERCEPTION_MODE</code> metadata on the proxy in the VM should
|
||||
contain <code>REDIRECT</code> or <code>TPROXY</code> as its value, implying that IP tables
|
||||
based traffic capture is active.</p>
|
||||
|
||||
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1beta1
|
||||
kind: Sidecar
|
||||
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:
|
||||
- "*/*"
|
||||
</code></pre>
|
||||
|
||||
<h2 id="CaptureMode">CaptureMode</h2>
|
||||
<section>
|
||||
<p><code>CaptureMode</code> describes how traffic to a listener is expected to be
|
||||
captured. Applicable only when the listener is bound to an IP.</p>
|
||||
|
||||
<table class="enum-values">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="CaptureMode-DEFAULT">
|
||||
<td><code>DEFAULT</code></td>
|
||||
<td>
|
||||
<p>The default capture mode defined by the environment.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="CaptureMode-IPTABLES">
|
||||
<td><code>IPTABLES</code></td>
|
||||
<td>
|
||||
<p>Capture traffic using IPtables redirection.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="CaptureMode-NONE">
|
||||
<td><code>NONE</code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="IstioEgressListener">IstioEgressListener</h2>
|
||||
<section>
|
||||
<p><code>IstioEgressListener</code> specifies the properties of an outbound traffic
|
||||
listener on the sidecar proxy attached to a workload instance.</p>
|
||||
|
||||
<table class="message-fields">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Required</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="IstioEgressListener-port">
|
||||
<td><code>port</code></td>
|
||||
<td><code><a href="https://istio.io/docs/reference/config/networking/gateway.html#Port">Port</a></code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="IstioEgressListener-bind">
|
||||
<td><code>bind</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>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: <code>x.x.x.x</code> or
|
||||
<code>unix:///path/to/uds</code> or <code>unix://@foobar</code> (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 <code>NONE</code>, bind will default to
|
||||
127.0.0.1.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="IstioEgressListener-capture_mode">
|
||||
<td><code>captureMode</code></td>
|
||||
<td><code><a href="#CaptureMode">CaptureMode</a></code></td>
|
||||
<td>
|
||||
<p>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 <code>NONE</code> for Unix domain socket binds.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="IstioEgressListener-hosts">
|
||||
<td><code>hosts</code></td>
|
||||
<td><code>string[]</code></td>
|
||||
<td>
|
||||
<p>One or more service hosts exposed by the listener
|
||||
in <code>namespace/dnsName</code> format. Services in the specified namespace
|
||||
matching <code>dnsName</code> 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 <code>ServiceEntry</code> or <code>VirtualService</code> configuration. Any
|
||||
associated <code>DestinationRule</code> in the same namespace will also be used.</p>
|
||||
|
||||
<p>The <code>dnsName</code> should be specified using FQDN format, optionally including
|
||||
a wildcard character in the left-most component (e.g., <code>prod/*.example.com</code>).
|
||||
Set the <code>dnsName</code> to <code>*</code> to select all services from the specified namespace
|
||||
(e.g., <code>prod/*</code>).</p>
|
||||
|
||||
<p>The <code>namespace</code> can be set to <code>*</code>, <code>.</code>, or <code>~</code>, representing any, the current,
|
||||
or no namespace, respectively. For example, <code>*/foo.example.com</code> selects the
|
||||
service from any available namespace while <code>./foo.example.com</code> only selects
|
||||
the service from the namespace of the sidecar. If a host is set to <code>*/*</code>,
|
||||
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 <code>~/*</code> can be used
|
||||
to completely trim the configuration for sidecars that simply receive traffic
|
||||
and respond, but make no outbound connections of their own.</p>
|
||||
|
||||
<p>NOTE: Only services and configuration artifacts exported to the sidecar’s
|
||||
namespace (e.g., <code>exportTo</code> value of <code>*</code>) can be referenced.
|
||||
Private configurations (e.g., <code>exportTo</code> set to <code>.</code>) will
|
||||
not be available. Refer to the <code>exportTo</code> setting in <code>VirtualService</code>,
|
||||
<code>DestinationRule</code>, and <code>ServiceEntry</code> configurations for details.</p>
|
||||
|
||||
<p><strong>WARNING:</strong> The list of egress hosts in a <code>Sidecar</code> 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
|
||||
<code>istio-system/istio-telemetry.istio-system.svc.cluster.local</code> if telemetry
|
||||
is enabled, <code>istio-system/istio-policy.istio-system.svc.cluster.local</code> if
|
||||
policy is enabled, or add <code>istio-system/*</code> to allow all services in the
|
||||
<code>istio-system</code> namespace. This requirement is temporary and will be removed
|
||||
in a future Istio release.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="IstioIngressListener">IstioIngressListener</h2>
|
||||
<section>
|
||||
<p><code>IstioIngressListener</code> specifies the properties of an inbound
|
||||
traffic listener on the sidecar proxy attached to a workload instance.</p>
|
||||
|
||||
<table class="message-fields">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Required</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="IstioIngressListener-port">
|
||||
<td><code>port</code></td>
|
||||
<td><code><a href="https://istio.io/docs/reference/config/networking/gateway.html#Port">Port</a></code></td>
|
||||
<td>
|
||||
<p>The port associated with the listener.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="IstioIngressListener-bind">
|
||||
<td><code>bind</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>The IP to which the listener should be bound. Must be in the
|
||||
format <code>x.x.x.x</code>. 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.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="IstioIngressListener-capture_mode">
|
||||
<td><code>captureMode</code></td>
|
||||
<td><code><a href="#CaptureMode">CaptureMode</a></code></td>
|
||||
<td>
|
||||
<p>The captureMode option dictates how traffic to the listener is
|
||||
expected to be captured (or not).</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="IstioIngressListener-default_endpoint">
|
||||
<td><code>defaultEndpoint</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
<p>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 <code>IP:Port</code> on the sidecar to a <code>localhost:port</code>
|
||||
or Unix domain socket where the application workload instance is listening for
|
||||
connections. Format should be <code>127.0.0.1:PORT</code> or <code>unix:///path/to/socket</code></p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="OutboundTrafficPolicy">OutboundTrafficPolicy</h2>
|
||||
<section>
|
||||
<p><code>OutboundTrafficPolicy</code> 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 <code>ALLOW_ANY</code>
|
||||
will cause the sidecars to route any unknown traffic originating from
|
||||
the application to its requested destination. Users are strongly
|
||||
encouraged to use <code>ServiceEntry</code> configurations to explicitly declare any external
|
||||
dependencies, instead of using <code>ALLOW_ANY</code>, so that traffic to these
|
||||
services can be monitored.</p>
|
||||
|
||||
<table class="message-fields">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Required</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="OutboundTrafficPolicy-mode">
|
||||
<td><code>mode</code></td>
|
||||
<td><code><a href="#OutboundTrafficPolicy-Mode">Mode</a></code></td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="OutboundTrafficPolicy-Mode">OutboundTrafficPolicy.Mode</h2>
|
||||
<section>
|
||||
<table class="enum-values">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="OutboundTrafficPolicy-Mode-REGISTRY_ONLY">
|
||||
<td><code>REGISTRY_ONLY</code></td>
|
||||
<td>
|
||||
<p>Outbound traffic will be restricted to services defined in the
|
||||
service registry as well as those defined through <code>ServiceEntry</code> configurations.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="OutboundTrafficPolicy-Mode-ALLOW_ANY">
|
||||
<td><code>ALLOW_ANY</code></td>
|
||||
<td>
|
||||
<p>Outbound traffic to unknown destinations will be allowed, in case
|
||||
there are no services or <code>ServiceEntry</code> configurations for the destination port.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="Sidecar">Sidecar</h2>
|
||||
<section>
|
||||
<p><code>Sidecar</code> describes the configuration of the sidecar proxy that mediates
|
||||
inbound and outbound communication of the workload instance to which it is
|
||||
attached.</p>
|
||||
|
||||
<table class="message-fields">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Required</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="Sidecar-workload_selector">
|
||||
<td><code>workloadSelector</code></td>
|
||||
<td><code><a href="#WorkloadSelector">WorkloadSelector</a></code></td>
|
||||
<td>
|
||||
<p>Criteria used to select the specific set of pods/VMs on which this
|
||||
<code>Sidecar</code> configuration should be applied. If omitted, the <code>Sidecar</code>
|
||||
configuration will be applied to all workload instances in the same namespace.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Sidecar-ingress">
|
||||
<td><code>ingress</code></td>
|
||||
<td><code><a href="#IstioIngressListener">IstioIngressListener[]</a></code></td>
|
||||
<td>
|
||||
<p>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.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Sidecar-egress">
|
||||
<td><code>egress</code></td>
|
||||
<td><code><a href="#IstioEgressListener">IstioEgressListener[]</a></code></td>
|
||||
<td>
|
||||
<p>Egress specifies the configuration of the sidecar for processing
|
||||
outbound traffic from the attached workload instance to other services in the
|
||||
mesh.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="Sidecar-outbound_traffic_policy">
|
||||
<td><code>outboundTrafficPolicy</code></td>
|
||||
<td><code><a href="#OutboundTrafficPolicy">OutboundTrafficPolicy</a></code></td>
|
||||
<td>
|
||||
<p>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 <code>ALLOW_ANY</code>
|
||||
will cause the sidecars to route any unknown traffic originating from
|
||||
the application to its requested destination.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
No
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<h2 id="WorkloadSelector">WorkloadSelector</h2>
|
||||
<section>
|
||||
<p><code>WorkloadSelector</code> specifies the criteria used to determine if the <code>Gateway</code>,
|
||||
<code>Sidecar</code>, or <code>EnvoyFilter</code> 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.</p>
|
||||
|
||||
<table class="message-fields">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Required</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="WorkloadSelector-labels">
|
||||
<td><code>labels</code></td>
|
||||
<td><code>map<string, string></code></td>
|
||||
<td>
|
||||
<p>One or more labels that indicate a specific set of pods/VMs
|
||||
on which this <code>Sidecar</code> configuration should be applied. The scope of
|
||||
label search is restricted to the configuration namespace in which the
|
||||
the resource is present.</p>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Yes
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
|
@ -0,0 +1,430 @@
|
|||
// Copyright 2020 Istio Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
import "google/api/field_behavior.proto";
|
||||
import "networking/v1beta1/gateway.proto";
|
||||
|
||||
// $schema: istio.networking.v1beta1.Sidecar
|
||||
// $title: Sidecar
|
||||
// $description: Configuration affecting network reachability of a sidecar.
|
||||
// $location: https://istio.io/docs/reference/config/networking/sidecar.html
|
||||
// $aliases: [/docs/reference/config/networking/v1beta1/sidecar]
|
||||
|
||||
// `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 `Sidecar` 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 `Sidecar`
|
||||
// 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 `Sidecar` 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 `Sidecar` configuration
|
||||
// without any `workloadSelector`.
|
||||
//
|
||||
// NOTE 1: *_Each namespace can have only one `Sidecar` configuration without any
|
||||
// `workloadSelector`_*. The behavior of the system is undefined if more
|
||||
// than one selector-less `Sidecar` configurations exist in a given namespace. The
|
||||
// behavior of the system is undefined if two or more `Sidecar` configurations
|
||||
// with a `workloadSelector` select the same workload instance.
|
||||
//
|
||||
// NOTE 2: *_A `Sidecar` 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 `Sidecar`
|
||||
// configuration_*. This global default `Sidecar` configuration should not have
|
||||
// any `workloadSelector`.
|
||||
//
|
||||
// The example below declares a global default `Sidecar` 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// metadata:
|
||||
// name: default
|
||||
// namespace: istio-config
|
||||
// spec:
|
||||
// egress:
|
||||
// - hosts:
|
||||
// - "./*"
|
||||
// - "istio-system/*"
|
||||
//```
|
||||
//
|
||||
// The example below declares a `Sidecar` 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// metadata:
|
||||
// name: default
|
||||
// namespace: prod-us1
|
||||
// spec:
|
||||
// egress:
|
||||
// - hosts:
|
||||
// - "prod-us1/*"
|
||||
// - "prod-apis/*"
|
||||
// - "istio-system/*"
|
||||
// ```
|
||||
//
|
||||
// The example below declares a `Sidecar` 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// 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
|
||||
// `Sidecar` configuration is the only way to configure the ports on the proxy
|
||||
// attached to the workload instance. The following example declares a `Sidecar`
|
||||
// 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// 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/v1beta1
|
||||
// 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 `Sidecar` 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// 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:
|
||||
// - "*/*"
|
||||
// ```
|
||||
//
|
||||
package istio.networking.v1beta1;
|
||||
|
||||
option go_package = "istio.io/api/networking/v1beta1";
|
||||
|
||||
// `Sidecar` describes the configuration of the sidecar proxy that mediates
|
||||
// inbound and outbound communication of the workload instance to which it is
|
||||
// attached.
|
||||
//
|
||||
// <!-- crd generation tags
|
||||
// +cue-gen:Sidecar:groupName:networking.istio.io
|
||||
// +cue-gen:Sidecar:version:v1beta1
|
||||
// +cue-gen:Sidecar:storageVersion
|
||||
// +cue-gen:Sidecar:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:Sidecar:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
|
||||
// +cue-gen:Sidecar:subresource:status
|
||||
// +cue-gen:Sidecar:scope:Namespaced
|
||||
// +cue-gen:Sidecar:resource:categories=istio-io,networking-istio-io
|
||||
// -->
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=networking.istio.io/v1beta1
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message Sidecar {
|
||||
// Criteria used to select the specific set of pods/VMs on which this
|
||||
// `Sidecar` configuration should be applied. If omitted, the `Sidecar`
|
||||
// configuration will be applied to all workload instances in the same namespace.
|
||||
WorkloadSelector workload_selector = 1;
|
||||
|
||||
// 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.
|
||||
repeated IstioIngressListener ingress = 2;
|
||||
|
||||
// Egress specifies the configuration of the sidecar for processing
|
||||
// outbound traffic from the attached workload instance to other services in the
|
||||
// mesh.
|
||||
repeated IstioEgressListener egress = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// 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 outbound_traffic_policy = 4;
|
||||
}
|
||||
|
||||
// `IstioIngressListener` specifies the properties of an inbound
|
||||
// traffic listener on the sidecar proxy attached to a workload instance.
|
||||
message IstioIngressListener {
|
||||
// The port associated with the listener.
|
||||
Port port = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// 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.
|
||||
string bind = 2;
|
||||
|
||||
// The captureMode option dictates how traffic to the listener is
|
||||
// expected to be captured (or not).
|
||||
CaptureMode capture_mode = 3;
|
||||
|
||||
// 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`
|
||||
string default_endpoint = 4 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// `IstioEgressListener` specifies the properties of an outbound traffic
|
||||
// listener on the sidecar proxy attached to a workload instance.
|
||||
message IstioEgressListener {
|
||||
// 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 = 1;
|
||||
|
||||
// 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.
|
||||
string bind = 2;
|
||||
|
||||
// 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 capture_mode = 3;
|
||||
|
||||
// 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 `Sidecar` 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.
|
||||
repeated string hosts = 4 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// `WorkloadSelector` specifies the criteria used to determine if the `Gateway`,
|
||||
// `Sidecar`, 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.
|
||||
message WorkloadSelector {
|
||||
// One or more labels that indicate a specific set of pods/VMs
|
||||
// on which this `Sidecar` configuration should be applied. The scope of
|
||||
// label search is restricted to the configuration namespace in which the
|
||||
// the resource is present.
|
||||
map<string, string> labels = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// $hide_from_docs
|
||||
// other forms of identification supplied by the proxy
|
||||
// when connecting to Pilot, such as X509 fields, tenant IDs, JWT,
|
||||
// etc. This has nothing to do with the request level authN etc.
|
||||
}
|
||||
|
||||
// `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.
|
||||
message OutboundTrafficPolicy {
|
||||
enum Mode {
|
||||
// Outbound traffic will be restricted to services defined in the
|
||||
// service registry as well as those defined through `ServiceEntry` configurations.
|
||||
REGISTRY_ONLY = 0;
|
||||
// Outbound traffic to unknown destinations will be allowed, in case
|
||||
// there are no services or `ServiceEntry` configurations for the destination port.
|
||||
ALLOW_ANY = 1;
|
||||
}
|
||||
Mode mode = 1;
|
||||
}
|
||||
|
||||
|
||||
// `CaptureMode` describes how traffic to a listener is expected to be
|
||||
// captured. Applicable only when the listener is bound to an IP.
|
||||
enum CaptureMode {
|
||||
// The default capture mode defined by the environment.
|
||||
DEFAULT = 0;
|
||||
|
||||
// Capture traffic using IPtables redirection.
|
||||
IPTABLES = 1;
|
||||
|
||||
// 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.
|
||||
NONE = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,225 @@
|
|||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: networking/v1beta1/sidecar.proto
|
||||
|
||||
// `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 `Sidecar` 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 `Sidecar`
|
||||
// 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 `Sidecar` 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 `Sidecar` configuration
|
||||
// without any `workloadSelector`.
|
||||
//
|
||||
// NOTE 1: *_Each namespace can have only one `Sidecar` configuration without any
|
||||
// `workloadSelector`_*. The behavior of the system is undefined if more
|
||||
// than one selector-less `Sidecar` configurations exist in a given namespace. The
|
||||
// behavior of the system is undefined if two or more `Sidecar` configurations
|
||||
// with a `workloadSelector` select the same workload instance.
|
||||
//
|
||||
// NOTE 2: *_A `Sidecar` 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 `Sidecar`
|
||||
// configuration_*. This global default `Sidecar` configuration should not have
|
||||
// any `workloadSelector`.
|
||||
//
|
||||
// The example below declares a global default `Sidecar` 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// metadata:
|
||||
// name: default
|
||||
// namespace: istio-config
|
||||
// spec:
|
||||
// egress:
|
||||
// - hosts:
|
||||
// - "./*"
|
||||
// - "istio-system/*"
|
||||
//```
|
||||
//
|
||||
// The example below declares a `Sidecar` 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// metadata:
|
||||
// name: default
|
||||
// namespace: prod-us1
|
||||
// spec:
|
||||
// egress:
|
||||
// - hosts:
|
||||
// - "prod-us1/*"
|
||||
// - "prod-apis/*"
|
||||
// - "istio-system/*"
|
||||
// ```
|
||||
//
|
||||
// The example below declares a `Sidecar` 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// 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
|
||||
// `Sidecar` configuration is the only way to configure the ports on the proxy
|
||||
// attached to the workload instance. The following example declares a `Sidecar`
|
||||
// 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// 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/v1beta1
|
||||
// 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 `Sidecar` 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// 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:
|
||||
// - "*/*"
|
||||
// ```
|
||||
//
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// DeepCopyInto supports using Sidecar within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *Sidecar) DeepCopyInto(out *Sidecar) {
|
||||
p := proto.Clone(in).(*Sidecar)
|
||||
*out = *p
|
||||
}
|
||||
|
|
@ -0,0 +1,281 @@
|
|||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: networking/v1beta1/sidecar.proto
|
||||
|
||||
// `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 `Sidecar` 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 `Sidecar`
|
||||
// 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 `Sidecar` 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 `Sidecar` configuration
|
||||
// without any `workloadSelector`.
|
||||
//
|
||||
// NOTE 1: *_Each namespace can have only one `Sidecar` configuration without any
|
||||
// `workloadSelector`_*. The behavior of the system is undefined if more
|
||||
// than one selector-less `Sidecar` configurations exist in a given namespace. The
|
||||
// behavior of the system is undefined if two or more `Sidecar` configurations
|
||||
// with a `workloadSelector` select the same workload instance.
|
||||
//
|
||||
// NOTE 2: *_A `Sidecar` 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 `Sidecar`
|
||||
// configuration_*. This global default `Sidecar` configuration should not have
|
||||
// any `workloadSelector`.
|
||||
//
|
||||
// The example below declares a global default `Sidecar` 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// metadata:
|
||||
// name: default
|
||||
// namespace: istio-config
|
||||
// spec:
|
||||
// egress:
|
||||
// - hosts:
|
||||
// - "./*"
|
||||
// - "istio-system/*"
|
||||
//```
|
||||
//
|
||||
// The example below declares a `Sidecar` 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// metadata:
|
||||
// name: default
|
||||
// namespace: prod-us1
|
||||
// spec:
|
||||
// egress:
|
||||
// - hosts:
|
||||
// - "prod-us1/*"
|
||||
// - "prod-apis/*"
|
||||
// - "istio-system/*"
|
||||
// ```
|
||||
//
|
||||
// The example below declares a `Sidecar` 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// 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
|
||||
// `Sidecar` configuration is the only way to configure the ports on the proxy
|
||||
// attached to the workload instance. The following example declares a `Sidecar`
|
||||
// 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// 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/v1beta1
|
||||
// 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 `Sidecar` 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/v1beta1
|
||||
// kind: Sidecar
|
||||
// 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:
|
||||
// - "*/*"
|
||||
// ```
|
||||
//
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for Sidecar
|
||||
func (this *Sidecar) MarshalJSON() ([]byte, error) {
|
||||
str, err := SidecarMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Sidecar
|
||||
func (this *Sidecar) UnmarshalJSON(b []byte) error {
|
||||
return SidecarUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for IstioIngressListener
|
||||
func (this *IstioIngressListener) MarshalJSON() ([]byte, error) {
|
||||
str, err := SidecarMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for IstioIngressListener
|
||||
func (this *IstioIngressListener) UnmarshalJSON(b []byte) error {
|
||||
return SidecarUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for IstioEgressListener
|
||||
func (this *IstioEgressListener) MarshalJSON() ([]byte, error) {
|
||||
str, err := SidecarMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for IstioEgressListener
|
||||
func (this *IstioEgressListener) UnmarshalJSON(b []byte) error {
|
||||
return SidecarUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for WorkloadSelector
|
||||
func (this *WorkloadSelector) MarshalJSON() ([]byte, error) {
|
||||
str, err := SidecarMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for WorkloadSelector
|
||||
func (this *WorkloadSelector) UnmarshalJSON(b []byte) error {
|
||||
return SidecarUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for OutboundTrafficPolicy
|
||||
func (this *OutboundTrafficPolicy) MarshalJSON() ([]byte, error) {
|
||||
str, err := SidecarMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for OutboundTrafficPolicy
|
||||
func (this *OutboundTrafficPolicy) UnmarshalJSON(b []byte) error {
|
||||
return SidecarUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
SidecarMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
SidecarUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{}
|
||||
)
|
||||
|
|
@ -0,0 +1,674 @@
|
|||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Configuration affecting label/content routing, sni routing, etc.",
|
||||
"version": "v1beta1"
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"istio.networking.v1beta1.PortSelector": {
|
||||
"description": "PortSelector specifies the number of a port to be used for matching or selection for final routing.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"number": {
|
||||
"description": "Valid port number",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.VirtualService": {
|
||||
"description": "Configuration affecting traffic routing.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"exportTo": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"tls": {
|
||||
"description": "An ordered list of route rule for non-terminated TLS \u0026 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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.TLSRoute"
|
||||
}
|
||||
},
|
||||
"tcp": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.TCPRoute"
|
||||
}
|
||||
},
|
||||
"http": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.HTTPRoute"
|
||||
}
|
||||
},
|
||||
"hosts": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"gateways": {
|
||||
"description": "The names of gateways and sidecars that should apply these routes. Gateways in other namespaces may be referred to by `\u003cgateway namespace\u003e/\u003cgateway name\u003e`; specifying a gateway with no namespace qualifier is the same as specifying the VirtualService's namespace. 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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.HTTPRoute": {
|
||||
"description": "Describes match conditions and actions for routing HTTP/1.1, HTTP2, and gRPC traffic. See VirtualService for usage examples.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"match": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.HTTPMatchRequest"
|
||||
}
|
||||
},
|
||||
"route": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.HTTPRouteDestination"
|
||||
}
|
||||
},
|
||||
"redirect": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.HTTPRedirect"
|
||||
},
|
||||
"rewrite": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.HTTPRewrite"
|
||||
},
|
||||
"timeout": {
|
||||
"description": "Timeout for HTTP requests.",
|
||||
"type": "string"
|
||||
},
|
||||
"retries": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.HTTPRetry"
|
||||
},
|
||||
"fault": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.HTTPFaultInjection"
|
||||
},
|
||||
"mirror": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Destination"
|
||||
},
|
||||
"mirrorPercent": {
|
||||
"description": "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",
|
||||
"type": "integer",
|
||||
"deprecated": true,
|
||||
"nullable": true
|
||||
},
|
||||
"mirrorPercentage": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Percent"
|
||||
},
|
||||
"corsPolicy": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.CorsPolicy"
|
||||
},
|
||||
"headers": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Headers"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.TLSRoute": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"match": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.TLSMatchAttributes"
|
||||
}
|
||||
},
|
||||
"route": {
|
||||
"description": "The destination to which the connection should be forwarded to.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.RouteDestination"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.TCPRoute": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"match": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.L4MatchAttributes"
|
||||
}
|
||||
},
|
||||
"route": {
|
||||
"description": "The destination to which the connection should be forwarded to.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.RouteDestination"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.Destination": {
|
||||
"description": "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/service-entry/#ServiceEntry) resource.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"host": {
|
||||
"description": "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/service-entry/#ServiceEntry). Traffic forwarded to destinations that are not found in either of the two, will be dropped.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"port": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.PortSelector"
|
||||
},
|
||||
"subset": {
|
||||
"description": "The name of a subset within the service. Applicable only to services within the mesh. The subset must be defined in a corresponding DestinationRule.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.HTTPMatchRequest": {
|
||||
"description": "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`.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"method": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.StringMatch"
|
||||
},
|
||||
"port": {
|
||||
"description": "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.",
|
||||
"type": "integer"
|
||||
},
|
||||
"gateways": {
|
||||
"description": "Names of gateways where the rule should be applied. Gateway names in the top-level `gateways` field of the VirtualService (if any) are overridden. The gateway match is independent of sourceLabels.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"headers": {
|
||||
"description": "The header keys must be lowercase and use hyphen as the separator, e.g. _x-request-id_.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.StringMatch"
|
||||
}
|
||||
},
|
||||
"uri": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.StringMatch"
|
||||
},
|
||||
"scheme": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.StringMatch"
|
||||
},
|
||||
"authority": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.StringMatch"
|
||||
},
|
||||
"sourceLabels": {
|
||||
"description": "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 in the top-level `gateways` field, it must include the reserved gateway `mesh` for this field to be applicable.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"queryParams": {
|
||||
"description": "Query parameters for matching.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.StringMatch"
|
||||
}
|
||||
},
|
||||
"ignoreUriCase": {
|
||||
"description": "Flag to specify whether the URI matching should be case-insensitive.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.HTTPRouteDestination": {
|
||||
"description": "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\".",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"weight": {
|
||||
"description": "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.",
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"headers": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Headers"
|
||||
},
|
||||
"destination": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Destination"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.HTTPRedirect": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uri": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"authority": {
|
||||
"description": "On a redirect, overwrite the Authority/Host portion of the URL with this value.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"redirectCode": {
|
||||
"description": "On a redirect, Specifies the HTTP status code to use in the redirect response. The default response code is MOVED_PERMANENTLY (301).",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.HTTPRewrite": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uri": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"authority": {
|
||||
"description": "rewrite the Authority/Host header with this value.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.HTTPRetry": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attempts": {
|
||||
"description": "Number of retries for a given request. The interval between retries will be determined automatically (25ms+). Actual number of retries attempted depends on the request `timeout` of the [HTTP route](https://istio.io/docs/reference/config/networking/virtual-service/#HTTPRoute).",
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"perTryTimeout": {
|
||||
"description": "Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE \u003e=1ms.",
|
||||
"type": "string"
|
||||
},
|
||||
"retryOn": {
|
||||
"description": "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.",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.HTTPFaultInjection": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"delay": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.HTTPFaultInjection.Delay"
|
||||
},
|
||||
"abort": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.HTTPFaultInjection.Abort"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.Percent": {
|
||||
"description": "Percent specifies a percentage in the range of [0.0, 100.0].",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.CorsPolicy": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"allowOrigin": {
|
||||
"description": "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. $hide_from_docs",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
},
|
||||
"deprecated": true
|
||||
},
|
||||
"allowOrigins": {
|
||||
"description": "String patterns that match allowed origins. An origin is allowed if any of the string matchers match. If a match is found, then the outgoing Access-Control-Allow-Origin would be set to the origin as provided by the client.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.StringMatch"
|
||||
}
|
||||
},
|
||||
"allowMethods": {
|
||||
"description": "List of HTTP methods allowed to access the resource. The content will be serialized into the Access-Control-Allow-Methods header.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"allowHeaders": {
|
||||
"description": "List of HTTP headers that can be used when requesting the resource. Serialized to Access-Control-Allow-Headers header.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"exposeHeaders": {
|
||||
"description": "A white list of HTTP headers that the browsers are allowed to access. Serialized into Access-Control-Expose-Headers header.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"maxAge": {
|
||||
"description": "Specifies how long the results of a preflight request can be cached. Translates to the `Access-Control-Max-Age` header.",
|
||||
"type": "string"
|
||||
},
|
||||
"allowCredentials": {
|
||||
"description": "Indicates whether the caller is allowed to send the actual request (not the preflight) using credentials. Translates to `Access-Control-Allow-Credentials` header.",
|
||||
"type": "boolean",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.Headers": {
|
||||
"description": "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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"response": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Headers.HeaderOperations"
|
||||
},
|
||||
"request": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Headers.HeaderOperations"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.Headers.HeaderOperations": {
|
||||
"description": "HeaderOperations Describes the header manipulations to apply",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"set": {
|
||||
"description": "Overwrite the headers specified by key with the given values",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"add": {
|
||||
"description": "Append the given values to the headers specified by keys (will create a comma-separated list of values)",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"remove": {
|
||||
"description": "Remove a the specified headers",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.TLSMatchAttributes": {
|
||||
"description": "TLS connection match attributes.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"port": {
|
||||
"description": "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.",
|
||||
"type": "integer"
|
||||
},
|
||||
"gateways": {
|
||||
"description": "Names of gateways where the rule should be applied. Gateway names in the top-level `gateways` field of the VirtualService (if any) are overridden. The gateway match is independent of sourceLabels.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"sourceLabels": {
|
||||
"description": "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 in the top-level `gateways` field, it should include the reserved gateway `mesh` in order for this field to be applicable.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"destinationSubnets": {
|
||||
"description": "IPv4 or IPv6 ip addresses of destination with optional subnet. E.g., a.b.c.d/xx form or just a.b.c.d.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"sniHosts": {
|
||||
"description": "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.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.RouteDestination": {
|
||||
"description": "L4 routing rule weighted destination.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"weight": {
|
||||
"description": "The proportion of traffic to be forwarded to the service version. If there is only one destination in a rule, all traffic will be routed to it irrespective of the weight.",
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"destination": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Destination"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.L4MatchAttributes": {
|
||||
"description": "L4 connection match attributes. Note that L4 connection matching support is incomplete.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"port": {
|
||||
"description": "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.",
|
||||
"type": "integer"
|
||||
},
|
||||
"gateways": {
|
||||
"description": "Names of gateways where the rule should be applied. Gateway names in the top-level `gateways` field of the VirtualService (if any) are overridden. The gateway match is independent of sourceLabels.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"sourceLabels": {
|
||||
"description": "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 in the top-level `gateways` field, it should include the reserved gateway `mesh` in order for this field to be applicable.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"destinationSubnets": {
|
||||
"description": "IPv4 or IPv6 ip addresses of destination with optional subnet. E.g., a.b.c.d/xx form or just a.b.c.d.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
},
|
||||
"sourceSubnet": {
|
||||
"description": "IPv4 or IPv6 ip address of source with optional subnet. E.g., a.b.c.d/xx form or just a.b.c.d $hide_from_docs",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"istio.networking.v1beta1.StringMatch": {
|
||||
"description": "Describes how to match a given string in HTTP headers. Match is case-sensitive.",
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"exact"
|
||||
],
|
||||
"properties": {
|
||||
"exact": {
|
||||
"description": "exact string match",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"prefix"
|
||||
],
|
||||
"properties": {
|
||||
"prefix": {
|
||||
"description": "prefix-based match",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"regex"
|
||||
],
|
||||
"properties": {
|
||||
"regex": {
|
||||
"description": "ECMAscript style regex-based match",
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"istio.networking.v1beta1.HTTPFaultInjection.Delay": {
|
||||
"description": "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",
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"fixedDelay"
|
||||
],
|
||||
"properties": {
|
||||
"percent": {
|
||||
"description": "Percentage of requests on which the delay will be injected (0-100). Use of integer `percent` value is deprecated. Use the double `percentage` field instead.",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"deprecated": true
|
||||
},
|
||||
"percentage": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Percent"
|
||||
},
|
||||
"fixedDelay": {
|
||||
"description": "Add a fixed delay before forwarding the request. Format: 1h/1m/1s/1ms. MUST be \u003e=1ms.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"exponentialDelay"
|
||||
],
|
||||
"properties": {
|
||||
"percent": {
|
||||
"description": "Percentage of requests on which the delay will be injected (0-100). Use of integer `percent` value is deprecated. Use the double `percentage` field instead.",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"deprecated": true
|
||||
},
|
||||
"percentage": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Percent"
|
||||
},
|
||||
"exponentialDelay": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"istio.networking.v1beta1.HTTPFaultInjection.Abort": {
|
||||
"description": "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\".",
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"httpStatus"
|
||||
],
|
||||
"properties": {
|
||||
"percentage": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Percent"
|
||||
},
|
||||
"httpStatus": {
|
||||
"description": "HTTP status code to use to abort the Http request.",
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"grpcStatus"
|
||||
],
|
||||
"properties": {
|
||||
"percentage": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Percent"
|
||||
},
|
||||
"grpcStatus": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"http2Error"
|
||||
],
|
||||
"properties": {
|
||||
"percentage": {
|
||||
"$ref": "#/components/schemas/istio.networking.v1beta1.Percent"
|
||||
},
|
||||
"http2Error": {
|
||||
"type": "string",
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,115 @@
|
|||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: networking/v1beta1/virtual_service.proto
|
||||
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// kind: DestinationRule
|
||||
// metadata:
|
||||
// name: reviews-destination
|
||||
// spec:
|
||||
// host: reviews.prod.svc.cluster.local
|
||||
// subsets:
|
||||
// - name: v1
|
||||
// labels:
|
||||
// version: v1
|
||||
// - name: v2
|
||||
// labels:
|
||||
// version: v2
|
||||
// ```
|
||||
//
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/gogo/protobuf/types"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// DeepCopyInto supports using VirtualService within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *VirtualService) DeepCopyInto(out *VirtualService) {
|
||||
p := proto.Clone(in).(*VirtualService)
|
||||
*out = *p
|
||||
}
|
||||
|
|
@ -0,0 +1,358 @@
|
|||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: networking/v1beta1/virtual_service.proto
|
||||
|
||||
// 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/v1beta1
|
||||
// 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/v1beta1
|
||||
// kind: DestinationRule
|
||||
// metadata:
|
||||
// name: reviews-destination
|
||||
// spec:
|
||||
// host: reviews.prod.svc.cluster.local
|
||||
// subsets:
|
||||
// - name: v1
|
||||
// labels:
|
||||
// version: v1
|
||||
// - name: v2
|
||||
// labels:
|
||||
// version: v2
|
||||
// ```
|
||||
//
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/gogo/protobuf/types"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for VirtualService
|
||||
func (this *VirtualService) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for VirtualService
|
||||
func (this *VirtualService) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Destination
|
||||
func (this *Destination) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Destination
|
||||
func (this *Destination) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPRoute
|
||||
func (this *HTTPRoute) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPRoute
|
||||
func (this *HTTPRoute) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Headers
|
||||
func (this *Headers) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Headers
|
||||
func (this *Headers) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Headers_HeaderOperations
|
||||
func (this *Headers_HeaderOperations) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Headers_HeaderOperations
|
||||
func (this *Headers_HeaderOperations) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for TLSRoute
|
||||
func (this *TLSRoute) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for TLSRoute
|
||||
func (this *TLSRoute) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for TCPRoute
|
||||
func (this *TCPRoute) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for TCPRoute
|
||||
func (this *TCPRoute) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPMatchRequest
|
||||
func (this *HTTPMatchRequest) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPMatchRequest
|
||||
func (this *HTTPMatchRequest) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPRouteDestination
|
||||
func (this *HTTPRouteDestination) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPRouteDestination
|
||||
func (this *HTTPRouteDestination) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for RouteDestination
|
||||
func (this *RouteDestination) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for RouteDestination
|
||||
func (this *RouteDestination) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for L4MatchAttributes
|
||||
func (this *L4MatchAttributes) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for L4MatchAttributes
|
||||
func (this *L4MatchAttributes) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for TLSMatchAttributes
|
||||
func (this *TLSMatchAttributes) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for TLSMatchAttributes
|
||||
func (this *TLSMatchAttributes) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPRedirect
|
||||
func (this *HTTPRedirect) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPRedirect
|
||||
func (this *HTTPRedirect) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPRewrite
|
||||
func (this *HTTPRewrite) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPRewrite
|
||||
func (this *HTTPRewrite) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for StringMatch
|
||||
func (this *StringMatch) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for StringMatch
|
||||
func (this *StringMatch) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPRetry
|
||||
func (this *HTTPRetry) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPRetry
|
||||
func (this *HTTPRetry) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for CorsPolicy
|
||||
func (this *CorsPolicy) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for CorsPolicy
|
||||
func (this *CorsPolicy) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPFaultInjection
|
||||
func (this *HTTPFaultInjection) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPFaultInjection
|
||||
func (this *HTTPFaultInjection) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPFaultInjection_Delay
|
||||
func (this *HTTPFaultInjection_Delay) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPFaultInjection_Delay
|
||||
func (this *HTTPFaultInjection_Delay) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for HTTPFaultInjection_Abort
|
||||
func (this *HTTPFaultInjection_Abort) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for HTTPFaultInjection_Abort
|
||||
func (this *HTTPFaultInjection_Abort) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for PortSelector
|
||||
func (this *PortSelector) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for PortSelector
|
||||
func (this *PortSelector) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Percent
|
||||
func (this *Percent) MarshalJSON() ([]byte, error) {
|
||||
str, err := VirtualServiceMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Percent
|
||||
func (this *Percent) UnmarshalJSON(b []byte) error {
|
||||
return VirtualServiceUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
VirtualServiceMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
VirtualServiceUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{}
|
||||
)
|
||||
1900
proto.lock
1900
proto.lock
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,448 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: networking/v1beta1/gateway.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='networking/v1beta1/gateway.proto',
|
||||
package='istio.networking.v1beta1',
|
||||
syntax='proto3',
|
||||
serialized_options=_b('Z\037istio.io/api/networking/v1beta1'),
|
||||
serialized_pb=_b('\n networking/v1beta1/gateway.proto\x12\x18istio.networking.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\"\xba\x01\n\x07Gateway\x12\x36\n\x07servers\x18\x01 \x03(\x0b\x32 .istio.networking.v1beta1.ServerB\x03\xe0\x41\x02\x12\x46\n\x08selector\x18\x02 \x03(\x0b\x32/.istio.networking.v1beta1.Gateway.SelectorEntryB\x03\xe0\x41\x02\x1a/\n\rSelectorEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcd\x06\n\x06Server\x12\x31\n\x04port\x18\x01 \x01(\x0b\x32\x1e.istio.networking.v1beta1.PortB\x03\xe0\x41\x02\x12\x0c\n\x04\x62ind\x18\x04 \x01(\t\x12\x12\n\x05hosts\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x38\n\x03tls\x18\x03 \x01(\x0b\x32+.istio.networking.v1beta1.Server.TLSOptions\x12\x18\n\x10\x64\x65\x66\x61ult_endpoint\x18\x05 \x01(\t\x1a\x99\x05\n\nTLSOptions\x12\x16\n\x0ehttps_redirect\x18\x01 \x01(\x08\x12\x41\n\x04mode\x18\x02 \x01(\x0e\x32\x33.istio.networking.v1beta1.Server.TLSOptions.TLSmode\x12\x1a\n\x12server_certificate\x18\x03 \x01(\t\x12\x13\n\x0bprivate_key\x18\x04 \x01(\t\x12\x17\n\x0f\x63\x61_certificates\x18\x05 \x01(\t\x12\x17\n\x0f\x63redential_name\x18\n \x01(\t\x12\x19\n\x11subject_alt_names\x18\x06 \x03(\t\x12\x1f\n\x17verify_certificate_spki\x18\x0b \x03(\t\x12\x1f\n\x17verify_certificate_hash\x18\x0c \x03(\t\x12U\n\x14min_protocol_version\x18\x07 \x01(\x0e\x32\x37.istio.networking.v1beta1.Server.TLSOptions.TLSProtocol\x12U\n\x14max_protocol_version\x18\x08 \x01(\x0e\x32\x37.istio.networking.v1beta1.Server.TLSOptions.TLSProtocol\x12\x15\n\rcipher_suites\x18\t \x03(\t\"Z\n\x07TLSmode\x12\x0f\n\x0bPASSTHROUGH\x10\x00\x12\n\n\x06SIMPLE\x10\x01\x12\n\n\x06MUTUAL\x10\x02\x12\x14\n\x10\x41UTO_PASSTHROUGH\x10\x03\x12\x10\n\x0cISTIO_MUTUAL\x10\x04\"O\n\x0bTLSProtocol\x12\x0c\n\x08TLS_AUTO\x10\x00\x12\x0b\n\x07TLSV1_0\x10\x01\x12\x0b\n\x07TLSV1_1\x10\x02\x12\x0b\n\x07TLSV1_2\x10\x03\x12\x0b\n\x07TLSV1_3\x10\x04\"@\n\x04Port\x12\x13\n\x06number\x18\x01 \x01(\rB\x03\xe0\x41\x02\x12\x15\n\x08protocol\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0c\n\x04name\x18\x03 \x01(\tB!Z\x1fistio.io/api/networking/v1beta1b\x06proto3')
|
||||
,
|
||||
dependencies=[google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,])
|
||||
|
||||
|
||||
|
||||
_SERVER_TLSOPTIONS_TLSMODE = _descriptor.EnumDescriptor(
|
||||
name='TLSmode',
|
||||
full_name='istio.networking.v1beta1.Server.TLSOptions.TLSmode',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
values=[
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='PASSTHROUGH', index=0, number=0,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='SIMPLE', index=1, number=1,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='MUTUAL', index=2, number=2,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='AUTO_PASSTHROUGH', index=3, number=3,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='ISTIO_MUTUAL', index=4, number=4,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=959,
|
||||
serialized_end=1049,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_SERVER_TLSOPTIONS_TLSMODE)
|
||||
|
||||
_SERVER_TLSOPTIONS_TLSPROTOCOL = _descriptor.EnumDescriptor(
|
||||
name='TLSProtocol',
|
||||
full_name='istio.networking.v1beta1.Server.TLSOptions.TLSProtocol',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
values=[
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='TLS_AUTO', index=0, number=0,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='TLSV1_0', index=1, number=1,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='TLSV1_1', index=2, number=2,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='TLSV1_2', index=3, number=3,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='TLSV1_3', index=4, number=4,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=1051,
|
||||
serialized_end=1130,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_SERVER_TLSOPTIONS_TLSPROTOCOL)
|
||||
|
||||
|
||||
_GATEWAY_SELECTORENTRY = _descriptor.Descriptor(
|
||||
name='SelectorEntry',
|
||||
full_name='istio.networking.v1beta1.Gateway.SelectorEntry',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='key', full_name='istio.networking.v1beta1.Gateway.SelectorEntry.key', index=0,
|
||||
number=1, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='value', full_name='istio.networking.v1beta1.Gateway.SelectorEntry.value', index=1,
|
||||
number=2, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=_b('8\001'),
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=235,
|
||||
serialized_end=282,
|
||||
)
|
||||
|
||||
_GATEWAY = _descriptor.Descriptor(
|
||||
name='Gateway',
|
||||
full_name='istio.networking.v1beta1.Gateway',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='servers', full_name='istio.networking.v1beta1.Gateway.servers', index=0,
|
||||
number=1, type=11, cpp_type=10, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='selector', full_name='istio.networking.v1beta1.Gateway.selector', index=1,
|
||||
number=2, type=11, cpp_type=10, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[_GATEWAY_SELECTORENTRY, ],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=96,
|
||||
serialized_end=282,
|
||||
)
|
||||
|
||||
|
||||
_SERVER_TLSOPTIONS = _descriptor.Descriptor(
|
||||
name='TLSOptions',
|
||||
full_name='istio.networking.v1beta1.Server.TLSOptions',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='https_redirect', full_name='istio.networking.v1beta1.Server.TLSOptions.https_redirect', index=0,
|
||||
number=1, type=8, cpp_type=7, label=1,
|
||||
has_default_value=False, default_value=False,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='mode', full_name='istio.networking.v1beta1.Server.TLSOptions.mode', index=1,
|
||||
number=2, type=14, cpp_type=8, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='server_certificate', full_name='istio.networking.v1beta1.Server.TLSOptions.server_certificate', index=2,
|
||||
number=3, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='private_key', full_name='istio.networking.v1beta1.Server.TLSOptions.private_key', index=3,
|
||||
number=4, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='ca_certificates', full_name='istio.networking.v1beta1.Server.TLSOptions.ca_certificates', index=4,
|
||||
number=5, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='credential_name', full_name='istio.networking.v1beta1.Server.TLSOptions.credential_name', index=5,
|
||||
number=10, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='subject_alt_names', full_name='istio.networking.v1beta1.Server.TLSOptions.subject_alt_names', index=6,
|
||||
number=6, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='verify_certificate_spki', full_name='istio.networking.v1beta1.Server.TLSOptions.verify_certificate_spki', index=7,
|
||||
number=11, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='verify_certificate_hash', full_name='istio.networking.v1beta1.Server.TLSOptions.verify_certificate_hash', index=8,
|
||||
number=12, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='min_protocol_version', full_name='istio.networking.v1beta1.Server.TLSOptions.min_protocol_version', index=9,
|
||||
number=7, type=14, cpp_type=8, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='max_protocol_version', full_name='istio.networking.v1beta1.Server.TLSOptions.max_protocol_version', index=10,
|
||||
number=8, type=14, cpp_type=8, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='cipher_suites', full_name='istio.networking.v1beta1.Server.TLSOptions.cipher_suites', index=11,
|
||||
number=9, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
_SERVER_TLSOPTIONS_TLSMODE,
|
||||
_SERVER_TLSOPTIONS_TLSPROTOCOL,
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=465,
|
||||
serialized_end=1130,
|
||||
)
|
||||
|
||||
_SERVER = _descriptor.Descriptor(
|
||||
name='Server',
|
||||
full_name='istio.networking.v1beta1.Server',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='port', full_name='istio.networking.v1beta1.Server.port', index=0,
|
||||
number=1, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='bind', full_name='istio.networking.v1beta1.Server.bind', index=1,
|
||||
number=4, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='hosts', full_name='istio.networking.v1beta1.Server.hosts', index=2,
|
||||
number=2, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='tls', full_name='istio.networking.v1beta1.Server.tls', index=3,
|
||||
number=3, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='default_endpoint', full_name='istio.networking.v1beta1.Server.default_endpoint', index=4,
|
||||
number=5, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[_SERVER_TLSOPTIONS, ],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=285,
|
||||
serialized_end=1130,
|
||||
)
|
||||
|
||||
|
||||
_PORT = _descriptor.Descriptor(
|
||||
name='Port',
|
||||
full_name='istio.networking.v1beta1.Port',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='number', full_name='istio.networking.v1beta1.Port.number', index=0,
|
||||
number=1, type=13, cpp_type=3, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='protocol', full_name='istio.networking.v1beta1.Port.protocol', index=1,
|
||||
number=2, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='name', full_name='istio.networking.v1beta1.Port.name', index=2,
|
||||
number=3, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=1132,
|
||||
serialized_end=1196,
|
||||
)
|
||||
|
||||
_GATEWAY_SELECTORENTRY.containing_type = _GATEWAY
|
||||
_GATEWAY.fields_by_name['servers'].message_type = _SERVER
|
||||
_GATEWAY.fields_by_name['selector'].message_type = _GATEWAY_SELECTORENTRY
|
||||
_SERVER_TLSOPTIONS.fields_by_name['mode'].enum_type = _SERVER_TLSOPTIONS_TLSMODE
|
||||
_SERVER_TLSOPTIONS.fields_by_name['min_protocol_version'].enum_type = _SERVER_TLSOPTIONS_TLSPROTOCOL
|
||||
_SERVER_TLSOPTIONS.fields_by_name['max_protocol_version'].enum_type = _SERVER_TLSOPTIONS_TLSPROTOCOL
|
||||
_SERVER_TLSOPTIONS.containing_type = _SERVER
|
||||
_SERVER_TLSOPTIONS_TLSMODE.containing_type = _SERVER_TLSOPTIONS
|
||||
_SERVER_TLSOPTIONS_TLSPROTOCOL.containing_type = _SERVER_TLSOPTIONS
|
||||
_SERVER.fields_by_name['port'].message_type = _PORT
|
||||
_SERVER.fields_by_name['tls'].message_type = _SERVER_TLSOPTIONS
|
||||
DESCRIPTOR.message_types_by_name['Gateway'] = _GATEWAY
|
||||
DESCRIPTOR.message_types_by_name['Server'] = _SERVER
|
||||
DESCRIPTOR.message_types_by_name['Port'] = _PORT
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
Gateway = _reflection.GeneratedProtocolMessageType('Gateway', (_message.Message,), {
|
||||
|
||||
'SelectorEntry' : _reflection.GeneratedProtocolMessageType('SelectorEntry', (_message.Message,), {
|
||||
'DESCRIPTOR' : _GATEWAY_SELECTORENTRY,
|
||||
'__module__' : 'networking.v1beta1.gateway_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.Gateway.SelectorEntry)
|
||||
})
|
||||
,
|
||||
'DESCRIPTOR' : _GATEWAY,
|
||||
'__module__' : 'networking.v1beta1.gateway_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.Gateway)
|
||||
})
|
||||
_sym_db.RegisterMessage(Gateway)
|
||||
_sym_db.RegisterMessage(Gateway.SelectorEntry)
|
||||
|
||||
Server = _reflection.GeneratedProtocolMessageType('Server', (_message.Message,), {
|
||||
|
||||
'TLSOptions' : _reflection.GeneratedProtocolMessageType('TLSOptions', (_message.Message,), {
|
||||
'DESCRIPTOR' : _SERVER_TLSOPTIONS,
|
||||
'__module__' : 'networking.v1beta1.gateway_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.Server.TLSOptions)
|
||||
})
|
||||
,
|
||||
'DESCRIPTOR' : _SERVER,
|
||||
'__module__' : 'networking.v1beta1.gateway_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.Server)
|
||||
})
|
||||
_sym_db.RegisterMessage(Server)
|
||||
_sym_db.RegisterMessage(Server.TLSOptions)
|
||||
|
||||
Port = _reflection.GeneratedProtocolMessageType('Port', (_message.Message,), {
|
||||
'DESCRIPTOR' : _PORT,
|
||||
'__module__' : 'networking.v1beta1.gateway_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.Port)
|
||||
})
|
||||
_sym_db.RegisterMessage(Port)
|
||||
|
||||
|
||||
DESCRIPTOR._options = None
|
||||
_GATEWAY_SELECTORENTRY._options = None
|
||||
_GATEWAY.fields_by_name['servers']._options = None
|
||||
_GATEWAY.fields_by_name['selector']._options = None
|
||||
_SERVER.fields_by_name['port']._options = None
|
||||
_SERVER.fields_by_name['hosts']._options = None
|
||||
_PORT.fields_by_name['number']._options = None
|
||||
_PORT.fields_by_name['protocol']._options = None
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
|
|
@ -0,0 +1,353 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: networking/v1beta1/service_entry.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
|
||||
from networking.v1beta1 import gateway_pb2 as networking_dot_v1beta1_dot_gateway__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='networking/v1beta1/service_entry.proto',
|
||||
package='istio.networking.v1beta1',
|
||||
syntax='proto3',
|
||||
serialized_options=_b('Z\037istio.io/api/networking/v1beta1'),
|
||||
serialized_pb=_b('\n&networking/v1beta1/service_entry.proto\x12\x18istio.networking.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a networking/v1beta1/gateway.proto\"\x94\x06\n\x0cServiceEntry\x12\x12\n\x05hosts\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x11\n\taddresses\x18\x02 \x03(\t\x12\x32\n\x05ports\x18\x03 \x03(\x0b\x32\x1e.istio.networking.v1beta1.PortB\x03\xe0\x41\x02\x12\x41\n\x08location\x18\x04 \x01(\x0e\x32/.istio.networking.v1beta1.ServiceEntry.Location\x12J\n\nresolution\x18\x05 \x01(\x0e\x32\x31.istio.networking.v1beta1.ServiceEntry.ResolutionB\x03\xe0\x41\x02\x12\x42\n\tendpoints\x18\x06 \x03(\x0b\x32/.istio.networking.v1beta1.ServiceEntry.Endpoint\x12\x11\n\texport_to\x18\x07 \x03(\t\x12\x19\n\x11subject_alt_names\x18\x08 \x03(\t\x1a\xc8\x02\n\x08\x45ndpoint\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12I\n\x05ports\x18\x02 \x03(\x0b\x32:.istio.networking.v1beta1.ServiceEntry.Endpoint.PortsEntry\x12K\n\x06labels\x18\x03 \x03(\x0b\x32;.istio.networking.v1beta1.ServiceEntry.Endpoint.LabelsEntry\x12\x0f\n\x07network\x18\x04 \x01(\t\x12\x10\n\x08locality\x18\x05 \x01(\t\x12\x0e\n\x06weight\x18\x06 \x01(\r\x1a,\n\nPortsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"0\n\x08Location\x12\x11\n\rMESH_EXTERNAL\x10\x00\x12\x11\n\rMESH_INTERNAL\x10\x01\"+\n\nResolution\x12\x08\n\x04NONE\x10\x00\x12\n\n\x06STATIC\x10\x01\x12\x07\n\x03\x44NS\x10\x02\x42!Z\x1fistio.io/api/networking/v1beta1b\x06proto3')
|
||||
,
|
||||
dependencies=[google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,networking_dot_v1beta1_dot_gateway__pb2.DESCRIPTOR,])
|
||||
|
||||
|
||||
|
||||
_SERVICEENTRY_LOCATION = _descriptor.EnumDescriptor(
|
||||
name='Location',
|
||||
full_name='istio.networking.v1beta1.ServiceEntry.Location',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
values=[
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='MESH_EXTERNAL', index=0, number=0,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='MESH_INTERNAL', index=1, number=1,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=831,
|
||||
serialized_end=879,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_SERVICEENTRY_LOCATION)
|
||||
|
||||
_SERVICEENTRY_RESOLUTION = _descriptor.EnumDescriptor(
|
||||
name='Resolution',
|
||||
full_name='istio.networking.v1beta1.ServiceEntry.Resolution',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
values=[
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='NONE', index=0, number=0,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='STATIC', index=1, number=1,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='DNS', index=2, number=2,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=881,
|
||||
serialized_end=924,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_SERVICEENTRY_RESOLUTION)
|
||||
|
||||
|
||||
_SERVICEENTRY_ENDPOINT_PORTSENTRY = _descriptor.Descriptor(
|
||||
name='PortsEntry',
|
||||
full_name='istio.networking.v1beta1.ServiceEntry.Endpoint.PortsEntry',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='key', full_name='istio.networking.v1beta1.ServiceEntry.Endpoint.PortsEntry.key', index=0,
|
||||
number=1, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='value', full_name='istio.networking.v1beta1.ServiceEntry.Endpoint.PortsEntry.value', index=1,
|
||||
number=2, type=13, cpp_type=3, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=_b('8\001'),
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=738,
|
||||
serialized_end=782,
|
||||
)
|
||||
|
||||
_SERVICEENTRY_ENDPOINT_LABELSENTRY = _descriptor.Descriptor(
|
||||
name='LabelsEntry',
|
||||
full_name='istio.networking.v1beta1.ServiceEntry.Endpoint.LabelsEntry',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='key', full_name='istio.networking.v1beta1.ServiceEntry.Endpoint.LabelsEntry.key', index=0,
|
||||
number=1, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='value', full_name='istio.networking.v1beta1.ServiceEntry.Endpoint.LabelsEntry.value', index=1,
|
||||
number=2, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=_b('8\001'),
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=784,
|
||||
serialized_end=829,
|
||||
)
|
||||
|
||||
_SERVICEENTRY_ENDPOINT = _descriptor.Descriptor(
|
||||
name='Endpoint',
|
||||
full_name='istio.networking.v1beta1.ServiceEntry.Endpoint',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='address', full_name='istio.networking.v1beta1.ServiceEntry.Endpoint.address', index=0,
|
||||
number=1, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='ports', full_name='istio.networking.v1beta1.ServiceEntry.Endpoint.ports', index=1,
|
||||
number=2, type=11, cpp_type=10, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='labels', full_name='istio.networking.v1beta1.ServiceEntry.Endpoint.labels', index=2,
|
||||
number=3, type=11, cpp_type=10, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='network', full_name='istio.networking.v1beta1.ServiceEntry.Endpoint.network', index=3,
|
||||
number=4, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='locality', full_name='istio.networking.v1beta1.ServiceEntry.Endpoint.locality', index=4,
|
||||
number=5, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='weight', full_name='istio.networking.v1beta1.ServiceEntry.Endpoint.weight', index=5,
|
||||
number=6, type=13, cpp_type=3, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[_SERVICEENTRY_ENDPOINT_PORTSENTRY, _SERVICEENTRY_ENDPOINT_LABELSENTRY, ],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=501,
|
||||
serialized_end=829,
|
||||
)
|
||||
|
||||
_SERVICEENTRY = _descriptor.Descriptor(
|
||||
name='ServiceEntry',
|
||||
full_name='istio.networking.v1beta1.ServiceEntry',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='hosts', full_name='istio.networking.v1beta1.ServiceEntry.hosts', index=0,
|
||||
number=1, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='addresses', full_name='istio.networking.v1beta1.ServiceEntry.addresses', index=1,
|
||||
number=2, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='ports', full_name='istio.networking.v1beta1.ServiceEntry.ports', index=2,
|
||||
number=3, type=11, cpp_type=10, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='location', full_name='istio.networking.v1beta1.ServiceEntry.location', index=3,
|
||||
number=4, type=14, cpp_type=8, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='resolution', full_name='istio.networking.v1beta1.ServiceEntry.resolution', index=4,
|
||||
number=5, type=14, cpp_type=8, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='endpoints', full_name='istio.networking.v1beta1.ServiceEntry.endpoints', index=5,
|
||||
number=6, type=11, cpp_type=10, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='export_to', full_name='istio.networking.v1beta1.ServiceEntry.export_to', index=6,
|
||||
number=7, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='subject_alt_names', full_name='istio.networking.v1beta1.ServiceEntry.subject_alt_names', index=7,
|
||||
number=8, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[_SERVICEENTRY_ENDPOINT, ],
|
||||
enum_types=[
|
||||
_SERVICEENTRY_LOCATION,
|
||||
_SERVICEENTRY_RESOLUTION,
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=136,
|
||||
serialized_end=924,
|
||||
)
|
||||
|
||||
_SERVICEENTRY_ENDPOINT_PORTSENTRY.containing_type = _SERVICEENTRY_ENDPOINT
|
||||
_SERVICEENTRY_ENDPOINT_LABELSENTRY.containing_type = _SERVICEENTRY_ENDPOINT
|
||||
_SERVICEENTRY_ENDPOINT.fields_by_name['ports'].message_type = _SERVICEENTRY_ENDPOINT_PORTSENTRY
|
||||
_SERVICEENTRY_ENDPOINT.fields_by_name['labels'].message_type = _SERVICEENTRY_ENDPOINT_LABELSENTRY
|
||||
_SERVICEENTRY_ENDPOINT.containing_type = _SERVICEENTRY
|
||||
_SERVICEENTRY.fields_by_name['ports'].message_type = networking_dot_v1beta1_dot_gateway__pb2._PORT
|
||||
_SERVICEENTRY.fields_by_name['location'].enum_type = _SERVICEENTRY_LOCATION
|
||||
_SERVICEENTRY.fields_by_name['resolution'].enum_type = _SERVICEENTRY_RESOLUTION
|
||||
_SERVICEENTRY.fields_by_name['endpoints'].message_type = _SERVICEENTRY_ENDPOINT
|
||||
_SERVICEENTRY_LOCATION.containing_type = _SERVICEENTRY
|
||||
_SERVICEENTRY_RESOLUTION.containing_type = _SERVICEENTRY
|
||||
DESCRIPTOR.message_types_by_name['ServiceEntry'] = _SERVICEENTRY
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
ServiceEntry = _reflection.GeneratedProtocolMessageType('ServiceEntry', (_message.Message,), {
|
||||
|
||||
'Endpoint' : _reflection.GeneratedProtocolMessageType('Endpoint', (_message.Message,), {
|
||||
|
||||
'PortsEntry' : _reflection.GeneratedProtocolMessageType('PortsEntry', (_message.Message,), {
|
||||
'DESCRIPTOR' : _SERVICEENTRY_ENDPOINT_PORTSENTRY,
|
||||
'__module__' : 'networking.v1beta1.service_entry_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.ServiceEntry.Endpoint.PortsEntry)
|
||||
})
|
||||
,
|
||||
|
||||
'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), {
|
||||
'DESCRIPTOR' : _SERVICEENTRY_ENDPOINT_LABELSENTRY,
|
||||
'__module__' : 'networking.v1beta1.service_entry_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.ServiceEntry.Endpoint.LabelsEntry)
|
||||
})
|
||||
,
|
||||
'DESCRIPTOR' : _SERVICEENTRY_ENDPOINT,
|
||||
'__module__' : 'networking.v1beta1.service_entry_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.ServiceEntry.Endpoint)
|
||||
})
|
||||
,
|
||||
'DESCRIPTOR' : _SERVICEENTRY,
|
||||
'__module__' : 'networking.v1beta1.service_entry_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.ServiceEntry)
|
||||
})
|
||||
_sym_db.RegisterMessage(ServiceEntry)
|
||||
_sym_db.RegisterMessage(ServiceEntry.Endpoint)
|
||||
_sym_db.RegisterMessage(ServiceEntry.Endpoint.PortsEntry)
|
||||
_sym_db.RegisterMessage(ServiceEntry.Endpoint.LabelsEntry)
|
||||
|
||||
|
||||
DESCRIPTOR._options = None
|
||||
_SERVICEENTRY_ENDPOINT_PORTSENTRY._options = None
|
||||
_SERVICEENTRY_ENDPOINT_LABELSENTRY._options = None
|
||||
_SERVICEENTRY_ENDPOINT.fields_by_name['address']._options = None
|
||||
_SERVICEENTRY.fields_by_name['hosts']._options = None
|
||||
_SERVICEENTRY.fields_by_name['ports']._options = None
|
||||
_SERVICEENTRY.fields_by_name['resolution']._options = None
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
|
|
@ -0,0 +1,411 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: networking/v1beta1/sidecar.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
from google.protobuf.internal import enum_type_wrapper
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
|
||||
from networking.v1beta1 import gateway_pb2 as networking_dot_v1beta1_dot_gateway__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='networking/v1beta1/sidecar.proto',
|
||||
package='istio.networking.v1beta1',
|
||||
syntax='proto3',
|
||||
serialized_options=_b('Z\037istio.io/api/networking/v1beta1'),
|
||||
serialized_pb=_b('\n networking/v1beta1/sidecar.proto\x12\x18istio.networking.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a networking/v1beta1/gateway.proto\"\xa7\x02\n\x07Sidecar\x12\x45\n\x11workload_selector\x18\x01 \x01(\x0b\x32*.istio.networking.v1beta1.WorkloadSelector\x12?\n\x07ingress\x18\x02 \x03(\x0b\x32..istio.networking.v1beta1.IstioIngressListener\x12\x42\n\x06\x65gress\x18\x03 \x03(\x0b\x32-.istio.networking.v1beta1.IstioEgressListenerB\x03\xe0\x41\x02\x12P\n\x17outbound_traffic_policy\x18\x04 \x01(\x0b\x32/.istio.networking.v1beta1.OutboundTrafficPolicy\"\xb3\x01\n\x14IstioIngressListener\x12\x31\n\x04port\x18\x01 \x01(\x0b\x32\x1e.istio.networking.v1beta1.PortB\x03\xe0\x41\x02\x12\x0c\n\x04\x62ind\x18\x02 \x01(\t\x12;\n\x0c\x63\x61pture_mode\x18\x03 \x01(\x0e\x32%.istio.networking.v1beta1.CaptureMode\x12\x1d\n\x10\x64\x65\x66\x61ult_endpoint\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xa2\x01\n\x13IstioEgressListener\x12,\n\x04port\x18\x01 \x01(\x0b\x32\x1e.istio.networking.v1beta1.Port\x12\x0c\n\x04\x62ind\x18\x02 \x01(\t\x12;\n\x0c\x63\x61pture_mode\x18\x03 \x01(\x0e\x32%.istio.networking.v1beta1.CaptureMode\x12\x12\n\x05hosts\x18\x04 \x03(\tB\x03\xe0\x41\x02\"\x8e\x01\n\x10WorkloadSelector\x12K\n\x06labels\x18\x01 \x03(\x0b\x32\x36.istio.networking.v1beta1.WorkloadSelector.LabelsEntryB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x85\x01\n\x15OutboundTrafficPolicy\x12\x42\n\x04mode\x18\x01 \x01(\x0e\x32\x34.istio.networking.v1beta1.OutboundTrafficPolicy.Mode\"(\n\x04Mode\x12\x11\n\rREGISTRY_ONLY\x10\x00\x12\r\n\tALLOW_ANY\x10\x01*2\n\x0b\x43\x61ptureMode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x0c\n\x08IPTABLES\x10\x01\x12\x08\n\x04NONE\x10\x02\x42!Z\x1fistio.io/api/networking/v1beta1b\x06proto3')
|
||||
,
|
||||
dependencies=[google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,networking_dot_v1beta1_dot_gateway__pb2.DESCRIPTOR,])
|
||||
|
||||
_CAPTUREMODE = _descriptor.EnumDescriptor(
|
||||
name='CaptureMode',
|
||||
full_name='istio.networking.v1beta1.CaptureMode',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
values=[
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='DEFAULT', index=0, number=0,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='IPTABLES', index=1, number=1,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='NONE', index=2, number=2,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=1055,
|
||||
serialized_end=1105,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_CAPTUREMODE)
|
||||
|
||||
CaptureMode = enum_type_wrapper.EnumTypeWrapper(_CAPTUREMODE)
|
||||
DEFAULT = 0
|
||||
IPTABLES = 1
|
||||
NONE = 2
|
||||
|
||||
|
||||
_OUTBOUNDTRAFFICPOLICY_MODE = _descriptor.EnumDescriptor(
|
||||
name='Mode',
|
||||
full_name='istio.networking.v1beta1.OutboundTrafficPolicy.Mode',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
values=[
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='REGISTRY_ONLY', index=0, number=0,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
_descriptor.EnumValueDescriptor(
|
||||
name='ALLOW_ANY', index=1, number=1,
|
||||
serialized_options=None,
|
||||
type=None),
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=1013,
|
||||
serialized_end=1053,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_OUTBOUNDTRAFFICPOLICY_MODE)
|
||||
|
||||
|
||||
_SIDECAR = _descriptor.Descriptor(
|
||||
name='Sidecar',
|
||||
full_name='istio.networking.v1beta1.Sidecar',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='workload_selector', full_name='istio.networking.v1beta1.Sidecar.workload_selector', index=0,
|
||||
number=1, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='ingress', full_name='istio.networking.v1beta1.Sidecar.ingress', index=1,
|
||||
number=2, type=11, cpp_type=10, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='egress', full_name='istio.networking.v1beta1.Sidecar.egress', index=2,
|
||||
number=3, type=11, cpp_type=10, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='outbound_traffic_policy', full_name='istio.networking.v1beta1.Sidecar.outbound_traffic_policy', index=3,
|
||||
number=4, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=130,
|
||||
serialized_end=425,
|
||||
)
|
||||
|
||||
|
||||
_ISTIOINGRESSLISTENER = _descriptor.Descriptor(
|
||||
name='IstioIngressListener',
|
||||
full_name='istio.networking.v1beta1.IstioIngressListener',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='port', full_name='istio.networking.v1beta1.IstioIngressListener.port', index=0,
|
||||
number=1, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='bind', full_name='istio.networking.v1beta1.IstioIngressListener.bind', index=1,
|
||||
number=2, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='capture_mode', full_name='istio.networking.v1beta1.IstioIngressListener.capture_mode', index=2,
|
||||
number=3, type=14, cpp_type=8, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='default_endpoint', full_name='istio.networking.v1beta1.IstioIngressListener.default_endpoint', index=3,
|
||||
number=4, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=428,
|
||||
serialized_end=607,
|
||||
)
|
||||
|
||||
|
||||
_ISTIOEGRESSLISTENER = _descriptor.Descriptor(
|
||||
name='IstioEgressListener',
|
||||
full_name='istio.networking.v1beta1.IstioEgressListener',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='port', full_name='istio.networking.v1beta1.IstioEgressListener.port', index=0,
|
||||
number=1, type=11, cpp_type=10, label=1,
|
||||
has_default_value=False, default_value=None,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='bind', full_name='istio.networking.v1beta1.IstioEgressListener.bind', index=1,
|
||||
number=2, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='capture_mode', full_name='istio.networking.v1beta1.IstioEgressListener.capture_mode', index=2,
|
||||
number=3, type=14, cpp_type=8, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='hosts', full_name='istio.networking.v1beta1.IstioEgressListener.hosts', index=3,
|
||||
number=4, type=9, cpp_type=9, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=610,
|
||||
serialized_end=772,
|
||||
)
|
||||
|
||||
|
||||
_WORKLOADSELECTOR_LABELSENTRY = _descriptor.Descriptor(
|
||||
name='LabelsEntry',
|
||||
full_name='istio.networking.v1beta1.WorkloadSelector.LabelsEntry',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='key', full_name='istio.networking.v1beta1.WorkloadSelector.LabelsEntry.key', index=0,
|
||||
number=1, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='value', full_name='istio.networking.v1beta1.WorkloadSelector.LabelsEntry.value', index=1,
|
||||
number=2, type=9, cpp_type=9, label=1,
|
||||
has_default_value=False, default_value=_b("").decode('utf-8'),
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=_b('8\001'),
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=872,
|
||||
serialized_end=917,
|
||||
)
|
||||
|
||||
_WORKLOADSELECTOR = _descriptor.Descriptor(
|
||||
name='WorkloadSelector',
|
||||
full_name='istio.networking.v1beta1.WorkloadSelector',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='labels', full_name='istio.networking.v1beta1.WorkloadSelector.labels', index=0,
|
||||
number=1, type=11, cpp_type=10, label=3,
|
||||
has_default_value=False, default_value=[],
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=_b('\340A\002'), file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[_WORKLOADSELECTOR_LABELSENTRY, ],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=775,
|
||||
serialized_end=917,
|
||||
)
|
||||
|
||||
|
||||
_OUTBOUNDTRAFFICPOLICY = _descriptor.Descriptor(
|
||||
name='OutboundTrafficPolicy',
|
||||
full_name='istio.networking.v1beta1.OutboundTrafficPolicy',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='mode', full_name='istio.networking.v1beta1.OutboundTrafficPolicy.mode', index=0,
|
||||
number=1, type=14, cpp_type=8, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
_OUTBOUNDTRAFFICPOLICY_MODE,
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=920,
|
||||
serialized_end=1053,
|
||||
)
|
||||
|
||||
_SIDECAR.fields_by_name['workload_selector'].message_type = _WORKLOADSELECTOR
|
||||
_SIDECAR.fields_by_name['ingress'].message_type = _ISTIOINGRESSLISTENER
|
||||
_SIDECAR.fields_by_name['egress'].message_type = _ISTIOEGRESSLISTENER
|
||||
_SIDECAR.fields_by_name['outbound_traffic_policy'].message_type = _OUTBOUNDTRAFFICPOLICY
|
||||
_ISTIOINGRESSLISTENER.fields_by_name['port'].message_type = networking_dot_v1beta1_dot_gateway__pb2._PORT
|
||||
_ISTIOINGRESSLISTENER.fields_by_name['capture_mode'].enum_type = _CAPTUREMODE
|
||||
_ISTIOEGRESSLISTENER.fields_by_name['port'].message_type = networking_dot_v1beta1_dot_gateway__pb2._PORT
|
||||
_ISTIOEGRESSLISTENER.fields_by_name['capture_mode'].enum_type = _CAPTUREMODE
|
||||
_WORKLOADSELECTOR_LABELSENTRY.containing_type = _WORKLOADSELECTOR
|
||||
_WORKLOADSELECTOR.fields_by_name['labels'].message_type = _WORKLOADSELECTOR_LABELSENTRY
|
||||
_OUTBOUNDTRAFFICPOLICY.fields_by_name['mode'].enum_type = _OUTBOUNDTRAFFICPOLICY_MODE
|
||||
_OUTBOUNDTRAFFICPOLICY_MODE.containing_type = _OUTBOUNDTRAFFICPOLICY
|
||||
DESCRIPTOR.message_types_by_name['Sidecar'] = _SIDECAR
|
||||
DESCRIPTOR.message_types_by_name['IstioIngressListener'] = _ISTIOINGRESSLISTENER
|
||||
DESCRIPTOR.message_types_by_name['IstioEgressListener'] = _ISTIOEGRESSLISTENER
|
||||
DESCRIPTOR.message_types_by_name['WorkloadSelector'] = _WORKLOADSELECTOR
|
||||
DESCRIPTOR.message_types_by_name['OutboundTrafficPolicy'] = _OUTBOUNDTRAFFICPOLICY
|
||||
DESCRIPTOR.enum_types_by_name['CaptureMode'] = _CAPTUREMODE
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
Sidecar = _reflection.GeneratedProtocolMessageType('Sidecar', (_message.Message,), {
|
||||
'DESCRIPTOR' : _SIDECAR,
|
||||
'__module__' : 'networking.v1beta1.sidecar_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.Sidecar)
|
||||
})
|
||||
_sym_db.RegisterMessage(Sidecar)
|
||||
|
||||
IstioIngressListener = _reflection.GeneratedProtocolMessageType('IstioIngressListener', (_message.Message,), {
|
||||
'DESCRIPTOR' : _ISTIOINGRESSLISTENER,
|
||||
'__module__' : 'networking.v1beta1.sidecar_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.IstioIngressListener)
|
||||
})
|
||||
_sym_db.RegisterMessage(IstioIngressListener)
|
||||
|
||||
IstioEgressListener = _reflection.GeneratedProtocolMessageType('IstioEgressListener', (_message.Message,), {
|
||||
'DESCRIPTOR' : _ISTIOEGRESSLISTENER,
|
||||
'__module__' : 'networking.v1beta1.sidecar_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.IstioEgressListener)
|
||||
})
|
||||
_sym_db.RegisterMessage(IstioEgressListener)
|
||||
|
||||
WorkloadSelector = _reflection.GeneratedProtocolMessageType('WorkloadSelector', (_message.Message,), {
|
||||
|
||||
'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), {
|
||||
'DESCRIPTOR' : _WORKLOADSELECTOR_LABELSENTRY,
|
||||
'__module__' : 'networking.v1beta1.sidecar_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.WorkloadSelector.LabelsEntry)
|
||||
})
|
||||
,
|
||||
'DESCRIPTOR' : _WORKLOADSELECTOR,
|
||||
'__module__' : 'networking.v1beta1.sidecar_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.WorkloadSelector)
|
||||
})
|
||||
_sym_db.RegisterMessage(WorkloadSelector)
|
||||
_sym_db.RegisterMessage(WorkloadSelector.LabelsEntry)
|
||||
|
||||
OutboundTrafficPolicy = _reflection.GeneratedProtocolMessageType('OutboundTrafficPolicy', (_message.Message,), {
|
||||
'DESCRIPTOR' : _OUTBOUNDTRAFFICPOLICY,
|
||||
'__module__' : 'networking.v1beta1.sidecar_pb2'
|
||||
# @@protoc_insertion_point(class_scope:istio.networking.v1beta1.OutboundTrafficPolicy)
|
||||
})
|
||||
_sym_db.RegisterMessage(OutboundTrafficPolicy)
|
||||
|
||||
|
||||
DESCRIPTOR._options = None
|
||||
_SIDECAR.fields_by_name['egress']._options = None
|
||||
_ISTIOINGRESSLISTENER.fields_by_name['port']._options = None
|
||||
_ISTIOINGRESSLISTENER.fields_by_name['default_endpoint']._options = None
|
||||
_ISTIOEGRESSLISTENER.fields_by_name['hosts']._options = None
|
||||
_WORKLOADSELECTOR_LABELSENTRY._options = None
|
||||
_WORKLOADSELECTOR.fields_by_name['labels']._options = None
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue