Documentation ¶
Overview ¶
Package istio is a generated protocol buffer package.
It is generated from these files:
github.com/costinm/dmesh/dm/istio/base.proto github.com/costinm/dmesh/dm/istio/destination_rule.proto github.com/costinm/dmesh/dm/istio/eds.proto github.com/costinm/dmesh/dm/istio/envoy_base.proto github.com/costinm/dmesh/dm/istio/envoy_simplified.proto github.com/costinm/dmesh/dm/istio/gateway.proto github.com/costinm/dmesh/dm/istio/service_entry.proto github.com/costinm/dmesh/dm/istio/virtual_service.proto
It has these top-level messages:
Struct Value ListValue Duration Status Any BoolValue UInt32Value DestinationRule TrafficPolicy Subset LoadBalancerSettings ConnectionPoolSettings OutlierDetection TLSSettings Address Pipe SocketAddress BindConfig CidrRange Endpoint LbEndpoint LocalityLbEndpoints Metadata ClusterLoadAssignment Locality Node DiscoveryRequest DiscoveryResponse Gateway Server Port ServiceEntry VirtualService Destination HTTPRoute TCPRoute HTTPMatchRequest DestinationWeight L4MatchAttributes HTTPRedirect HTTPRewrite StringMatch HTTPRetry CorsPolicy HTTPFaultInjection PortSelector
Index ¶
- Variables
- func RegisterAggregatedDiscoveryServiceServer(s *grpc.Server, srv AggregatedDiscoveryServiceServer)
- type Address
- func (*Address) Descriptor() ([]byte, []int)
- func (m *Address) GetAddress() isAddress_Address
- func (m *Address) GetPipe() *Pipe
- func (m *Address) GetSocketAddress() *SocketAddress
- func (*Address) ProtoMessage()
- func (m *Address) Reset()
- func (m *Address) String() string
- func (*Address) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Address_Pipe
- type Address_SocketAddress
- type AggregatedDiscoveryServiceClient
- type AggregatedDiscoveryServiceServer
- type AggregatedDiscoveryService_StreamAggregatedResourcesClient
- type AggregatedDiscoveryService_StreamAggregatedResourcesServer
- type Any
- type BindConfig
- type BoolValue
- type CidrRange
- type ClusterLoadAssignment
- func (*ClusterLoadAssignment) Descriptor() ([]byte, []int)
- func (m *ClusterLoadAssignment) GetClusterName() string
- func (m *ClusterLoadAssignment) GetEndpoints() []*LocalityLbEndpoints
- func (*ClusterLoadAssignment) ProtoMessage()
- func (m *ClusterLoadAssignment) Reset()
- func (m *ClusterLoadAssignment) String() string
- type ConnectionPoolSettings
- func (*ConnectionPoolSettings) Descriptor() ([]byte, []int)
- func (m *ConnectionPoolSettings) GetHttp() *ConnectionPoolSettings_HTTPSettings
- func (m *ConnectionPoolSettings) GetTcp() *ConnectionPoolSettings_TCPSettings
- func (*ConnectionPoolSettings) ProtoMessage()
- func (m *ConnectionPoolSettings) Reset()
- func (m *ConnectionPoolSettings) String() string
- type ConnectionPoolSettings_HTTPSettings
- func (*ConnectionPoolSettings_HTTPSettings) Descriptor() ([]byte, []int)
- func (m *ConnectionPoolSettings_HTTPSettings) GetHttp1MaxPendingRequests() int32
- func (m *ConnectionPoolSettings_HTTPSettings) GetHttp2MaxRequests() int32
- func (m *ConnectionPoolSettings_HTTPSettings) GetMaxRequestsPerConnection() int32
- func (m *ConnectionPoolSettings_HTTPSettings) GetMaxRetries() int32
- func (*ConnectionPoolSettings_HTTPSettings) ProtoMessage()
- func (m *ConnectionPoolSettings_HTTPSettings) Reset()
- func (m *ConnectionPoolSettings_HTTPSettings) String() string
- type ConnectionPoolSettings_TCPSettings
- func (*ConnectionPoolSettings_TCPSettings) Descriptor() ([]byte, []int)
- func (m *ConnectionPoolSettings_TCPSettings) GetConnectTimeout() *Duration
- func (m *ConnectionPoolSettings_TCPSettings) GetMaxConnections() int32
- func (*ConnectionPoolSettings_TCPSettings) ProtoMessage()
- func (m *ConnectionPoolSettings_TCPSettings) Reset()
- func (m *ConnectionPoolSettings_TCPSettings) String() string
- type CorsPolicy
- func (*CorsPolicy) Descriptor() ([]byte, []int)
- func (m *CorsPolicy) GetAllowCredentials() *BoolValue
- func (m *CorsPolicy) GetAllowHeaders() []string
- func (m *CorsPolicy) GetAllowMethods() []string
- func (m *CorsPolicy) GetAllowOrigin() []string
- func (m *CorsPolicy) GetExposeHeaders() []string
- func (m *CorsPolicy) GetMaxAge() *Duration
- func (*CorsPolicy) ProtoMessage()
- func (m *CorsPolicy) Reset()
- func (m *CorsPolicy) String() string
- type Destination
- type DestinationRule
- func (*DestinationRule) Descriptor() ([]byte, []int)
- func (m *DestinationRule) GetHost() string
- func (m *DestinationRule) GetSubsets() []*Subset
- func (m *DestinationRule) GetTrafficPolicy() *TrafficPolicy
- func (*DestinationRule) ProtoMessage()
- func (m *DestinationRule) Reset()
- func (m *DestinationRule) String() string
- type DestinationWeight
- type DiscoveryRequest
- func (*DiscoveryRequest) Descriptor() ([]byte, []int)
- func (m *DiscoveryRequest) GetErrorDetail() *Status
- func (m *DiscoveryRequest) GetNode() *Node
- func (m *DiscoveryRequest) GetResourceNames() []string
- func (m *DiscoveryRequest) GetResponseNonce() string
- func (m *DiscoveryRequest) GetTypeUrl() string
- func (m *DiscoveryRequest) GetVersionInfo() string
- func (*DiscoveryRequest) ProtoMessage()
- func (m *DiscoveryRequest) Reset()
- func (m *DiscoveryRequest) String() string
- type DiscoveryResponse
- func (*DiscoveryResponse) Descriptor() ([]byte, []int)
- func (m *DiscoveryResponse) GetCanary() bool
- func (m *DiscoveryResponse) GetNonce() string
- func (m *DiscoveryResponse) GetResources() []*Any
- func (m *DiscoveryResponse) GetTypeUrl() string
- func (m *DiscoveryResponse) GetVersionInfo() string
- func (*DiscoveryResponse) ProtoMessage()
- func (m *DiscoveryResponse) Reset()
- func (m *DiscoveryResponse) String() string
- type Duration
- type Endpoint
- type Gateway
- type HTTPFaultInjection
- func (*HTTPFaultInjection) Descriptor() ([]byte, []int)
- func (m *HTTPFaultInjection) GetAbort() *HTTPFaultInjection_Abort
- func (m *HTTPFaultInjection) GetDelay() *HTTPFaultInjection_Delay
- func (*HTTPFaultInjection) ProtoMessage()
- func (m *HTTPFaultInjection) Reset()
- func (m *HTTPFaultInjection) String() string
- type HTTPFaultInjection_Abort
- func (*HTTPFaultInjection_Abort) Descriptor() ([]byte, []int)
- func (m *HTTPFaultInjection_Abort) GetErrorType() isHTTPFaultInjection_Abort_ErrorType
- func (m *HTTPFaultInjection_Abort) GetGrpcStatus() string
- func (m *HTTPFaultInjection_Abort) GetHttp2Error() string
- func (m *HTTPFaultInjection_Abort) GetHttpStatus() int32
- func (m *HTTPFaultInjection_Abort) GetPercent() int32
- func (*HTTPFaultInjection_Abort) ProtoMessage()
- func (m *HTTPFaultInjection_Abort) Reset()
- func (m *HTTPFaultInjection_Abort) String() string
- func (*HTTPFaultInjection_Abort) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type HTTPFaultInjection_Abort_GrpcStatus
- type HTTPFaultInjection_Abort_Http2Error
- type HTTPFaultInjection_Abort_HttpStatus
- type HTTPFaultInjection_Delay
- func (*HTTPFaultInjection_Delay) Descriptor() ([]byte, []int)
- func (m *HTTPFaultInjection_Delay) GetExponentialDelay() *Duration
- func (m *HTTPFaultInjection_Delay) GetFixedDelay() *Duration
- func (m *HTTPFaultInjection_Delay) GetHttpDelayType() isHTTPFaultInjection_Delay_HttpDelayType
- func (m *HTTPFaultInjection_Delay) GetPercent() int32
- func (*HTTPFaultInjection_Delay) ProtoMessage()
- func (m *HTTPFaultInjection_Delay) Reset()
- func (m *HTTPFaultInjection_Delay) String() string
- func (*HTTPFaultInjection_Delay) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type HTTPFaultInjection_Delay_ExponentialDelay
- type HTTPFaultInjection_Delay_FixedDelay
- type HTTPMatchRequest
- func (*HTTPMatchRequest) Descriptor() ([]byte, []int)
- func (m *HTTPMatchRequest) GetAuthority() *StringMatch
- func (m *HTTPMatchRequest) GetGateways() []string
- func (m *HTTPMatchRequest) GetHeaders() map[string]*StringMatch
- func (m *HTTPMatchRequest) GetMethod() *StringMatch
- func (m *HTTPMatchRequest) GetPort() uint32
- func (m *HTTPMatchRequest) GetScheme() *StringMatch
- func (m *HTTPMatchRequest) GetSourceLabels() map[string]string
- func (m *HTTPMatchRequest) GetUri() *StringMatch
- func (*HTTPMatchRequest) ProtoMessage()
- func (m *HTTPMatchRequest) Reset()
- func (m *HTTPMatchRequest) String() string
- type HTTPRedirect
- type HTTPRetry
- type HTTPRewrite
- type HTTPRoute
- func (*HTTPRoute) Descriptor() ([]byte, []int)
- func (m *HTTPRoute) GetAppendHeaders() map[string]string
- func (m *HTTPRoute) GetCorsPolicy() *CorsPolicy
- func (m *HTTPRoute) GetFault() *HTTPFaultInjection
- func (m *HTTPRoute) GetMatch() []*HTTPMatchRequest
- func (m *HTTPRoute) GetMirror() *Destination
- func (m *HTTPRoute) GetRedirect() *HTTPRedirect
- func (m *HTTPRoute) GetRetries() *HTTPRetry
- func (m *HTTPRoute) GetRewrite() *HTTPRewrite
- func (m *HTTPRoute) GetRoute() []*DestinationWeight
- func (m *HTTPRoute) GetTimeout() *Duration
- func (m *HTTPRoute) GetWebsocketUpgrade() bool
- func (*HTTPRoute) ProtoMessage()
- func (m *HTTPRoute) Reset()
- func (m *HTTPRoute) String() string
- type L4MatchAttributes
- func (*L4MatchAttributes) Descriptor() ([]byte, []int)
- func (m *L4MatchAttributes) GetDestinationSubnet() string
- func (m *L4MatchAttributes) GetGateways() []string
- func (m *L4MatchAttributes) GetPort() uint32
- func (m *L4MatchAttributes) GetSourceLabels() map[string]string
- func (m *L4MatchAttributes) GetSourceSubnet() string
- func (*L4MatchAttributes) ProtoMessage()
- func (m *L4MatchAttributes) Reset()
- func (m *L4MatchAttributes) String() string
- type LbEndpoint
- type ListValue
- type LoadBalancerSettings
- func (*LoadBalancerSettings) Descriptor() ([]byte, []int)
- func (m *LoadBalancerSettings) GetConsistentHash() *LoadBalancerSettings_ConsistentHashLB
- func (m *LoadBalancerSettings) GetLbPolicy() isLoadBalancerSettings_LbPolicy
- func (m *LoadBalancerSettings) GetSimple() LoadBalancerSettings_SimpleLB
- func (*LoadBalancerSettings) ProtoMessage()
- func (m *LoadBalancerSettings) Reset()
- func (m *LoadBalancerSettings) String() string
- func (*LoadBalancerSettings) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type LoadBalancerSettings_ConsistentHash
- type LoadBalancerSettings_ConsistentHashLB
- func (*LoadBalancerSettings_ConsistentHashLB) Descriptor() ([]byte, []int)
- func (m *LoadBalancerSettings_ConsistentHashLB) GetHttpHeader() string
- func (m *LoadBalancerSettings_ConsistentHashLB) GetMinimumRingSize() uint32
- func (*LoadBalancerSettings_ConsistentHashLB) ProtoMessage()
- func (m *LoadBalancerSettings_ConsistentHashLB) Reset()
- func (m *LoadBalancerSettings_ConsistentHashLB) String() string
- type LoadBalancerSettings_Simple
- type LoadBalancerSettings_SimpleLB
- type Locality
- type LocalityLbEndpoints
- func (*LocalityLbEndpoints) Descriptor() ([]byte, []int)
- func (m *LocalityLbEndpoints) GetLbEndpoints() []*LbEndpoint
- func (m *LocalityLbEndpoints) GetLoadBalancingWeight() *UInt32Value
- func (m *LocalityLbEndpoints) GetLocality() *Locality
- func (m *LocalityLbEndpoints) GetPriority() uint32
- func (*LocalityLbEndpoints) ProtoMessage()
- func (m *LocalityLbEndpoints) Reset()
- func (m *LocalityLbEndpoints) String() string
- type Metadata
- type Node
- func (*Node) Descriptor() ([]byte, []int)
- func (m *Node) GetBuildVersion() string
- func (m *Node) GetCluster() string
- func (m *Node) GetId() string
- func (m *Node) GetLocality() *Locality
- func (m *Node) GetMetadata() *Struct
- func (*Node) ProtoMessage()
- func (m *Node) Reset()
- func (m *Node) String() string
- type NullValue
- type OutlierDetection
- type OutlierDetection_HTTPSettings
- func (*OutlierDetection_HTTPSettings) Descriptor() ([]byte, []int)
- func (m *OutlierDetection_HTTPSettings) GetBaseEjectionTime() *Duration
- func (m *OutlierDetection_HTTPSettings) GetConsecutiveErrors() int32
- func (m *OutlierDetection_HTTPSettings) GetInterval() *Duration
- func (m *OutlierDetection_HTTPSettings) GetMaxEjectionPercent() int32
- func (*OutlierDetection_HTTPSettings) ProtoMessage()
- func (m *OutlierDetection_HTTPSettings) Reset()
- func (m *OutlierDetection_HTTPSettings) String() string
- type Pipe
- type Port
- type PortSelector
- func (*PortSelector) Descriptor() ([]byte, []int)
- func (m *PortSelector) GetName() string
- func (m *PortSelector) GetNumber() uint32
- func (m *PortSelector) GetPort() isPortSelector_Port
- func (*PortSelector) ProtoMessage()
- func (m *PortSelector) Reset()
- func (m *PortSelector) String() string
- func (*PortSelector) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type PortSelector_Name
- type PortSelector_Number
- type Server
- func (*Server) Descriptor() ([]byte, []int)deprecated
- func (x *Server) GetHosts() []string
- func (x *Server) GetPort() *Port
- func (x *Server) GetTls() *Server_TLSOptions
- func (*Server) ProtoMessage()
- func (x *Server) ProtoReflect() protoreflect.Message
- func (x *Server) Reset()
- func (x *Server) String() string
- type Server_TLSOptions
- func (*Server_TLSOptions) Descriptor() ([]byte, []int)deprecated
- func (x *Server_TLSOptions) GetCaCertificates() string
- func (x *Server_TLSOptions) GetHttpsRedirect() bool
- func (x *Server_TLSOptions) GetMode() Server_TLSOptions_TLSmode
- func (x *Server_TLSOptions) GetPrivateKey() string
- func (x *Server_TLSOptions) GetServerCertificate() string
- func (x *Server_TLSOptions) GetSubjectAltNames() []string
- func (*Server_TLSOptions) ProtoMessage()
- func (x *Server_TLSOptions) ProtoReflect() protoreflect.Message
- func (x *Server_TLSOptions) Reset()
- func (x *Server_TLSOptions) String() string
- type Server_TLSOptions_TLSmode
- func (Server_TLSOptions_TLSmode) Descriptor() protoreflect.EnumDescriptor
- func (x Server_TLSOptions_TLSmode) Enum() *Server_TLSOptions_TLSmode
- func (Server_TLSOptions_TLSmode) EnumDescriptor() ([]byte, []int)deprecated
- func (x Server_TLSOptions_TLSmode) Number() protoreflect.EnumNumber
- func (x Server_TLSOptions_TLSmode) String() string
- func (Server_TLSOptions_TLSmode) Type() protoreflect.EnumType
- type ServiceEntry
- func (*ServiceEntry) Descriptor() ([]byte, []int)
- func (m *ServiceEntry) GetAddresses() []string
- func (m *ServiceEntry) GetEndpoints() []*ServiceEntry_Endpoint
- func (m *ServiceEntry) GetHosts() []string
- func (m *ServiceEntry) GetLocation() ServiceEntry_Location
- func (m *ServiceEntry) GetPorts() []*Port
- func (m *ServiceEntry) GetResolution() ServiceEntry_Resolution
- func (*ServiceEntry) ProtoMessage()
- func (m *ServiceEntry) Reset()
- func (m *ServiceEntry) String() string
- type ServiceEntry_Endpoint
- func (*ServiceEntry_Endpoint) Descriptor() ([]byte, []int)
- func (m *ServiceEntry_Endpoint) GetAddress() string
- func (m *ServiceEntry_Endpoint) GetLabels() map[string]string
- func (m *ServiceEntry_Endpoint) GetPorts() map[string]uint32
- func (*ServiceEntry_Endpoint) ProtoMessage()
- func (m *ServiceEntry_Endpoint) Reset()
- func (m *ServiceEntry_Endpoint) String() string
- type ServiceEntry_Location
- type ServiceEntry_Resolution
- type SocketAddress
- func (*SocketAddress) Descriptor() ([]byte, []int)
- func (m *SocketAddress) GetAddress() string
- func (m *SocketAddress) GetIpv4Compat() bool
- func (m *SocketAddress) GetNamedPort() string
- func (m *SocketAddress) GetPortSpecifier() isSocketAddress_PortSpecifier
- func (m *SocketAddress) GetPortValue() uint32
- func (m *SocketAddress) GetProtocol() SocketAddress_Protocol
- func (m *SocketAddress) GetResolverName() string
- func (*SocketAddress) ProtoMessage()
- func (m *SocketAddress) Reset()
- func (m *SocketAddress) String() string
- func (*SocketAddress) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type SocketAddress_NamedPort
- type SocketAddress_PortValue
- type SocketAddress_Protocol
- type Status
- type StringMatch
- func (*StringMatch) Descriptor() ([]byte, []int)
- func (m *StringMatch) GetExact() string
- func (m *StringMatch) GetMatchType() isStringMatch_MatchType
- func (m *StringMatch) GetPrefix() string
- func (m *StringMatch) GetRegex() string
- func (*StringMatch) ProtoMessage()
- func (m *StringMatch) Reset()
- func (m *StringMatch) String() string
- func (*StringMatch) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type StringMatch_Exact
- type StringMatch_Prefix
- type StringMatch_Regex
- type Struct
- type Subset
- type TCPRoute
- type TLSSettings
- func (*TLSSettings) Descriptor() ([]byte, []int)
- func (m *TLSSettings) GetCaCertificates() string
- func (m *TLSSettings) GetClientCertificate() string
- func (m *TLSSettings) GetMode() TLSSettings_TLSmode
- func (m *TLSSettings) GetPrivateKey() string
- func (m *TLSSettings) GetSni() string
- func (m *TLSSettings) GetSubjectAltNames() []string
- func (*TLSSettings) ProtoMessage()
- func (m *TLSSettings) Reset()
- func (m *TLSSettings) String() string
- type TLSSettings_TLSmode
- type TrafficPolicy
- func (*TrafficPolicy) Descriptor() ([]byte, []int)
- func (m *TrafficPolicy) GetConnectionPool() *ConnectionPoolSettings
- func (m *TrafficPolicy) GetLoadBalancer() *LoadBalancerSettings
- func (m *TrafficPolicy) GetOutlierDetection() *OutlierDetection
- func (m *TrafficPolicy) GetPortLevelSettings() []*TrafficPolicy_PortTrafficPolicy
- func (m *TrafficPolicy) GetTls() *TLSSettings
- func (*TrafficPolicy) ProtoMessage()
- func (m *TrafficPolicy) Reset()
- func (m *TrafficPolicy) String() string
- type TrafficPolicy_PortTrafficPolicy
- func (*TrafficPolicy_PortTrafficPolicy) Descriptor() ([]byte, []int)
- func (m *TrafficPolicy_PortTrafficPolicy) GetConnectionPool() *ConnectionPoolSettings
- func (m *TrafficPolicy_PortTrafficPolicy) GetLoadBalancer() *LoadBalancerSettings
- func (m *TrafficPolicy_PortTrafficPolicy) GetOutlierDetection() *OutlierDetection
- func (m *TrafficPolicy_PortTrafficPolicy) GetPort() *PortSelector
- func (m *TrafficPolicy_PortTrafficPolicy) GetTls() *TLSSettings
- func (*TrafficPolicy_PortTrafficPolicy) ProtoMessage()
- func (m *TrafficPolicy_PortTrafficPolicy) Reset()
- func (m *TrafficPolicy_PortTrafficPolicy) String() string
- type UInt32Value
- type Value
- func (*Value) Descriptor() ([]byte, []int)
- func (m *Value) GetBoolValue() bool
- func (m *Value) GetKind() isValue_Kind
- func (m *Value) GetListValue() *ListValue
- func (m *Value) GetNullValue() NullValue
- func (m *Value) GetNumberValue() float64
- func (m *Value) GetStringValue() string
- func (m *Value) GetStructValue() *Struct
- func (*Value) ProtoMessage()
- func (m *Value) Reset()
- func (m *Value) String() string
- func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Value_BoolValue
- type Value_ListValue
- type Value_NullValue
- type Value_NumberValue
- type Value_StringValue
- type Value_StructValue
- type VirtualService
- func (*VirtualService) Descriptor() ([]byte, []int)
- func (m *VirtualService) GetGateways() []string
- func (m *VirtualService) GetHosts() []string
- func (m *VirtualService) GetHttp() []*HTTPRoute
- func (m *VirtualService) GetTcp() []*TCPRoute
- func (*VirtualService) ProtoMessage()
- func (m *VirtualService) Reset()
- func (m *VirtualService) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Server_TLSOptions_TLSmode_name = map[int32]string{ 0: "PASSTHROUGH", 1: "SIMPLE", 2: "MUTUAL", } Server_TLSOptions_TLSmode_value = map[string]int32{ "PASSTHROUGH": 0, "SIMPLE": 1, "MUTUAL": 2, } )
Enum value maps for Server_TLSOptions_TLSmode.
var File_gateway_proto protoreflect.FileDescriptor
var LoadBalancerSettings_SimpleLB_name = map[int32]string{
0: "ROUND_ROBIN",
1: "LEAST_CONN",
2: "RANDOM",
3: "PASSTHROUGH",
}
var LoadBalancerSettings_SimpleLB_value = map[string]int32{
"ROUND_ROBIN": 0,
"LEAST_CONN": 1,
"RANDOM": 2,
"PASSTHROUGH": 3,
}
var NullValue_name = map[int32]string{
0: "NULL_VALUE",
}
var NullValue_value = map[string]int32{
"NULL_VALUE": 0,
}
var ServiceEntry_Location_name = map[int32]string{
0: "MESH_EXTERNAL",
1: "MESH_INTERNAL",
}
var ServiceEntry_Location_value = map[string]int32{
"MESH_EXTERNAL": 0,
"MESH_INTERNAL": 1,
}
var ServiceEntry_Resolution_name = map[int32]string{
0: "NONE",
1: "STATIC",
2: "DNS",
}
var ServiceEntry_Resolution_value = map[string]int32{
"NONE": 0,
"STATIC": 1,
"DNS": 2,
}
var SocketAddress_Protocol_name = map[int32]string{
0: "TCP",
1: "UDP",
}
var SocketAddress_Protocol_value = map[string]int32{
"TCP": 0,
"UDP": 1,
}
var TLSSettings_TLSmode_name = map[int32]string{
0: "DISABLE",
1: "SIMPLE",
2: "MUTUAL",
}
var TLSSettings_TLSmode_value = map[string]int32{
"DISABLE": 0,
"SIMPLE": 1,
"MUTUAL": 2,
}
Functions ¶
func RegisterAggregatedDiscoveryServiceServer ¶
func RegisterAggregatedDiscoveryServiceServer(s *grpc.Server, srv AggregatedDiscoveryServiceServer)
Types ¶
type Address ¶
type Address struct { // Types that are valid to be assigned to Address: // *Address_SocketAddress // *Address_Pipe Address isAddress_Address `protobuf_oneof:"address"` }
Addresses specify either a logical or physical address and port, which are used to tell Envoy where to bind/listen, connect to upstream and find management servers.
func (*Address) Descriptor ¶
func (*Address) GetAddress ¶
func (m *Address) GetAddress() isAddress_Address
func (*Address) GetSocketAddress ¶
func (m *Address) GetSocketAddress() *SocketAddress
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
type Address_Pipe ¶
type Address_Pipe struct {
Pipe *Pipe `protobuf:"bytes,2,opt,name=pipe,oneof"`
}
type Address_SocketAddress ¶
type Address_SocketAddress struct {
SocketAddress *SocketAddress `protobuf:"bytes,1,opt,name=socket_address,oneof"`
}
type AggregatedDiscoveryServiceClient ¶
type AggregatedDiscoveryServiceClient interface { // This is a gRPC-only API. StreamAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_StreamAggregatedResourcesClient, error) }
func NewAggregatedDiscoveryServiceClient ¶
func NewAggregatedDiscoveryServiceClient(cc *grpc.ClientConn) AggregatedDiscoveryServiceClient
type AggregatedDiscoveryServiceServer ¶
type AggregatedDiscoveryServiceServer interface { // This is a gRPC-only API. StreamAggregatedResources(AggregatedDiscoveryService_StreamAggregatedResourcesServer) error }
type AggregatedDiscoveryService_StreamAggregatedResourcesClient ¶
type AggregatedDiscoveryService_StreamAggregatedResourcesClient interface { Send(*DiscoveryRequest) error Recv() (*DiscoveryResponse, error) grpc.ClientStream }
type AggregatedDiscoveryService_StreamAggregatedResourcesServer ¶
type AggregatedDiscoveryService_StreamAggregatedResourcesServer interface { Send(*DiscoveryResponse) error Recv() (*DiscoveryRequest, error) grpc.ServerStream }
type Any ¶
type Any struct { // A URL/resource name whose content describes the type of the // serialized protocol buffer message. // // For URLs which use the scheme `http`, `https`, or no scheme, the // following restrictions and interpretations apply: // // * If no scheme is provided, `https` is assumed. // * The last segment of the URL's path must represent the fully // qualified name of the type (as in `path/google.protobuf.Duration`). // The name should be in a canonical form (e.g., leading "." is // not accepted). // * An HTTP GET on the URL must yield a [google.protobuf.Type][] // value in binary format, or produce an error. // * Applications are allowed to cache lookup results based on the // URL, or have them precompiled into a binary to avoid any // lookup. Therefore, binary compatibility needs to be preserved // on changes to types. (Use versioned type names to manage // breaking changes.) // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. // TypeUrl string `protobuf:"bytes,1,opt,name=type_url,proto3" json:"type_url,omitempty"` // Must be a valid serialized protocol buffer of the above specified type. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
`Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }
Example 2: Pack and unpack a message in Java.
Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... }
The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z".
JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": <string>, "lastName": <string> }
If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
{ "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
func (*Any) Descriptor ¶
func (*Any) GetTypeUrl ¶
func (*Any) ProtoMessage ¶
func (*Any) ProtoMessage()
type BindConfig ¶
type BindConfig struct { // The address to bind to when creating a socket. SourceAddress *SocketAddress `protobuf:"bytes,1,opt,name=source_address" json:"source_address,omitempty"` }
func (*BindConfig) Descriptor ¶
func (*BindConfig) Descriptor() ([]byte, []int)
func (*BindConfig) GetSourceAddress ¶
func (m *BindConfig) GetSourceAddress() *SocketAddress
func (*BindConfig) ProtoMessage ¶
func (*BindConfig) ProtoMessage()
func (*BindConfig) Reset ¶
func (m *BindConfig) Reset()
func (*BindConfig) String ¶
func (m *BindConfig) String() string
type BoolValue ¶
type BoolValue struct { // The bool value. Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` }
Wrapper message for `bool`.
The JSON representation for `BoolValue` is JSON `true` and `false`.
func (*BoolValue) Descriptor ¶
func (*BoolValue) ProtoMessage ¶
func (*BoolValue) ProtoMessage()
type CidrRange ¶
type CidrRange struct { // IPv4 or IPv6 address, e.g. “192.0.0.0“ or “2001:db8::“. AddressPrefix string `protobuf:"bytes,1,opt,name=address_prefix,proto3" json:"address_prefix,omitempty"` // Length of prefix, e.g. 0, 32. PrefixLen *UInt32Value `protobuf:"bytes,2,opt,name=prefix_len" json:"prefix_len,omitempty"` }
CidrRange specifies an IP Address and a prefix length to construct the subnet mask for a `CIDR <https://tools.ietf.org/html/rfc4632>`_ range.
func (*CidrRange) Descriptor ¶
func (*CidrRange) GetAddressPrefix ¶
func (*CidrRange) GetPrefixLen ¶
func (m *CidrRange) GetPrefixLen() *UInt32Value
func (*CidrRange) ProtoMessage ¶
func (*CidrRange) ProtoMessage()
type ClusterLoadAssignment ¶
type ClusterLoadAssignment struct { // Name of the cluster. This will be the :ref:`service_name // <envoy_api_field_Cluster.EdsClusterConfig.service_name>` value if specified // in the cluster :ref:`EdsClusterConfig // <envoy_api_msg_Cluster.EdsClusterConfig>`. ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,proto3" json:"cluster_name,omitempty"` // List of endpoints to load balance to. Endpoints []*LocalityLbEndpoints `protobuf:"bytes,2,rep,name=endpoints" json:"endpoints,omitempty"` }
Each route from RDS will map to a single cluster or traffic split across clusters using weights expressed in the RDS WeightedCluster.
With EDS, each cluster is treated independently from a LB perspective, with LB taking place between the Localities within a cluster and at a finer granularity between the hosts within a locality. For a given cluster, the effective weight of a host is its load_balancing_weight multiplied by the load_balancing_weight of its Locality.
func (*ClusterLoadAssignment) Descriptor ¶
func (*ClusterLoadAssignment) Descriptor() ([]byte, []int)
func (*ClusterLoadAssignment) GetClusterName ¶
func (m *ClusterLoadAssignment) GetClusterName() string
func (*ClusterLoadAssignment) GetEndpoints ¶
func (m *ClusterLoadAssignment) GetEndpoints() []*LocalityLbEndpoints
func (*ClusterLoadAssignment) ProtoMessage ¶
func (*ClusterLoadAssignment) ProtoMessage()
func (*ClusterLoadAssignment) Reset ¶
func (m *ClusterLoadAssignment) Reset()
func (*ClusterLoadAssignment) String ¶
func (m *ClusterLoadAssignment) String() string
type ConnectionPoolSettings ¶
type ConnectionPoolSettings struct { // Settings common to both HTTP and TCP upstream connections. Tcp *ConnectionPoolSettings_TCPSettings `protobuf:"bytes,1,opt,name=tcp" json:"tcp,omitempty"` // HTTP connection pool settings. Http *ConnectionPoolSettings_HTTPSettings `protobuf:"bytes,2,opt,name=http" json:"http,omitempty"` }
Connection pool settings for an upstream host. The settings apply to each individual host in the upstream service. See Envoy's [circuit breaker](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/circuit_breaking) for more details. Connection pool settings can be applied at the TCP level as well as at HTTP level.
For example, the following rule sets a limit of 100 connections to redis service called myredissrv with a connect timeout of 30ms
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: bookinfo-redis spec: host: myredissrv.prod.svc.cluster.local trafficPolicy: connectionPool: tcp: maxConnections: 100 connectTimeout: 30ms
func (*ConnectionPoolSettings) Descriptor ¶
func (*ConnectionPoolSettings) Descriptor() ([]byte, []int)
func (*ConnectionPoolSettings) GetHttp ¶
func (m *ConnectionPoolSettings) GetHttp() *ConnectionPoolSettings_HTTPSettings
func (*ConnectionPoolSettings) GetTcp ¶
func (m *ConnectionPoolSettings) GetTcp() *ConnectionPoolSettings_TCPSettings
func (*ConnectionPoolSettings) ProtoMessage ¶
func (*ConnectionPoolSettings) ProtoMessage()
func (*ConnectionPoolSettings) Reset ¶
func (m *ConnectionPoolSettings) Reset()
func (*ConnectionPoolSettings) String ¶
func (m *ConnectionPoolSettings) String() string
type ConnectionPoolSettings_HTTPSettings ¶
type ConnectionPoolSettings_HTTPSettings struct { // Maximum number of pending HTTP requests to a destination. Default 1024. Http1MaxPendingRequests int32 `protobuf:"varint,1,opt,name=http1_max_pending_requests,proto3" json:"http1_max_pending_requests,omitempty"` // Maximum number of requests to a backend. Default 1024. Http2MaxRequests int32 `protobuf:"varint,2,opt,name=http2_max_requests,proto3" json:"http2_max_requests,omitempty"` // Maximum number of requests per connection to a backend. Setting this // parameter to 1 disables keep alive. MaxRequestsPerConnection int32 `protobuf:"varint,3,opt,name=max_requests_per_connection,proto3" json:"max_requests_per_connection,omitempty"` // Maximum number of retries that can be outstanding to all hosts in a // cluster at a given time. Defaults to 3. MaxRetries int32 `protobuf:"varint,4,opt,name=max_retries,proto3" json:"max_retries,omitempty"` }
Settings applicable to HTTP1.1/HTTP2/GRPC connections.
func (*ConnectionPoolSettings_HTTPSettings) Descriptor ¶
func (*ConnectionPoolSettings_HTTPSettings) Descriptor() ([]byte, []int)
func (*ConnectionPoolSettings_HTTPSettings) GetHttp1MaxPendingRequests ¶
func (m *ConnectionPoolSettings_HTTPSettings) GetHttp1MaxPendingRequests() int32
func (*ConnectionPoolSettings_HTTPSettings) GetHttp2MaxRequests ¶
func (m *ConnectionPoolSettings_HTTPSettings) GetHttp2MaxRequests() int32
func (*ConnectionPoolSettings_HTTPSettings) GetMaxRequestsPerConnection ¶
func (m *ConnectionPoolSettings_HTTPSettings) GetMaxRequestsPerConnection() int32
func (*ConnectionPoolSettings_HTTPSettings) GetMaxRetries ¶
func (m *ConnectionPoolSettings_HTTPSettings) GetMaxRetries() int32
func (*ConnectionPoolSettings_HTTPSettings) ProtoMessage ¶
func (*ConnectionPoolSettings_HTTPSettings) ProtoMessage()
func (*ConnectionPoolSettings_HTTPSettings) Reset ¶
func (m *ConnectionPoolSettings_HTTPSettings) Reset()
func (*ConnectionPoolSettings_HTTPSettings) String ¶
func (m *ConnectionPoolSettings_HTTPSettings) String() string
type ConnectionPoolSettings_TCPSettings ¶
type ConnectionPoolSettings_TCPSettings struct { // Maximum number of HTTP1 /TCP connections to a destination host. MaxConnections int32 `protobuf:"varint,1,opt,name=max_connections,proto3" json:"max_connections,omitempty"` // TCP connection timeout. ConnectTimeout *Duration `protobuf:"bytes,2,opt,name=connect_timeout" json:"connect_timeout,omitempty"` }
Settings common to both HTTP and TCP upstream connections.
func (*ConnectionPoolSettings_TCPSettings) Descriptor ¶
func (*ConnectionPoolSettings_TCPSettings) Descriptor() ([]byte, []int)
func (*ConnectionPoolSettings_TCPSettings) GetConnectTimeout ¶
func (m *ConnectionPoolSettings_TCPSettings) GetConnectTimeout() *Duration
func (*ConnectionPoolSettings_TCPSettings) GetMaxConnections ¶
func (m *ConnectionPoolSettings_TCPSettings) GetMaxConnections() int32
func (*ConnectionPoolSettings_TCPSettings) ProtoMessage ¶
func (*ConnectionPoolSettings_TCPSettings) ProtoMessage()
func (*ConnectionPoolSettings_TCPSettings) Reset ¶
func (m *ConnectionPoolSettings_TCPSettings) Reset()
func (*ConnectionPoolSettings_TCPSettings) String ¶
func (m *ConnectionPoolSettings_TCPSettings) String() string
type CorsPolicy ¶
type CorsPolicy struct { // The list of origins that are allowed to perform CORS requests. The // content will be serialized into the Access-Control-Allow-Origin // header. Wildcard * will allow all origins. AllowOrigin []string `protobuf:"bytes,1,rep,name=allow_origin" json:"allow_origin,omitempty"` // List of HTTP methods allowed to access the resource. The content will // be serialized into the Access-Control-Allow-Methods header. AllowMethods []string `protobuf:"bytes,2,rep,name=allow_methods" json:"allow_methods,omitempty"` // List of HTTP headers that can be used when requesting the // resource. Serialized to Access-Control-Allow-Methods header. AllowHeaders []string `protobuf:"bytes,3,rep,name=allow_headers" json:"allow_headers,omitempty"` // A white list of HTTP headers that the browsers are allowed to // access. Serialized into Access-Control-Expose-Headers header. ExposeHeaders []string `protobuf:"bytes,4,rep,name=expose_headers" json:"expose_headers,omitempty"` // Specifies how long the the results of a preflight request can be // cached. Translates to the Access-Control-Max-Age header. MaxAge *Duration `protobuf:"bytes,5,opt,name=max_age" json:"max_age,omitempty"` // Indicates whether the caller is allowed to send the actual request // (not the preflight) using credentials. Translates to // Access-Control-Allow-Credentials header. AllowCredentials *BoolValue `protobuf:"bytes,6,opt,name=allow_credentials" json:"allow_credentials,omitempty"` }
Describes the Cross-Origin Resource Sharing (CORS) policy, for a given service. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS for further details about cross origin resource sharing. For example, the following rule restricts cross origin requests to those originating from example.com domain using HTTP POST/GET, and sets the Access-Control-Allow-Credentials header to false. In addition, it only exposes X-Foo-bar header and sets an expiry period of 1 day.
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: ratings-route spec: hosts: - ratings.prod.svc.cluster.local http: - route: - destination: host: ratings.prod.svc.cluster.local subset: v1 corsPolicy: allowOrigin: - example.com allowMethods: - POST - GET allowCredentials: false allowHeaders: - X-Foo-Bar maxAge: "1d"
func (*CorsPolicy) Descriptor ¶
func (*CorsPolicy) Descriptor() ([]byte, []int)
func (*CorsPolicy) GetAllowCredentials ¶
func (m *CorsPolicy) GetAllowCredentials() *BoolValue
func (*CorsPolicy) GetAllowHeaders ¶
func (m *CorsPolicy) GetAllowHeaders() []string
func (*CorsPolicy) GetAllowMethods ¶
func (m *CorsPolicy) GetAllowMethods() []string
func (*CorsPolicy) GetAllowOrigin ¶
func (m *CorsPolicy) GetAllowOrigin() []string
func (*CorsPolicy) GetExposeHeaders ¶
func (m *CorsPolicy) GetExposeHeaders() []string
func (*CorsPolicy) GetMaxAge ¶
func (m *CorsPolicy) GetMaxAge() *Duration
func (*CorsPolicy) ProtoMessage ¶
func (*CorsPolicy) ProtoMessage()
func (*CorsPolicy) Reset ¶
func (m *CorsPolicy) Reset()
func (*CorsPolicy) String ¶
func (m *CorsPolicy) String() string
type Destination ¶
type Destination struct { // REQUIRED. The name of a service from the service registry. Service // names are looked up from the platform's service registry (e.g., // Kubernetes services, Consul services, etc.) and from the hosts // declared by [ServiceEntry](#ServiceEntry). Traffic forwarded to // destinations that are not found in either of the two, will be dropped. // // *Note for Kubernetes users*: When short names are used (e.g. "reviews" // instead of "reviews.default.svc.cluster.local"), Istio will interpret // the short name based on the namespace of the rule, not the service. A // rule in the "default" namespace containing a host "reviews will be // interpreted as "reviews.default.svc.cluster.local", irrespective of // the actual namespace associated with the reviews service. _To avoid // potential misconfigurations, it is recommended to always use fully // qualified domain names over short names._ Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // The name of a subset within the service. Applicable only to services // within the mesh. The subset must be defined in a corresponding // DestinationRule. Subset string `protobuf:"bytes,2,opt,name=subset,proto3" json:"subset,omitempty"` // Specifies the port on the host that is being addressed. Many services // only expose a single port or label ports with the protocols they support, // in these cases it is not required to explicitly select the port. Note that // selection priority is to first match by name and then match by number. // // Names must comply with DNS label syntax (rfc1035) and therefore cannot // collide with numbers. If there are multiple ports on a service with // the same protocol the names should be of the form <protocol-name>-<DNS // label>. Port *PortSelector `protobuf:"bytes,3,opt,name=port" json:"port,omitempty"` }
Destination indicates the network addressable service to which the request/connection will be sent after processing a routing rule. The destination.host should unambiguously refer to a service in the service registry. Istio's service registry is composed of all the services found in the platform's service registry (e.g., Kubernetes services, Consul services), as well as services declared through the ServiceEntry(#ServiceEntry) resource.
*Note for Kubernetes users*: When short names are used (e.g. "reviews" instead of "reviews.default.svc.cluster.local"), Istio will interpret the short name based on the namespace of the rule, not the service. A rule in the "default" namespace containing a host "reviews will be interpreted as "reviews.default.svc.cluster.local", irrespective of the actual namespace associated with the reviews service. _To avoid potential misconfigurations, it is recommended to always use fully qualified domain names over short names._
The following Kubernetes example routes all traffic by default to pods of the reviews service with label "version: v1" (i.e., subset v1), and some to subset v2, in a kubernetes environment.
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: reviews-route namespace: foo spec: hosts: - reviews # interpreted as reviews.foo.svc.cluster.local http: - match: - uri: prefix: "/wpcatalog" - uri: prefix: "/consumercatalog" rewrite: uri: "/newcatalog" route: - destination: host: reviews # interpreted as reviews.foo.svc.cluster.local subset: v2 - route: - destination: host: reviews # interpreted as reviews.foo.svc.cluster.local subset: v1
And the associated DestinationRule
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: reviews-destination namespace: foo spec: host: reviews # interpreted as reviews.foo.svc.cluster.local subsets: - name: v1 labels: version: v1 - name: v2 labels: version: v2
The following VirtualService sets a timeout of 5s for all calls to productpage.prod.svc.cluster.local service in Kubernetes. Notice that there are no subsets defined in this rule. Istio will fetch all instances of productpage.prod.svc.cluster.local service from the service registry and populate the sidecar's load balancing pool. Also, notice that this rule is set in the dmesh namespace but uses the fully qualified domain name of the productpage service, productpage.prod.svc.cluster.local. Therefore the rule's namespace does not have an impact in resolving the name of the productpage service.
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: my-productpage-rule namespace: dmesh spec: hosts: - productpage.prod.svc.cluster.local # ignores rule namespace http: - timeout: 5s route: - destination: host: productpage.prod.svc.cluster.local
To control routing for traffic bound to services outside the mesh, external services must first be added to Istio's internal service registry using the ServiceEntry resource. VirtualServices can then be defined to control traffic bound to these external services. For example, the following rules define a Service for wikipedia.org and set a timeout of 5s for http requests.
apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata: name: external-svc-wikipedia spec: hosts: - wikipedia.org location: MESH_EXTERNAL ports: - number: 80 name: example-http protocol: HTTP resolution: DNS apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: my-wiki-rule spec: hosts: - wikipedia.org http: - timeout: 5s route: - destination: host: wikipedia.org
func (*Destination) Descriptor ¶
func (*Destination) Descriptor() ([]byte, []int)
func (*Destination) GetHost ¶
func (m *Destination) GetHost() string
func (*Destination) GetPort ¶
func (m *Destination) GetPort() *PortSelector
func (*Destination) GetSubset ¶
func (m *Destination) GetSubset() string
func (*Destination) ProtoMessage ¶
func (*Destination) ProtoMessage()
func (*Destination) Reset ¶
func (m *Destination) Reset()
func (*Destination) String ¶
func (m *Destination) String() string
type DestinationRule ¶
type DestinationRule struct { // REQUIRED. The name of a service from the service registry. Service // names are looked up from the platform's service registry (e.g., // Kubernetes services, Consul services, etc.) and from the hosts // declared by [ServiceEntries](#ServiceEntry). Rules defined for // services that do not exist in the service registry will be ignored. // // *Note for Kubernetes users*: When short names are used (e.g. "reviews" // instead of "reviews.default.svc.cluster.local"), Istio will interpret // the short name based on the namespace of the rule, not the service. A // rule in the "default" namespace containing a host "reviews will be // interpreted as "reviews.default.svc.cluster.local", irrespective of // the actual namespace associated with the reviews service. _To avoid // potential misconfigurations, it is recommended to always use fully // qualified domain names over short names._ // // Note that the host field applies to both HTTP and TCP services. Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // Traffic policies to apply (load balancing policy, connection pool // sizes, outlier detection). TrafficPolicy *TrafficPolicy `protobuf:"bytes,2,opt,name=traffic_policy" json:"traffic_policy,omitempty"` // One or more named sets that represent individual versions of a // service. Traffic policies can be overridden at subset level. Subsets []*Subset `protobuf:"bytes,3,rep,name=subsets" json:"subsets,omitempty"` }
`DestinationRule` defines policies that apply to traffic intended for a service after routing has occurred. These rules specify configuration for load balancing, connection pool size from the sidecar, and outlier detection settings to detect and evict unhealthy hosts from the load balancing pool. For example, a simple load balancing policy for the ratings service would look as follows:
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: bookinfo-ratings spec: host: ratings.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).
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: bookinfo-ratings spec: host: ratings.prod.svc.cluster.local trafficPolicy: loadBalancer: simple: LEAST_CONN subsets: - name: testversion labels: version: v3 trafficPolicy: loadBalancer: simple: ROUND_ROBIN
**Note:** Policies specified for subsets will not take effect until a route rule explicitly sends traffic to this subset.
Traffic policies can be customized to specific ports as well. The following rule uses the least connection load balancing policy for all traffic to port 80, while uses a round robin load balancing setting for traffic to the port 9080.
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: bookinfo-ratings-port spec: host: ratings.prod.svc.cluster.local trafficPolicy: # Apply to all ports portLevelSettings: - port: number: 80 loadBalancer: simple: LEAST_CONN - port: number: 9080 loadBalancer: simple: ROUND_ROBIN
func (*DestinationRule) Descriptor ¶
func (*DestinationRule) Descriptor() ([]byte, []int)
func (*DestinationRule) GetHost ¶
func (m *DestinationRule) GetHost() string
func (*DestinationRule) GetSubsets ¶
func (m *DestinationRule) GetSubsets() []*Subset
func (*DestinationRule) GetTrafficPolicy ¶
func (m *DestinationRule) GetTrafficPolicy() *TrafficPolicy
func (*DestinationRule) ProtoMessage ¶
func (*DestinationRule) ProtoMessage()
func (*DestinationRule) Reset ¶
func (m *DestinationRule) Reset()
func (*DestinationRule) String ¶
func (m *DestinationRule) String() string
type DestinationWeight ¶
type DestinationWeight struct { // REQUIRED. Destination uniquely identifies the instances of a service // to which the request/connection should be forwarded to. Destination *Destination `protobuf:"bytes,1,opt,name=destination" json:"destination,omitempty"` // REQUIRED. The proportion of traffic to be forwarded to the service // version. (0-100). Sum of weights across destinations SHOULD BE == 100. // If there is only destination in a rule, the weight value is assumed to // be 100. Weight int32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` }
Each routing rule is associated with one or more service versions (see glossary in beginning of document). Weights associated with the version determine the proportion of traffic it receives. For example, the following rule will route 25% of traffic for the "reviews" service to instances with the "v2" tag and the remaining traffic (i.e., 75%) to "v1".
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: reviews-route spec: hosts: - reviews.prod.svc.cluster.local http: - route: - destination: host: reviews.prod.svc.cluster.local subset: v2 weight: 25 - destination: host: reviews.prod.svc.cluster.local subset: v1 weight: 75
And the associated DestinationRule
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: reviews-destination spec: host: reviews.prod.svc.cluster.local subsets: - name: v1 labels: version: v1 - name: v2 labels: version: v2
Traffic can also be split across two entirely different services without having to define new subsets. For example, the following rule forwards 25% of traffic to reviews.com to dev.reviews.com
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: reviews-route-two-domains spec: hosts: - reviews.com http: - route: - destination: host: dev.reviews.com weight: 25 - destination: host: reviews.com weight: 75
func (*DestinationWeight) Descriptor ¶
func (*DestinationWeight) Descriptor() ([]byte, []int)
func (*DestinationWeight) GetDestination ¶
func (m *DestinationWeight) GetDestination() *Destination
func (*DestinationWeight) GetWeight ¶
func (m *DestinationWeight) GetWeight() int32
func (*DestinationWeight) ProtoMessage ¶
func (*DestinationWeight) ProtoMessage()
func (*DestinationWeight) Reset ¶
func (m *DestinationWeight) Reset()
func (*DestinationWeight) String ¶
func (m *DestinationWeight) String() string
type DiscoveryRequest ¶
type DiscoveryRequest struct { // The version_info provided in the request messages will be the version_info // received with the most recent successfully processed response or empty on // the first request. It is expected that no new request is sent after a // response is received until the Envoy instance is ready to ACK/NACK the new // configuration. ACK/NACK takes place by returning the new API config version // as applied or the previous API config version respectively. Each type_url // (see below) has an independent version associated with it. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,proto3" json:"version_info,omitempty"` // The node making the request. Node *Node `protobuf:"bytes,2,opt,name=node" json:"node,omitempty"` // List of resources to subscribe to, e.g. list of cluster names or a route // configuration name. If this is empty, all resources for the API are // returned. LDS/CDS expect empty resource_names, since this is global // discovery for the Envoy instance. The LDS and CDS responses will then imply // a number of resources that need to be fetched via EDS/RDS, which will be // explicitly enumerated in resource_names. ResourceNames []string `protobuf:"bytes,3,rep,name=resource_names" json:"resource_names,omitempty"` // Type of the resource that is being requested, e.g. // "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This is implicit // in requests made via singleton xDS APIs such as CDS, LDS, etc. but is // required for ADS. TypeUrl string `protobuf:"bytes,4,opt,name=type_url,proto3" json:"type_url,omitempty"` // nonce corresponding to DiscoveryResponse being ACK/NACKed. See above // discussion on version_info and the DiscoveryResponse nonce comment. This // may be empty if no nonce is available, e.g. at startup or for non-stream // xDS implementations. ResponseNonce string `protobuf:"bytes,5,opt,name=response_nonce,proto3" json:"response_nonce,omitempty"` // This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>` // failed to update configuration. The *message* field in *error_details* provides the Envoy // internal exception related to the failure. It is only intended for consumption during manual // debugging, the string provided is not guaranteed to be stable across Envoy versions. // google.rpc.Status ErrorDetail *Status `protobuf:"bytes,6,opt,name=error_detail" json:"error_detail,omitempty"` }
A DiscoveryRequest requests a set of versioned resources of the same type for a given Envoy node on some API.
func (*DiscoveryRequest) Descriptor ¶
func (*DiscoveryRequest) Descriptor() ([]byte, []int)
func (*DiscoveryRequest) GetErrorDetail ¶
func (m *DiscoveryRequest) GetErrorDetail() *Status
func (*DiscoveryRequest) GetNode ¶
func (m *DiscoveryRequest) GetNode() *Node
func (*DiscoveryRequest) GetResourceNames ¶
func (m *DiscoveryRequest) GetResourceNames() []string
func (*DiscoveryRequest) GetResponseNonce ¶
func (m *DiscoveryRequest) GetResponseNonce() string
func (*DiscoveryRequest) GetTypeUrl ¶
func (m *DiscoveryRequest) GetTypeUrl() string
func (*DiscoveryRequest) GetVersionInfo ¶
func (m *DiscoveryRequest) GetVersionInfo() string
func (*DiscoveryRequest) ProtoMessage ¶
func (*DiscoveryRequest) ProtoMessage()
func (*DiscoveryRequest) Reset ¶
func (m *DiscoveryRequest) Reset()
func (*DiscoveryRequest) String ¶
func (m *DiscoveryRequest) String() string
type DiscoveryResponse ¶
type DiscoveryResponse struct { // The version of the response data. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,proto3" json:"version_info,omitempty"` // The response resources. These resources are typed and depend on the API being called. // google.protobuf.Any Resources []*Any `protobuf:"bytes,2,rep,name=resources" json:"resources,omitempty"` // [#not-implemented-hide:] // Canary is used to support two Envoy command line flags: // // * --terminate-on-canary-transition-failure. When set, Envoy is able to // terminate if it detects that configuration is stuck at canary. Consider // this example sequence of updates: // - Management server applies a canary config successfully. // - Management server rolls back to a production config. // - Envoy rejects the new production config. // Since there is no sensible way to continue receiving configuration // updates, Envoy will then terminate and apply production config from a // clean slate. // * --dry-run-canary. When set, a canary response will never be applied, only // validated via a dry run. Canary bool `protobuf:"varint,3,opt,name=canary,proto3" json:"canary,omitempty"` // Type URL for resources. This must be consistent with the type_url in the // Any messages for resources if resources is non-empty. This effectively // identifies the xDS API when muxing over ADS. TypeUrl string `protobuf:"bytes,4,opt,name=type_url,proto3" json:"type_url,omitempty"` // For gRPC based subscriptions, the nonce provides a way to explicitly ack a // specific DiscoveryResponse in a following DiscoveryRequest. Additional // messages may have been sent by Envoy to the management server for the // previous version on the stream prior to this DiscoveryResponse, that were // unprocessed at response send time. The nonce allows the management server // to ignore any further DiscoveryRequests for the previous version until a // DiscoveryRequest bearing the nonce. The nonce is optional and is not // required for non-stream based xDS implementations. Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` }
func (*DiscoveryResponse) Descriptor ¶
func (*DiscoveryResponse) Descriptor() ([]byte, []int)
func (*DiscoveryResponse) GetCanary ¶
func (m *DiscoveryResponse) GetCanary() bool
func (*DiscoveryResponse) GetNonce ¶
func (m *DiscoveryResponse) GetNonce() string
func (*DiscoveryResponse) GetResources ¶
func (m *DiscoveryResponse) GetResources() []*Any
func (*DiscoveryResponse) GetTypeUrl ¶
func (m *DiscoveryResponse) GetTypeUrl() string
func (*DiscoveryResponse) GetVersionInfo ¶
func (m *DiscoveryResponse) GetVersionInfo() string
func (*DiscoveryResponse) ProtoMessage ¶
func (*DiscoveryResponse) ProtoMessage()
func (*DiscoveryResponse) Reset ¶
func (m *DiscoveryResponse) Reset()
func (*DiscoveryResponse) String ¶
func (m *DiscoveryResponse) String() string
type Duration ¶
type Duration struct { // Signed seconds of the span of time. Must be from -315,576,000,000 // to +315,576,000,000 inclusive. Note: these bounds are computed from: // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` // Signed fractions of a second at nanosecond resolution of the span // of time. Durations less than one second are represented with a 0 // `seconds` field and a positive or negative `nanos` field. For durations // of one second or more, a non-zero value for the `nanos` field must be // of the same sign as the `seconds` field. Must be from -999,999,999 // to +999,999,999 inclusive. Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` }
A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years.
Examples ¶
Example 1: Compute Duration from two Timestamps in pseudo code.
Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; }
Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; }
Example 3: Compute Duration from datetime.timedelta in Python.
td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td)
JSON Mapping ¶
In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s".
func (*Duration) Descriptor ¶
func (*Duration) GetSeconds ¶
func (*Duration) ProtoMessage ¶
func (*Duration) ProtoMessage()
type Endpoint ¶
type Endpoint struct {
Address *Address `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
}
Upstream host identifier.
func (*Endpoint) Descriptor ¶
func (*Endpoint) GetAddress ¶
func (*Endpoint) ProtoMessage ¶
func (*Endpoint) ProtoMessage()
type Gateway ¶
type Gateway struct { // REQUIRED: A list of server specifications. Servers []*Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"` // One or more labels that indicate a specific set of pods/VMs // on which this gateway configuration should be applied. Selector map[string]string `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
`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), and port 2379 (TCP) for ingress. The gateway will be applied to the proxy running on a pod with labels `app: my-gateway-controller`. While Istio will configure the proxy to listen on these ports, it is the responsibility of the user to ensure that external traffic to these ports are allowed into the mesh.
apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: my-gateway spec: selector: app: my-gatweway-controller servers: - port: number: 80 name: http protocol: HTTP hosts: - uk.bookinfo.com - eu.bookinfo.com tls: httpsRedirect: true # sends 302 redirect for http requests - port: number: 443 name: https protocol: HTTPS hosts: - uk.bookinfo.com - eu.bookinfo.com tls: mode: SIMPLE #enables HTTPS on this port serverCertificate: /etc/certs/servercert.pem privateKey: /etc/certs/privatekey.pem - port: number: 9080 name: http-wildcard protocol: HTTP # no hosts implies wildcard match - port: number: 2379 #to expose internal service via external port 2379 name: mongo protocol: MONGO
The Gateway specification above describes the L4-L6 properties of a load balancer. A `VirtualService` can then be bound to a gateway to control the forwarding of traffic arriving at a particular host or gateway port.
For example, the following VirtualService splits traffic for "https://uk.bookinfo.com/reviews", "https://eu.bookinfo.com/reviews", "http://uk.bookinfo.com:9080/reviews", "http://eu.bookinfo.com:9080/reviews" into two versions (prod and qa) of an internal reviews service on port 9080. In addition, requests containing the cookie "user: dev-123" will be sent to special port 7777 in the qa version. The same rule is also applicable inside the mesh for requests to the r"eviews.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).
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: bookinfo-rule spec: hosts: - reviews.prod.svc.cluster.local - uk.bookinfo.com - eu.bookinfo.com gateways: - my-gateway - mesh # applies to all the sidecars in the mesh http: - match: - headers: cookie: user: dev-123 route: - destination: port: number: 7777 name: reviews.qa.svc.cluster.local - match: uri: prefix: /reviews/ route: - destination: port: number: 9080 # can be omitted if its the only port for reviews name: reviews.prod.svc.cluster.local weight: 80 - destination: name: reviews.qa.svc.cluster.local weight: 20
The following VirtualService forwards traffic arriving at (external) port 27017 from "172.17.16.0/24" subnet to internal Mongo server on port 5555. This rule is not applicable internally in the mesh as the gateway list omits the reserved name `mesh`.
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: bookinfo-Mongo spec: hosts: - mongosvr.prod.svc.cluster.local #name of internal Mongo service gateways: - my-gateway tcp: - match: - port: number: 27017 sourceSubnet: "172.17.16.0/24" route: - destination: name: mongo.prod.svc.cluster.local
func (*Gateway) Descriptor
deprecated
func (*Gateway) GetSelector ¶
func (*Gateway) GetServers ¶
func (*Gateway) ProtoMessage ¶
func (*Gateway) ProtoMessage()
func (*Gateway) ProtoReflect ¶
func (x *Gateway) ProtoReflect() protoreflect.Message
type HTTPFaultInjection ¶
type HTTPFaultInjection struct { // Delay requests before forwarding, emulating various failures such as // network issues, overloaded upstream service, etc. Delay *HTTPFaultInjection_Delay `protobuf:"bytes,1,opt,name=delay" json:"delay,omitempty"` // Abort Http request attempts and return error codes back to downstream // service, giving the impression that the upstream service is faulty. Abort *HTTPFaultInjection_Abort `protobuf:"bytes,2,opt,name=abort" json:"abort,omitempty"` }
HTTPFaultInjection can be used to specify one or more faults to inject while forwarding http requests to the destination specified in a route. Fault specification is part of a VirtualService rule. Faults include aborting the Http request from downstream service, and/or delaying proxying of requests. A fault rule MUST HAVE delay or abort or both.
*Note:* Delay and abort faults are independent of one another, even if both are specified simultaneously.
func (*HTTPFaultInjection) Descriptor ¶
func (*HTTPFaultInjection) Descriptor() ([]byte, []int)
func (*HTTPFaultInjection) GetAbort ¶
func (m *HTTPFaultInjection) GetAbort() *HTTPFaultInjection_Abort
func (*HTTPFaultInjection) GetDelay ¶
func (m *HTTPFaultInjection) GetDelay() *HTTPFaultInjection_Delay
func (*HTTPFaultInjection) ProtoMessage ¶
func (*HTTPFaultInjection) ProtoMessage()
func (*HTTPFaultInjection) Reset ¶
func (m *HTTPFaultInjection) Reset()
func (*HTTPFaultInjection) String ¶
func (m *HTTPFaultInjection) String() string
type HTTPFaultInjection_Abort ¶
type HTTPFaultInjection_Abort struct { // Percentage of requests to be aborted with the error code provided (0-100). Percent int32 `protobuf:"varint,1,opt,name=percent,proto3" json:"percent,omitempty"` // Types that are valid to be assigned to ErrorType: // *HTTPFaultInjection_Abort_HttpStatus // *HTTPFaultInjection_Abort_GrpcStatus // *HTTPFaultInjection_Abort_Http2Error ErrorType isHTTPFaultInjection_Abort_ErrorType `protobuf_oneof:"error_type"` }
Abort specification is used to prematurely abort a request with a pre-specified error code. The following example will return an HTTP 400 error code for 10% of the requests to the "ratings" service "v1".
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: ratings-route spec: hosts: - ratings.prod.svc.cluster.local http: - route: - destination: host: ratings.prod.svc.cluster.local subset: v1 fault: abort: percent: 10 httpStatus: 400
The _httpStatus_ field is used to indicate the HTTP status code to return to the caller. The optional _percent_ field, a value between 0 and 100, is used to only abort a certain percentage of requests. If not specified, all requests are aborted.
func (*HTTPFaultInjection_Abort) Descriptor ¶
func (*HTTPFaultInjection_Abort) Descriptor() ([]byte, []int)
func (*HTTPFaultInjection_Abort) GetErrorType ¶
func (m *HTTPFaultInjection_Abort) GetErrorType() isHTTPFaultInjection_Abort_ErrorType
func (*HTTPFaultInjection_Abort) GetGrpcStatus ¶
func (m *HTTPFaultInjection_Abort) GetGrpcStatus() string
func (*HTTPFaultInjection_Abort) GetHttp2Error ¶
func (m *HTTPFaultInjection_Abort) GetHttp2Error() string
func (*HTTPFaultInjection_Abort) GetHttpStatus ¶
func (m *HTTPFaultInjection_Abort) GetHttpStatus() int32
func (*HTTPFaultInjection_Abort) GetPercent ¶
func (m *HTTPFaultInjection_Abort) GetPercent() int32
func (*HTTPFaultInjection_Abort) ProtoMessage ¶
func (*HTTPFaultInjection_Abort) ProtoMessage()
func (*HTTPFaultInjection_Abort) Reset ¶
func (m *HTTPFaultInjection_Abort) Reset()
func (*HTTPFaultInjection_Abort) String ¶
func (m *HTTPFaultInjection_Abort) String() string
func (*HTTPFaultInjection_Abort) XXX_OneofFuncs ¶
func (*HTTPFaultInjection_Abort) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type HTTPFaultInjection_Abort_GrpcStatus ¶
type HTTPFaultInjection_Abort_GrpcStatus struct {
GrpcStatus string `protobuf:"bytes,3,opt,name=grpc_status,proto3,oneof"`
}
type HTTPFaultInjection_Abort_Http2Error ¶
type HTTPFaultInjection_Abort_Http2Error struct {
Http2Error string `protobuf:"bytes,4,opt,name=http2_error,proto3,oneof"`
}
type HTTPFaultInjection_Abort_HttpStatus ¶
type HTTPFaultInjection_Abort_HttpStatus struct {
HttpStatus int32 `protobuf:"varint,2,opt,name=http_status,proto3,oneof"`
}
type HTTPFaultInjection_Delay ¶
type HTTPFaultInjection_Delay struct { // Percentage of requests on which the delay will be injected (0-100). Percent int32 `protobuf:"varint,1,opt,name=percent,proto3" json:"percent,omitempty"` // Types that are valid to be assigned to HttpDelayType: // *HTTPFaultInjection_Delay_FixedDelay // *HTTPFaultInjection_Delay_ExponentialDelay HttpDelayType isHTTPFaultInjection_Delay_HttpDelayType `protobuf_oneof:"http_delay_type"` }
Delay specification is used to inject latency into the request forwarding path. The following example will introduce a 5 second delay in 10% of the requests to the "v1" version of the "reviews" service from all pods with label env: prod
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: reviews-route spec: hosts: - reviews.prod.svc.cluster.local http: - match: - sourceLabels: env: prod route: - destination: host: reviews.prod.svc.cluster.local subset: v1 fault: delay: percent: 10 fixedDelay: 5s
The _fixedDelay_ field is used to indicate the amount of delay in seconds. An optional _percent_ field, a value between 0 and 100, can be used to only delay a certain percentage of requests. If left unspecified, all request will be delayed.
func (*HTTPFaultInjection_Delay) Descriptor ¶
func (*HTTPFaultInjection_Delay) Descriptor() ([]byte, []int)
func (*HTTPFaultInjection_Delay) GetExponentialDelay ¶
func (m *HTTPFaultInjection_Delay) GetExponentialDelay() *Duration
func (*HTTPFaultInjection_Delay) GetFixedDelay ¶
func (m *HTTPFaultInjection_Delay) GetFixedDelay() *Duration
func (*HTTPFaultInjection_Delay) GetHttpDelayType ¶
func (m *HTTPFaultInjection_Delay) GetHttpDelayType() isHTTPFaultInjection_Delay_HttpDelayType
func (*HTTPFaultInjection_Delay) GetPercent ¶
func (m *HTTPFaultInjection_Delay) GetPercent() int32
func (*HTTPFaultInjection_Delay) ProtoMessage ¶
func (*HTTPFaultInjection_Delay) ProtoMessage()
func (*HTTPFaultInjection_Delay) Reset ¶
func (m *HTTPFaultInjection_Delay) Reset()
func (*HTTPFaultInjection_Delay) String ¶
func (m *HTTPFaultInjection_Delay) String() string
func (*HTTPFaultInjection_Delay) XXX_OneofFuncs ¶
func (*HTTPFaultInjection_Delay) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type HTTPFaultInjection_Delay_ExponentialDelay ¶
type HTTPFaultInjection_Delay_ExponentialDelay struct {
ExponentialDelay *Duration `protobuf:"bytes,3,opt,name=exponential_delay,oneof"`
}
type HTTPFaultInjection_Delay_FixedDelay ¶
type HTTPFaultInjection_Delay_FixedDelay struct {
FixedDelay *Duration `protobuf:"bytes,2,opt,name=fixed_delay,oneof"`
}
type HTTPMatchRequest ¶
type HTTPMatchRequest struct { // URI to match // values are case-sensitive and formatted as follows: // // - `exact: "value"` for exact string match // // - `prefix: "value"` for prefix-based match // // - `regex: "value"` for ECMAscript style regex-based match // Uri *StringMatch `protobuf:"bytes,1,opt,name=uri" json:"uri,omitempty"` // URI Scheme // values are case-sensitive and formatted as follows: // // - `exact: "value"` for exact string match // // - `prefix: "value"` for prefix-based match // // - `regex: "value"` for ECMAscript style regex-based match // Scheme *StringMatch `protobuf:"bytes,2,opt,name=scheme" json:"scheme,omitempty"` // HTTP Method // values are case-sensitive and formatted as follows: // // - `exact: "value"` for exact string match // // - `prefix: "value"` for prefix-based match // // - `regex: "value"` for ECMAscript style regex-based match // Method *StringMatch `protobuf:"bytes,3,opt,name=method" json:"method,omitempty"` // HTTP Authority // values are case-sensitive and formatted as follows: // // - `exact: "value"` for exact string match // // - `prefix: "value"` for prefix-based match // // - `regex: "value"` for ECMAscript style regex-based match // Authority *StringMatch `protobuf:"bytes,4,opt,name=authority" json:"authority,omitempty"` // The header keys must be lowercase and use hyphen as the separator, // e.g. _x-request-id_. // // Header values are case-sensitive and formatted as follows: // // - `exact: "value"` for exact string match // // - `prefix: "value"` for prefix-based match // // - `regex: "value"` for ECMAscript style regex-based match // // **Note:** The keys `uri`, `scheme`, `method`, and `authority` will be ignored. Headers map[string]*StringMatch `` /* 141-byte string literal not displayed */ // Specifies the ports on the host that is being addressed. Many services // only expose a single port or label ports with the protocols they support, // in these cases it is not required to explicitly select the port. Port uint32 `protobuf:"varint,6,opt,name=port,proto3" json:"port,omitempty"` // One or more labels that constrain the applicability of a rule to // workloads with the given labels. If the VirtualService has a list of // gateways specified at the top, it should include the reserved gateway // `mesh` in order for this field to be applicable. SourceLabels map[string]string `` /* 160-byte string literal not displayed */ // Names of gateways where the rule should be applied to. Gateway names // at the top of the VirtualService (if any) are overridden. The gateway match is // independent of sourceLabels. Gateways []string `protobuf:"bytes,8,rep,name=gateways" json:"gateways,omitempty"` }
HttpMatchRequest specifies a set of criterion to be met in order for the rule to be applied to the HTTP request. For example, the following restricts the rule to match only requests where the URL path starts with /ratings/v2/ and the request contains a `cookie` with value `user=jason`.
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: ratings-route spec: hosts: - ratings.prod.svc.cluster.local http: - match: - headers: cookie: regex: "^(.*?;)?(user=jason)(;.*)?" uri: prefix: "/ratings/v2/" route: - destination: host: ratings.prod.svc.cluster.local
HTTPMatchRequest CANNOT be empty.
func (*HTTPMatchRequest) Descriptor ¶
func (*HTTPMatchRequest) Descriptor() ([]byte, []int)
func (*HTTPMatchRequest) GetAuthority ¶
func (m *HTTPMatchRequest) GetAuthority() *StringMatch
func (*HTTPMatchRequest) GetGateways ¶
func (m *HTTPMatchRequest) GetGateways() []string
func (*HTTPMatchRequest) GetHeaders ¶
func (m *HTTPMatchRequest) GetHeaders() map[string]*StringMatch
func (*HTTPMatchRequest) GetMethod ¶
func (m *HTTPMatchRequest) GetMethod() *StringMatch
func (*HTTPMatchRequest) GetPort ¶
func (m *HTTPMatchRequest) GetPort() uint32
func (*HTTPMatchRequest) GetScheme ¶
func (m *HTTPMatchRequest) GetScheme() *StringMatch
func (*HTTPMatchRequest) GetSourceLabels ¶
func (m *HTTPMatchRequest) GetSourceLabels() map[string]string
func (*HTTPMatchRequest) GetUri ¶
func (m *HTTPMatchRequest) GetUri() *StringMatch
func (*HTTPMatchRequest) ProtoMessage ¶
func (*HTTPMatchRequest) ProtoMessage()
func (*HTTPMatchRequest) Reset ¶
func (m *HTTPMatchRequest) Reset()
func (*HTTPMatchRequest) String ¶
func (m *HTTPMatchRequest) String() string
type HTTPRedirect ¶
type HTTPRedirect struct { // On a redirect, overwrite the Path portion of the URL with this // value. Note that the entire path will be replaced, irrespective of the // request URI being matched as an exact path or prefix. Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` // On a redirect, overwrite the Authority/Host portion of the URL with // this value. Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` }
HTTPRedirect can be used to send a 302 redirect response to the caller, where the Authority/Host and the URI in the response can be swapped with the specified values. For example, the following rule redirects requests for /v1/getProductRatings API on the ratings service to /v1/bookRatings provided by the bookratings service.
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: ratings-route spec: hosts: - ratings.prod.svc.cluster.local http: - match: - uri: exact: /v1/getProductRatings redirect: uri: /v1/bookRatings authority: newratings.default.svc.cluster.local ...
func (*HTTPRedirect) Descriptor ¶
func (*HTTPRedirect) Descriptor() ([]byte, []int)
func (*HTTPRedirect) GetAuthority ¶
func (m *HTTPRedirect) GetAuthority() string
func (*HTTPRedirect) GetUri ¶
func (m *HTTPRedirect) GetUri() string
func (*HTTPRedirect) ProtoMessage ¶
func (*HTTPRedirect) ProtoMessage()
func (*HTTPRedirect) Reset ¶
func (m *HTTPRedirect) Reset()
func (*HTTPRedirect) String ¶
func (m *HTTPRedirect) String() string
type HTTPRetry ¶
type HTTPRetry struct { // REQUIRED. Number of retries for a given request. The interval // between retries will be determined automatically (25ms+). Actual // number of retries attempted depends on the httpReqTimeout. Attempts int32 `protobuf:"varint,1,opt,name=attempts,proto3" json:"attempts,omitempty"` // Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms. PerTryTimeout *Duration `protobuf:"bytes,2,opt,name=per_try_timeout" json:"per_try_timeout,omitempty"` }
Describes the retry policy to use when a HTTP request fails. For example, the following rule sets the maximum number of retries to 3 when calling ratings:v1 service, with a 2s timeout per retry attempt.
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: ratings-route spec: hosts: - ratings.prod.svc.cluster.local http: - route: - destination: host: ratings.prod.svc.cluster.local subset: v1 retries: attempts: 3 perTryTimeout: 2s
func (*HTTPRetry) Descriptor ¶
func (*HTTPRetry) GetAttempts ¶
func (*HTTPRetry) GetPerTryTimeout ¶
func (*HTTPRetry) ProtoMessage ¶
func (*HTTPRetry) ProtoMessage()
type HTTPRewrite ¶
type HTTPRewrite struct { // rewrite the path (or the prefix) portion of the URI with this // value. If the original URI was matched based on prefix, the value // provided in this field will replace the corresponding matched prefix. Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` // rewrite the Authority/Host header with this value. Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` }
HTTPRewrite can be used to rewrite specific parts of a HTTP request before forwarding the request to the destination. Rewrite primitive can be used only with the DestinationWeights. The following example demonstrates how to rewrite the URL prefix for api call (/ratings) to ratings service before making the actual API call.
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: ratings-route spec: hosts: - ratings.prod.svc.cluster.local http: - match: - uri: prefix: /ratings rewrite: uri: /v1/bookRatings route: - destination: host: ratings.prod.svc.cluster.local subset: v1
func (*HTTPRewrite) Descriptor ¶
func (*HTTPRewrite) Descriptor() ([]byte, []int)
func (*HTTPRewrite) GetAuthority ¶
func (m *HTTPRewrite) GetAuthority() string
func (*HTTPRewrite) GetUri ¶
func (m *HTTPRewrite) GetUri() string
func (*HTTPRewrite) ProtoMessage ¶
func (*HTTPRewrite) ProtoMessage()
func (*HTTPRewrite) Reset ¶
func (m *HTTPRewrite) Reset()
func (*HTTPRewrite) String ¶
func (m *HTTPRewrite) String() string
type HTTPRoute ¶
type HTTPRoute struct { // Match conditions to be satisfied for the rule to be // activated. All conditions inside a single match block have AND // semantics, while the list of match blocks have OR semantics. The rule // is matched if any one of the match blocks succeed. Match []*HTTPMatchRequest `protobuf:"bytes,1,rep,name=match" json:"match,omitempty"` // A http rule can either redirect or forward (default) traffic. The // forwarding target can be one of several versions of a service (see // glossary in beginning of document). Weights associated with the // service version determine the proportion of traffic it receives. Route []*DestinationWeight `protobuf:"bytes,2,rep,name=route" json:"route,omitempty"` // A http rule can either redirect or forward (default) traffic. If // traffic passthrough option is specified in the rule, // route/redirect will be ignored. The redirect primitive can be used to // send a HTTP 302 redirect to a different URI or Authority. Redirect *HTTPRedirect `protobuf:"bytes,3,opt,name=redirect" json:"redirect,omitempty"` // Rewrite HTTP URIs and Authority headers. Rewrite cannot be used with // Redirect primitive. Rewrite will be performed before forwarding. Rewrite *HTTPRewrite `protobuf:"bytes,4,opt,name=rewrite" json:"rewrite,omitempty"` // Indicates that a HTTP/1.1 client connection to this particular route // should be allowed (and expected) to upgrade to a WebSocket connection. // The default is false. Istio's reference sidecar implementation (Envoy) // expects the first request to this route to contain the WebSocket // upgrade headers. Otherwise, the request will be rejected. Note that // Websocket allows secondary protocol negotiation which may then be // subject to further routing rules based on the protocol selected. WebsocketUpgrade bool `protobuf:"varint,5,opt,name=websocket_upgrade,proto3" json:"websocket_upgrade,omitempty"` // Timeout for HTTP requests. Timeout *Duration `protobuf:"bytes,6,opt,name=timeout" json:"timeout,omitempty"` // Retry policy for HTTP requests. Retries *HTTPRetry `protobuf:"bytes,7,opt,name=retries" json:"retries,omitempty"` // Fault injection policy to apply on HTTP traffic. Fault *HTTPFaultInjection `protobuf:"bytes,8,opt,name=fault" json:"fault,omitempty"` // Mirror HTTP traffic to a another destination in addition to forwarding // the requests to the intended destination. Mirrored traffic is on a // best effort basis where the sidecar/gateway will not wait for the // mirrored cluster to respond before returning the response from the // original destination. Statistics will be generated for the mirrored // destination. Mirror *Destination `protobuf:"bytes,9,opt,name=mirror" json:"mirror,omitempty"` // Cross-Origin Resource Sharing policy (CORS). Refer to // https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS // for further details about cross origin resource sharing. CorsPolicy *CorsPolicy `protobuf:"bytes,10,opt,name=cors_policy" json:"cors_policy,omitempty"` // Additional HTTP headers to add before forwarding a request to the // destination service. AppendHeaders map[string]string `` /* 163-byte string literal not displayed */ }
Describes match conditions and actions for routing HTTP/1.1, HTTP2, and gRPC traffic. See VirtualService for usage examples.
func (*HTTPRoute) Descriptor ¶
func (*HTTPRoute) GetAppendHeaders ¶
func (*HTTPRoute) GetCorsPolicy ¶
func (m *HTTPRoute) GetCorsPolicy() *CorsPolicy
func (*HTTPRoute) GetFault ¶
func (m *HTTPRoute) GetFault() *HTTPFaultInjection
func (*HTTPRoute) GetMatch ¶
func (m *HTTPRoute) GetMatch() []*HTTPMatchRequest
func (*HTTPRoute) GetMirror ¶
func (m *HTTPRoute) GetMirror() *Destination
func (*HTTPRoute) GetRedirect ¶
func (m *HTTPRoute) GetRedirect() *HTTPRedirect
func (*HTTPRoute) GetRetries ¶
func (*HTTPRoute) GetRewrite ¶
func (m *HTTPRoute) GetRewrite() *HTTPRewrite
func (*HTTPRoute) GetRoute ¶
func (m *HTTPRoute) GetRoute() []*DestinationWeight
func (*HTTPRoute) GetTimeout ¶
func (*HTTPRoute) GetWebsocketUpgrade ¶
func (*HTTPRoute) ProtoMessage ¶
func (*HTTPRoute) ProtoMessage()
type L4MatchAttributes ¶
type L4MatchAttributes struct { // IPv4 or IPv6 ip address of destination with optional subnet. E.g., // a.b.c.d/xx form or just a.b.c.d. This is only valid when the // destination service has several IPs and the application explicitly // specifies a particular IP. DestinationSubnet string `protobuf:"bytes,1,opt,name=destination_subnet,proto3" json:"destination_subnet,omitempty"` // Specifies the port on the host that is being addressed. Many services // only expose a single port or label ports with the protocols they support, // in these cases it is not required to explicitly select the port. Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` // IPv4 or IPv6 ip address of source with optional subnet. E.g., a.b.c.d/xx // form or just a.b.c.d SourceSubnet string `protobuf:"bytes,3,opt,name=source_subnet,proto3" json:"source_subnet,omitempty"` // One or more labels that constrain the applicability of a rule to // workloads with the given labels. If the VirtualService has a list of // gateways specified at the top, it should include the reserved gateway // `mesh` in order for this field to be applicable. SourceLabels map[string]string `` /* 160-byte string literal not displayed */ // Names of gateways where the rule should be applied to. Gateway names // at the top of the VirtualService (if any) are overridden. The gateway match is // independent of sourceLabels. Gateways []string `protobuf:"bytes,5,rep,name=gateways" json:"gateways,omitempty"` }
L4 connection match attributes. Note that L4 connection matching support is incomplete.
func (*L4MatchAttributes) Descriptor ¶
func (*L4MatchAttributes) Descriptor() ([]byte, []int)
func (*L4MatchAttributes) GetDestinationSubnet ¶
func (m *L4MatchAttributes) GetDestinationSubnet() string
func (*L4MatchAttributes) GetGateways ¶
func (m *L4MatchAttributes) GetGateways() []string
func (*L4MatchAttributes) GetPort ¶
func (m *L4MatchAttributes) GetPort() uint32
func (*L4MatchAttributes) GetSourceLabels ¶
func (m *L4MatchAttributes) GetSourceLabels() map[string]string
func (*L4MatchAttributes) GetSourceSubnet ¶
func (m *L4MatchAttributes) GetSourceSubnet() string
func (*L4MatchAttributes) ProtoMessage ¶
func (*L4MatchAttributes) ProtoMessage()
func (*L4MatchAttributes) Reset ¶
func (m *L4MatchAttributes) Reset()
func (*L4MatchAttributes) String ¶
func (m *L4MatchAttributes) String() string
type LbEndpoint ¶
type LbEndpoint struct { // Upstream host identifier Endpoint *Endpoint `protobuf:"bytes,1,opt,name=endpoint" json:"endpoint,omitempty"` // The endpoint metadata specifies values that may be used by the load // balancer to select endpoints in a cluster for a given request. The filter // name should be specified as *envoy.lb*. An example boolean key-value pair // is *canary*, providing the optional canary status of the upstream host. // This may be matched against in a route's ForwardAction metadata_match field // to subset the endpoints considered in cluster load balancing. Metadata *Metadata `protobuf:"bytes,3,opt,name=metadata" json:"metadata,omitempty"` // The optional load balancing weight of the upstream host, in the range 1 - // 128. Envoy uses the load balancing weight in some of the built in load // balancers. The load balancing weight for an endpoint is divided by the sum // of the weights of all endpoints in the endpoint's locality to produce a // percentage of traffic for the endpoint. This percentage is then further // weighted by the endpoint's locality's load balancing weight from // LocalityLbEndpoints. If unspecified, each host is presumed to have equal // weight in a locality. // // .. attention:: // // The limit of 128 is somewhat arbitrary, but is applied due to performance // concerns with the current implementation and can be removed when // `this issue <https://github.com/envoyproxy/envoy/issues/1285>`_ is fixed. LoadBalancingWeight *UInt32Value `protobuf:"bytes,4,opt,name=load_balancing_weight" json:"load_balancing_weight,omitempty"` }
An Endpoint that Envoy can route traffic to.
func (*LbEndpoint) Descriptor ¶
func (*LbEndpoint) Descriptor() ([]byte, []int)
func (*LbEndpoint) GetEndpoint ¶
func (m *LbEndpoint) GetEndpoint() *Endpoint
func (*LbEndpoint) GetLoadBalancingWeight ¶
func (m *LbEndpoint) GetLoadBalancingWeight() *UInt32Value
func (*LbEndpoint) GetMetadata ¶
func (m *LbEndpoint) GetMetadata() *Metadata
func (*LbEndpoint) ProtoMessage ¶
func (*LbEndpoint) ProtoMessage()
func (*LbEndpoint) Reset ¶
func (m *LbEndpoint) Reset()
func (*LbEndpoint) String ¶
func (m *LbEndpoint) String() string
type ListValue ¶
type ListValue struct { // Repeated field of dynamically typed values. Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"` }
`ListValue` is a wrapper around a repeated field of values.
The JSON representation for `ListValue` is JSON array.
func (*ListValue) Descriptor ¶
func (*ListValue) ProtoMessage ¶
func (*ListValue) ProtoMessage()
type LoadBalancerSettings ¶
type LoadBalancerSettings struct { // Upstream load balancing policy. // // Types that are valid to be assigned to LbPolicy: // *LoadBalancerSettings_Simple // *LoadBalancerSettings_ConsistentHash LbPolicy isLoadBalancerSettings_LbPolicy `protobuf_oneof:"lb_policy"` }
Load balancing policies to apply for a specific destination. See Envoy's load balancing [documentation](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/load_balancing.html) for more details.
For example, the following rule uses a round robin load balancing policy for all traffic going to the ratings service.
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: bookinfo-ratings spec: host: ratings.prod.svc.cluster.local trafficPolicy: loadBalancer: simple: ROUND_ROBIN
The following example uses the consistent hashing based load balancer for the same ratings service using the Cookie header as the hash key.
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: bookinfo-ratings spec: host: ratings.prod.svc.cluster.local trafficPolicy: loadBalancer: consistentHash: http_header: Cookie
func (*LoadBalancerSettings) Descriptor ¶
func (*LoadBalancerSettings) Descriptor() ([]byte, []int)
func (*LoadBalancerSettings) GetConsistentHash ¶
func (m *LoadBalancerSettings) GetConsistentHash() *LoadBalancerSettings_ConsistentHashLB
func (*LoadBalancerSettings) GetLbPolicy ¶
func (m *LoadBalancerSettings) GetLbPolicy() isLoadBalancerSettings_LbPolicy
func (*LoadBalancerSettings) GetSimple ¶
func (m *LoadBalancerSettings) GetSimple() LoadBalancerSettings_SimpleLB
func (*LoadBalancerSettings) ProtoMessage ¶
func (*LoadBalancerSettings) ProtoMessage()
func (*LoadBalancerSettings) Reset ¶
func (m *LoadBalancerSettings) Reset()
func (*LoadBalancerSettings) String ¶
func (m *LoadBalancerSettings) String() string
func (*LoadBalancerSettings) XXX_OneofFuncs ¶
func (*LoadBalancerSettings) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type LoadBalancerSettings_ConsistentHash ¶
type LoadBalancerSettings_ConsistentHash struct {
ConsistentHash *LoadBalancerSettings_ConsistentHashLB `protobuf:"bytes,2,opt,name=consistent_hash,oneof"`
}
type LoadBalancerSettings_ConsistentHashLB ¶
type LoadBalancerSettings_ConsistentHashLB struct { // REQUIRED. The name of the HTTP request header that will be used to // obtain the hash key. If the request header is not present, the load // balancer will use a random number as the hash, effectively making // the load balancing policy random. HttpHeader string `protobuf:"bytes,1,opt,name=http_header,proto3" json:"http_header,omitempty"` // The minimum number of virtual nodes to use for the hash // ring. Defaults to 1024. Larger ring sizes result in more granular // load distributions. If the number of hosts in the load balancing // pool is larger than the ring size, each host will be assigned a // single virtual node. MinimumRingSize uint32 `protobuf:"varint,2,opt,name=minimum_ring_size,proto3" json:"minimum_ring_size,omitempty"` }
Consistent hashing (ketama hash) based load balancer for even load distribution/redistribution when the connection pool changes. This load balancing policy is applicable only for HTTP-based connections. A user specified HTTP header is used as the key with [xxHash](http://cyan4973.github.io/xxHash) hashing.
func (*LoadBalancerSettings_ConsistentHashLB) Descriptor ¶
func (*LoadBalancerSettings_ConsistentHashLB) Descriptor() ([]byte, []int)
func (*LoadBalancerSettings_ConsistentHashLB) GetHttpHeader ¶
func (m *LoadBalancerSettings_ConsistentHashLB) GetHttpHeader() string
func (*LoadBalancerSettings_ConsistentHashLB) GetMinimumRingSize ¶
func (m *LoadBalancerSettings_ConsistentHashLB) GetMinimumRingSize() uint32
func (*LoadBalancerSettings_ConsistentHashLB) ProtoMessage ¶
func (*LoadBalancerSettings_ConsistentHashLB) ProtoMessage()
func (*LoadBalancerSettings_ConsistentHashLB) Reset ¶
func (m *LoadBalancerSettings_ConsistentHashLB) Reset()
func (*LoadBalancerSettings_ConsistentHashLB) String ¶
func (m *LoadBalancerSettings_ConsistentHashLB) String() string
type LoadBalancerSettings_Simple ¶
type LoadBalancerSettings_Simple struct {
Simple LoadBalancerSettings_SimpleLB `protobuf:"varint,1,opt,name=simple,proto3,enum=istio.LoadBalancerSettings_SimpleLB,oneof"`
}
type LoadBalancerSettings_SimpleLB ¶
type LoadBalancerSettings_SimpleLB int32
Standard load balancing algorithms that require no tuning.
const ( // Round Robin policy. Default LoadBalancerSettings_ROUND_ROBIN LoadBalancerSettings_SimpleLB = 0 // The least request load balancer uses an O(1) algorithm which selects // two random healthy hosts and picks the host which has fewer active // requests. LoadBalancerSettings_LEAST_CONN LoadBalancerSettings_SimpleLB = 1 // The random load balancer selects a random healthy host. The random // load balancer generally performs better than round robin if no health // checking policy is configured. LoadBalancerSettings_RANDOM LoadBalancerSettings_SimpleLB = 2 // This option will forward the connection to the original IP address // requested by the caller without doing any form of load // balancing. This option must be used with care. It is meant for // advanced use cases. Refer to Original Destination load balancer in // Envoy for further details. LoadBalancerSettings_PASSTHROUGH LoadBalancerSettings_SimpleLB = 3 )
func (LoadBalancerSettings_SimpleLB) EnumDescriptor ¶
func (LoadBalancerSettings_SimpleLB) EnumDescriptor() ([]byte, []int)
func (LoadBalancerSettings_SimpleLB) String ¶
func (x LoadBalancerSettings_SimpleLB) String() string
type Locality ¶
type Locality struct { // Region this :ref:`zone <envoy_api_field_core.Locality.zone>` belongs to. Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` // Defines the local service zone where Envoy is running. Though optional, it // should be set if discovery service routing is used and the discovery // service exposes :ref:`zone data <config_cluster_manager_sds_api_host_az>`, // either in this message or via :option:`--service-zone`. The meaning of zone // is context dependent, e.g. `Availability Zone (AZ) // <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`_ // on AWS, `Zone <https://cloud.google.com/compute/docs/regions-zones/>`_ on // GCP, etc. Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` // When used for locality of upstream hosts, this field further splits zone // into smaller chunks of sub-zones so they can be load balanced // independently. SubZone string `protobuf:"bytes,3,opt,name=sub_zone,proto3" json:"sub_zone,omitempty"` }
Identifies location of where either Envoy runs or where upstream hosts run.
func (*Locality) Descriptor ¶
func (*Locality) GetSubZone ¶
func (*Locality) ProtoMessage ¶
func (*Locality) ProtoMessage()
type LocalityLbEndpoints ¶
type LocalityLbEndpoints struct { // Identifies location of where the upstream hosts run. Locality *Locality `protobuf:"bytes,1,opt,name=locality" json:"locality,omitempty"` // The group of endpoints belonging to the locality specified. LbEndpoints []*LbEndpoint `protobuf:"bytes,2,rep,name=lb_endpoints" json:"lb_endpoints,omitempty"` // Optional: Per priority/region/zone/sub_zone weight - range 1-128. The load // balancing weight for a locality is divided by the sum of the weights of all // localities at the same priority level to produce the effective percentage // of traffic for the locality. // // Weights must be specified for either all localities in a given priority // level or none. // // If unspecified, each locality is presumed to have equal weight in a // cluster. // // .. attention:: // // The limit of 128 is somewhat arbitrary, but is applied due to performance // concerns with the current implementation and can be removed when // `this issue <https://github.com/envoyproxy/envoy/issues/1285>`_ is fixed. LoadBalancingWeight *UInt32Value `protobuf:"bytes,3,opt,name=load_balancing_weight" json:"load_balancing_weight,omitempty"` // Optional: the priority for this LocalityLbEndpoints. If unspecified this will // default to the highest priority (0). // // Under usual circumstances, Envoy will only select endpoints for the highest // priority (0). In the event all endpoints for a particular priority are // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the // next highest priority group. // // Priorities should range from 0 (highest) to N (lowest) without skipping. Priority uint32 `protobuf:"varint,5,opt,name=priority,proto3" json:"priority,omitempty"` }
A group of endpoints belonging to a Locality. One can have multiple LocalityLbEndpoints for a locality, but this is generally only done if the different groups need to have different load balancing weights or different priorities.
func (*LocalityLbEndpoints) Descriptor ¶
func (*LocalityLbEndpoints) Descriptor() ([]byte, []int)
func (*LocalityLbEndpoints) GetLbEndpoints ¶
func (m *LocalityLbEndpoints) GetLbEndpoints() []*LbEndpoint
func (*LocalityLbEndpoints) GetLoadBalancingWeight ¶
func (m *LocalityLbEndpoints) GetLoadBalancingWeight() *UInt32Value
func (*LocalityLbEndpoints) GetLocality ¶
func (m *LocalityLbEndpoints) GetLocality() *Locality
func (*LocalityLbEndpoints) GetPriority ¶
func (m *LocalityLbEndpoints) GetPriority() uint32
func (*LocalityLbEndpoints) ProtoMessage ¶
func (*LocalityLbEndpoints) ProtoMessage()
func (*LocalityLbEndpoints) Reset ¶
func (m *LocalityLbEndpoints) Reset()
func (*LocalityLbEndpoints) String ¶
func (m *LocalityLbEndpoints) String() string
type Metadata ¶
type Metadata struct { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. FilterMetadata map[string]*Struct `` /* 157-byte string literal not displayed */ }
Metadata provides additional inputs to filters based on matched listeners, filter chains, routes and endpoints. It is structured as a map from filter name (in reverse DNS format) to metadata specific to the filter. Metadata key-values for a filter are merged as connection and request handling occurs, with later values for the same key overriding earlier values.
An example use of metadata is providing additional values to http_connection_manager in the envoy.http_connection_manager.access_log namespace.
For load balancing, Metadata provides a means to subset cluster endpoints. Endpoints have a Metadata object associated and routes contain a Metadata object to match against. There are some well defined metadata used today for this purpose:
- “{"envoy.lb": {"canary": <bool> }}“ This indicates the canary status of an endpoint and is also used during header processing (x-envoy-upstream-canary) and for stats purposes.
func (*Metadata) Descriptor ¶
func (*Metadata) GetFilterMetadata ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
type Node ¶
type Node struct { // An opaque node identifier for the Envoy node. This also provides the local // service node name. It should be set if any of the following features are // used: :ref:`statsd <arch_overview_statistics>`, :ref:`CDS // <config_cluster_manager_cds>`, and :ref:`HTTP tracing // <arch_overview_tracing>`, either in this message or via // :option:`--service-node`. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Defines the local service cluster name where Envoy is running. Though // optional, it should be set if any of the following features are used: // :ref:`statsd <arch_overview_statistics>`, :ref:`health check cluster // verification <config_cluster_manager_cluster_hc_service_name>`, // :ref:`runtime override directory <config_runtime_override_subdirectory>`, // :ref:`user agent addition <config_http_conn_man_add_user_agent>`, // :ref:`HTTP global rate limiting <config_http_filters_rate_limit>`, // :ref:`CDS <config_cluster_manager_cds>`, and :ref:`HTTP tracing // <arch_overview_tracing>`, either in this message or via // :option:`--service-cluster`. Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` // Opaque metadata extending the node identifier. Envoy will pass this // directly to the management server. Metadata *Struct `protobuf:"bytes,3,opt,name=metadata" json:"metadata,omitempty"` // Locality specifying where the Envoy instance is running. Locality *Locality `protobuf:"bytes,4,opt,name=locality" json:"locality,omitempty"` // This is motivated by informing a management server during canary which // version of Envoy is being tested in a heterogeneous fleet. This will be set // by Envoy in management server RPCs. BuildVersion string `protobuf:"bytes,5,opt,name=build_version,proto3" json:"build_version,omitempty"` }
Identifies a specific Envoy instance. The node identifier is presented to the management server, which may use this identifier to distinguish per Envoy configuration for serving.
func (*Node) Descriptor ¶
func (*Node) GetBuildVersion ¶
func (*Node) GetCluster ¶
func (*Node) GetLocality ¶
func (*Node) GetMetadata ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
type NullValue ¶
type NullValue int32
`NullValue` is a singleton enumeration to represent the null value for the `Value` type union.
The JSON representation for `NullValue` is JSON `null`.
const ( // Null value. NullValue_NULL_VALUE NullValue = 0 )
func (NullValue) EnumDescriptor ¶
type OutlierDetection ¶
type OutlierDetection struct { // Settings for HTTP1.1/HTTP2/GRPC connections. Http *OutlierDetection_HTTPSettings `protobuf:"bytes,1,opt,name=http" json:"http,omitempty"` }
A Circuit breaker implementation that tracks the status of each individual host in the upstream service. While currently applicable to only HTTP services, future versions will support opaque TCP services as well. For HTTP services, hosts that continually return errors for API calls are ejected from the pool for a pre-defined period of time. See Envoy's [outlier detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/outlier) for more details.
The following rule sets a connection pool size of 100 connections and 1000 concurrent HTTP2 requests, with no more than 10 req/connection to "reviews" service. In addition, it configures upstream hosts to be scanned every 5 mins, such that any host that fails 7 consecutive times with 5XX error code will be ejected for 15 minutes.
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: reviews-cb-policy spec: host: reviews.prod.svc.cluster.local trafficPolicy: connectionPool: tcp: maxConnections: 100 http: http2MaxRequests: 1000 maxRequestsPerConnection: 10 outlierDetection: http: consecutiveErrors: 7 interval: 5m baseEjectionTime: 15m
func (*OutlierDetection) Descriptor ¶
func (*OutlierDetection) Descriptor() ([]byte, []int)
func (*OutlierDetection) GetHttp ¶
func (m *OutlierDetection) GetHttp() *OutlierDetection_HTTPSettings
func (*OutlierDetection) ProtoMessage ¶
func (*OutlierDetection) ProtoMessage()
func (*OutlierDetection) Reset ¶
func (m *OutlierDetection) Reset()
func (*OutlierDetection) String ¶
func (m *OutlierDetection) String() string
type OutlierDetection_HTTPSettings ¶
type OutlierDetection_HTTPSettings struct { // Number of 5XX errors before a host is ejected from the connection // pool. Defaults to 5. ConsecutiveErrors int32 `protobuf:"varint,1,opt,name=consecutive_errors,proto3" json:"consecutive_errors,omitempty"` // Time interval between ejection sweep analysis. format: // 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s. Interval *Duration `protobuf:"bytes,2,opt,name=interval" json:"interval,omitempty"` // Minimum ejection duration. A host will remain ejected for a period // equal to the product of minimum ejection duration and the number of // times the host has been ejected. This technique allows the system to // automatically increase the ejection period for unhealthy upstream // servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s. BaseEjectionTime *Duration `protobuf:"bytes,3,opt,name=base_ejection_time" json:"base_ejection_time,omitempty"` // Maximum % of hosts in the load balancing pool for the upstream // service that can be ejected. Defaults to 10%. MaxEjectionPercent int32 `protobuf:"varint,4,opt,name=max_ejection_percent,proto3" json:"max_ejection_percent,omitempty"` }
Outlier detection settings for HTTP1.1/HTTP2/GRPC connections.
func (*OutlierDetection_HTTPSettings) Descriptor ¶
func (*OutlierDetection_HTTPSettings) Descriptor() ([]byte, []int)
func (*OutlierDetection_HTTPSettings) GetBaseEjectionTime ¶
func (m *OutlierDetection_HTTPSettings) GetBaseEjectionTime() *Duration
func (*OutlierDetection_HTTPSettings) GetConsecutiveErrors ¶
func (m *OutlierDetection_HTTPSettings) GetConsecutiveErrors() int32
func (*OutlierDetection_HTTPSettings) GetInterval ¶
func (m *OutlierDetection_HTTPSettings) GetInterval() *Duration
func (*OutlierDetection_HTTPSettings) GetMaxEjectionPercent ¶
func (m *OutlierDetection_HTTPSettings) GetMaxEjectionPercent() int32
func (*OutlierDetection_HTTPSettings) ProtoMessage ¶
func (*OutlierDetection_HTTPSettings) ProtoMessage()
func (*OutlierDetection_HTTPSettings) Reset ¶
func (m *OutlierDetection_HTTPSettings) Reset()
func (*OutlierDetection_HTTPSettings) String ¶
func (m *OutlierDetection_HTTPSettings) String() string
type Pipe ¶
type Pipe struct { // Unix Domain Socket path. On Linux, paths starting with '@' will use the // abstract namespace. The starting '@' is replaced by a null byte by Envoy. // Paths starting with '@' will result in an error in environments other than // Linux. Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` }
func (*Pipe) Descriptor ¶
func (*Pipe) ProtoMessage ¶
func (*Pipe) ProtoMessage()
type Port ¶
type Port struct { // REQUIRED: A valid non-negative integer port number. Number uint32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // REQUIRED: The protocol exposed on the port. // MUST BE one of HTTP|HTTPS|GRPC|HTTP2|MONGO|TCP|TCP-TLS. // TCP-TLS is used to indicate secure connections to non HTTP services. Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` // Label assigned to the port. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Port describes the properties of a specific port of a service.
func (*Port) Descriptor
deprecated
func (*Port) GetProtocol ¶
func (*Port) ProtoMessage ¶
func (*Port) ProtoMessage()
func (*Port) ProtoReflect ¶
func (x *Port) ProtoReflect() protoreflect.Message
type PortSelector ¶
type PortSelector struct { // Types that are valid to be assigned to Port: // *PortSelector_Number // *PortSelector_Name Port isPortSelector_Port `protobuf_oneof:"port"` }
PortSelector specifies the name or number of a port to be used for matching or selection for final routing.
func (*PortSelector) Descriptor ¶
func (*PortSelector) Descriptor() ([]byte, []int)
func (*PortSelector) GetName ¶
func (m *PortSelector) GetName() string
func (*PortSelector) GetNumber ¶
func (m *PortSelector) GetNumber() uint32
func (*PortSelector) GetPort ¶
func (m *PortSelector) GetPort() isPortSelector_Port
func (*PortSelector) ProtoMessage ¶
func (*PortSelector) ProtoMessage()
func (*PortSelector) Reset ¶
func (m *PortSelector) Reset()
func (*PortSelector) String ¶
func (m *PortSelector) String() string
func (*PortSelector) XXX_OneofFuncs ¶
func (*PortSelector) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type PortSelector_Name ¶
type PortSelector_Name struct {
Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"`
}
type PortSelector_Number ¶
type PortSelector_Number struct {
Number uint32 `protobuf:"varint,1,opt,name=number,proto3,oneof"`
}
type Server ¶
type Server struct { // REQUIRED: The Port on which the proxy should listen for incoming // connections Port *Port `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"` // A list of hosts exposed by this gateway. While typically applicable to // HTTP services, it can also be used for TCP services using TLS with // SNI. Standard DNS wildcard prefix syntax is permitted. // // **Note**: A `VirtualService` that is bound to a gateway 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", // VirtualServices with hosts dev.example.com, prod.example.com will // match. However, VirtualServices with hosts example.com or // newexample.com will not match. Hosts []string `protobuf:"bytes,2,rep,name=hosts,proto3" json:"hosts,omitempty"` // Set of TLS related options that govern the server's behavior. Use // these options to control if all http requests should be redirected to // https, and the TLS modes to use. Tls *Server_TLSOptions `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"` // contains filtered or unexported fields }
`Server` describes the properties of the proxy on a given load balancer port. For example,
apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: my-ingress spec: selector: app: my-ingress-gateway servers: - port: number: 80 name: http2 protocol: HTTP2
Another example
apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: my-tcp-ingress spec: selector: app: my-tcp-ingress-gateway servers: - port: number: 27018 name: mongo protocol: MONGO
The following is an example of TLS configuration for port 443
apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: my-tls-ingress spec: selector: app: my-tls-ingress-gateway servers: - port: number: 443 name: https protocol: HTTPS tls: mode: SIMPLE serverCertificate: /etc/certs/server.pem privateKey: /etc/certs/privatekey.pem
func (*Server) Descriptor
deprecated
func (*Server) GetTls ¶
func (x *Server) GetTls() *Server_TLSOptions
func (*Server) ProtoMessage ¶
func (*Server) ProtoMessage()
func (*Server) ProtoReflect ¶
func (x *Server) ProtoReflect() protoreflect.Message
type Server_TLSOptions ¶
type Server_TLSOptions struct { // If set to true, the load balancer will send a 302 redirect for all // http connections, asking the clients to use HTTPS. HttpsRedirect bool `protobuf:"varint,1,opt,name=https_redirect,json=httpsRedirect,proto3" json:"https_redirect,omitempty"` // Optional: Indicates whether connections to this port should be // secured using TLS. The value of this field determines how TLS is // enforced. Mode Server_TLSOptions_TLSmode `protobuf:"varint,2,opt,name=mode,proto3,enum=istio.Server_TLSOptions_TLSmode" json:"mode,omitempty"` // REQUIRED if mode is `SIMPLE` or `MUTUAL`. The path to the file // holding the server-side TLS certificate to use. ServerCertificate string `protobuf:"bytes,3,opt,name=server_certificate,json=serverCertificate,proto3" json:"server_certificate,omitempty"` // REQUIRED if mode is `SIMPLE` or `MUTUAL`. The path to the file // holding the server's private key. PrivateKey string `protobuf:"bytes,4,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // REQUIRED if mode is `MUTUAL`. The path to a file containing // certificate authority certificates to use in verifying a presented // client side certificate. CaCertificates string `protobuf:"bytes,5,opt,name=ca_certificates,json=caCertificates,proto3" json:"ca_certificates,omitempty"` // A list of alternate names to verify the subject identity in the // certificate presented by the client. SubjectAltNames []string `protobuf:"bytes,6,rep,name=subject_alt_names,json=subjectAltNames,proto3" json:"subject_alt_names,omitempty"` // contains filtered or unexported fields }
func (*Server_TLSOptions) Descriptor
deprecated
func (*Server_TLSOptions) Descriptor() ([]byte, []int)
Deprecated: Use Server_TLSOptions.ProtoReflect.Descriptor instead.
func (*Server_TLSOptions) GetCaCertificates ¶
func (x *Server_TLSOptions) GetCaCertificates() string
func (*Server_TLSOptions) GetHttpsRedirect ¶
func (x *Server_TLSOptions) GetHttpsRedirect() bool
func (*Server_TLSOptions) GetMode ¶
func (x *Server_TLSOptions) GetMode() Server_TLSOptions_TLSmode
func (*Server_TLSOptions) GetPrivateKey ¶
func (x *Server_TLSOptions) GetPrivateKey() string
func (*Server_TLSOptions) GetServerCertificate ¶
func (x *Server_TLSOptions) GetServerCertificate() string
func (*Server_TLSOptions) GetSubjectAltNames ¶
func (x *Server_TLSOptions) GetSubjectAltNames() []string
func (*Server_TLSOptions) ProtoMessage ¶
func (*Server_TLSOptions) ProtoMessage()
func (*Server_TLSOptions) ProtoReflect ¶
func (x *Server_TLSOptions) ProtoReflect() protoreflect.Message
func (*Server_TLSOptions) Reset ¶
func (x *Server_TLSOptions) Reset()
func (*Server_TLSOptions) String ¶
func (x *Server_TLSOptions) String() string
type Server_TLSOptions_TLSmode ¶
type Server_TLSOptions_TLSmode int32
TLS modes enforced by the proxy
const ( // Forward the connection to the upstream server selected based on // the SNI string presented by the client. Server_TLSOptions_PASSTHROUGH Server_TLSOptions_TLSmode = 0 // Secure connections with standard TLS semantics. Server_TLSOptions_SIMPLE Server_TLSOptions_TLSmode = 1 // Secure connections to the upstream using mutual TLS by presenting // client certificates for authentication. Server_TLSOptions_MUTUAL Server_TLSOptions_TLSmode = 2 )
func (Server_TLSOptions_TLSmode) Descriptor ¶
func (Server_TLSOptions_TLSmode) Descriptor() protoreflect.EnumDescriptor
func (Server_TLSOptions_TLSmode) Enum ¶
func (x Server_TLSOptions_TLSmode) Enum() *Server_TLSOptions_TLSmode
func (Server_TLSOptions_TLSmode) EnumDescriptor
deprecated
func (Server_TLSOptions_TLSmode) EnumDescriptor() ([]byte, []int)
Deprecated: Use Server_TLSOptions_TLSmode.Descriptor instead.
func (Server_TLSOptions_TLSmode) Number ¶
func (x Server_TLSOptions_TLSmode) Number() protoreflect.EnumNumber
func (Server_TLSOptions_TLSmode) String ¶
func (x Server_TLSOptions_TLSmode) String() string
func (Server_TLSOptions_TLSmode) Type ¶
func (Server_TLSOptions_TLSmode) Type() protoreflect.EnumType
type ServiceEntry ¶
type ServiceEntry struct { // REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS // name with wildcard prefix (external services only). DNS names in hosts // will be ignored if the application accesses the service over non-HTTP // protocols such as mongo/opaque TCP/even HTTPS. In such scenarios, the // IP addresses specified in the Addresses field or the port will be used // to uniquely identify the destination. Hosts []string `protobuf:"bytes,1,rep,name=hosts" json:"hosts,omitempty"` // The virtual IP addresses associated with the service. Could be CIDR // prefix. For HTTP services, the addresses field will be ignored and // the destination will be identified based on the HTTP Host/Authority // header. For non-HTTP protocols such as mongo/opaque TCP/even HTTPS, // the hosts will be ignored. If one or more IP addresses are specified, // the incoming traffic will be idenfified 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. Addresses []string `protobuf:"bytes,2,rep,name=addresses" json:"addresses,omitempty"` // REQUIRED. The ports associated with the external service. Ports []*Port `protobuf:"bytes,3,rep,name=ports" json:"ports,omitempty"` // Specify whether the service should be considered external to the mesh // or part of the mesh. Location ServiceEntry_Location `protobuf:"varint,4,opt,name=location,proto3,enum=istio.ServiceEntry_Location" json:"location,omitempty"` // Service discovery mode for the hosts. If not set, Istio will attempt // to infer the discovery mode based on the value of hosts and endpoints. Resolution ServiceEntry_Resolution `protobuf:"varint,5,opt,name=resolution,proto3,enum=istio.ServiceEntry_Resolution" json:"resolution,omitempty"` // One or more endpoints associated with the service. Endpoints []*ServiceEntry_Endpoint `protobuf:"bytes,6,rep,name=endpoints" json:"endpoints,omitempty"` }
`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 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.
apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata: name: external-svc-mongocluster spec: hosts: - mymongodb.somedomain # not used addresses: - 192.192.192.192/24 # VIPs ports: - number: 27018 name: mongodb protocol: MONGO location: MESH_INTERNAL resolution: STATIC endpoints: - address: 2.2.2.2 - address: 3.3.3.3
and the associated DestinationRule
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: mtls-mongocluster spec: host: mymongodb.somedomain trafficPolicy: tls: mode: MUTUAL clientCertificate: /etc/certs/myclientcert.pem privateKey: /etc/certs/client_private_key.pem caCertificates: /etc/certs/rootcacerts.pem
The following example 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`.
apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata: name: external-svc-wildcard-example spec: hosts: - "*.bar.com" location: MESH_EXTERNAL ports: - number: 80 name: http protocol: HTTP resolution: NONE
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:8443, uk.foo.bar.com:9443, and in.foo.bar.com:7443
apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata: name: external-svc-dns spec: hosts: - foo.bar.com location: MESH_EXTERNAL ports: - number: 443 name: https protocol: HTTP resolution: DNS endpoints: - address: us.foo.bar.com ports: https: 8443 - address: uk.foo.bar.com ports: https: 9443 - address: in.foo.bar.com ports: https: 7443
and a DestinationRule to initiate TLS connections to the ServiceEntry.
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: tls-foobar spec: host: foo.bar.com trafficPolicy: tls: mode: SIMPLE # initiates HTTPS
With HTTP_PROXY=http://localhost:443, calls from the application to http://foo.bar.com will be upgraded to HTTPS and load balanced across the three domains specified above. In other words, a call to http://foo.bar.com/baz would be translated to https://uk.foo.bar.com/baz.
func (*ServiceEntry) Descriptor ¶
func (*ServiceEntry) Descriptor() ([]byte, []int)
func (*ServiceEntry) GetAddresses ¶
func (m *ServiceEntry) GetAddresses() []string
func (*ServiceEntry) GetEndpoints ¶
func (m *ServiceEntry) GetEndpoints() []*ServiceEntry_Endpoint
func (*ServiceEntry) GetHosts ¶
func (m *ServiceEntry) GetHosts() []string
func (*ServiceEntry) GetLocation ¶
func (m *ServiceEntry) GetLocation() ServiceEntry_Location
func (*ServiceEntry) GetPorts ¶
func (m *ServiceEntry) GetPorts() []*Port
func (*ServiceEntry) GetResolution ¶
func (m *ServiceEntry) GetResolution() ServiceEntry_Resolution
func (*ServiceEntry) ProtoMessage ¶
func (*ServiceEntry) ProtoMessage()
func (*ServiceEntry) Reset ¶
func (m *ServiceEntry) Reset()
func (*ServiceEntry) String ¶
func (m *ServiceEntry) String() string
type ServiceEntry_Endpoint ¶
type ServiceEntry_Endpoint struct { // REQUIRED: Address associated with the network endpoint without the // port ( IP or fully qualified domain name without wildcards). Domain // names can be used if and only if the resolution is set to DNS. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // Set of ports associated with the endpoint. The ports must be // associated with a port name that was declared as part of the // service. Ports map[string]uint32 `` /* 145-byte string literal not displayed */ // One or more labels associated with the endpoint. Labels map[string]string `` /* 146-byte string literal not displayed */ }
Endpoint defines a network address (IP or hostname) associated with the mesh service.
func (*ServiceEntry_Endpoint) Descriptor ¶
func (*ServiceEntry_Endpoint) Descriptor() ([]byte, []int)
func (*ServiceEntry_Endpoint) GetAddress ¶
func (m *ServiceEntry_Endpoint) GetAddress() string
func (*ServiceEntry_Endpoint) GetLabels ¶
func (m *ServiceEntry_Endpoint) GetLabels() map[string]string
func (*ServiceEntry_Endpoint) GetPorts ¶
func (m *ServiceEntry_Endpoint) GetPorts() map[string]uint32
func (*ServiceEntry_Endpoint) ProtoMessage ¶
func (*ServiceEntry_Endpoint) ProtoMessage()
func (*ServiceEntry_Endpoint) Reset ¶
func (m *ServiceEntry_Endpoint) Reset()
func (*ServiceEntry_Endpoint) String ¶
func (m *ServiceEntry_Endpoint) String() string
type ServiceEntry_Location ¶
type ServiceEntry_Location int32
Location specifies whether the service is part of Istio mesh or outside the mesh. Location determines the behavior of several features, such as service-to-service mTLS authentication, policy enforcement, etc. When communicating with services outside the mesh, Istio's mTLS authentication is disabled, and policy enforcement is performed on the client-side as opposed to server-side.
const ( // Signifies that the service is external to the mesh. Typically used // to indicate external services consumed through APIs. ServiceEntry_MESH_EXTERNAL ServiceEntry_Location = 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). ServiceEntry_MESH_INTERNAL ServiceEntry_Location = 1 )
func (ServiceEntry_Location) EnumDescriptor ¶
func (ServiceEntry_Location) EnumDescriptor() ([]byte, []int)
func (ServiceEntry_Location) String ¶
func (x ServiceEntry_Location) String() string
type ServiceEntry_Resolution ¶
type ServiceEntry_Resolution int32
Resolution determines how the proxy will resolve the IP addresses of the network endpoints associated with the service, so that it can route to one of them. The resolution mode specified here has no impact on how the application resolves the IP address associated with the service. The application may still have to use DNS to resolve the service to an IP so that the outbound traffic can be captured by the Proxy. Alternatively, for HTTP services, the application could directly communicate with the proxy (e.g., by setting HTTP_PROXY) to talk to these services.
const ( // Assume that incoming connections have already been resolved (to a // specific destination IP address). Such connections are typically // routed via the proxy using mechanisms such as IP table REDIRECT/ // eBPF. After performing any routing related transformations, the // proxy will forward the connection to the IP address to which the // connection was bound. ServiceEntry_NONE ServiceEntry_Resolution = 0 // Use the static IP addresses specified in endpoints (see below) as the // backing instances associated with the service. ServiceEntry_STATIC ServiceEntry_Resolution = 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. ServiceEntry_DNS ServiceEntry_Resolution = 2 )
func (ServiceEntry_Resolution) EnumDescriptor ¶
func (ServiceEntry_Resolution) EnumDescriptor() ([]byte, []int)
func (ServiceEntry_Resolution) String ¶
func (x ServiceEntry_Resolution) String() string
type SocketAddress ¶
type SocketAddress struct { Protocol SocketAddress_Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=istio.SocketAddress_Protocol" json:"protocol,omitempty"` // The address for this socket. :ref:`Listeners <config_listeners>` will bind // to the address or outbound connections will be made. An empty address is // not allowed, specify “0.0.0.0“ or “::“ to bind any. It's still possible to // distinguish on an address via the prefix/suffix matching in // FilterChainMatch after connection. For :ref:`clusters // <config_cluster_manager_cluster>`, an address may be either an IP or // hostname to be resolved via DNS. If it is a hostname, :ref:`resolver_name // <envoy_api_field_core.SocketAddress.resolver_name>` should be set unless default // (i.e. DNS) resolution is expected. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // Types that are valid to be assigned to PortSpecifier: // *SocketAddress_PortValue // *SocketAddress_NamedPort PortSpecifier isSocketAddress_PortSpecifier `protobuf_oneof:"port_specifier"` // The name of the resolver. This must have been registered with Envoy. If this is // empty, a context dependent default applies. If address is a hostname this // should be set for resolution other than DNS. If the address is a concrete // IP address, no resolution will occur. ResolverName string `protobuf:"bytes,5,opt,name=resolver_name,proto3" json:"resolver_name,omitempty"` // When binding to an IPv6 address above, this enables `IPv4 compatibity // <https://tools.ietf.org/html/rfc3493#page-11>`_. Binding to “::“ will // allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into // IPv6 space as “::FFFF:<IPv4-address>“. Ipv4Compat bool `protobuf:"varint,6,opt,name=ipv4_compat,proto3" json:"ipv4_compat,omitempty"` }
func (*SocketAddress) Descriptor ¶
func (*SocketAddress) Descriptor() ([]byte, []int)
func (*SocketAddress) GetAddress ¶
func (m *SocketAddress) GetAddress() string
func (*SocketAddress) GetIpv4Compat ¶
func (m *SocketAddress) GetIpv4Compat() bool
func (*SocketAddress) GetNamedPort ¶
func (m *SocketAddress) GetNamedPort() string
func (*SocketAddress) GetPortSpecifier ¶
func (m *SocketAddress) GetPortSpecifier() isSocketAddress_PortSpecifier
func (*SocketAddress) GetPortValue ¶
func (m *SocketAddress) GetPortValue() uint32
func (*SocketAddress) GetProtocol ¶
func (m *SocketAddress) GetProtocol() SocketAddress_Protocol
func (*SocketAddress) GetResolverName ¶
func (m *SocketAddress) GetResolverName() string
func (*SocketAddress) ProtoMessage ¶
func (*SocketAddress) ProtoMessage()
func (*SocketAddress) Reset ¶
func (m *SocketAddress) Reset()
func (*SocketAddress) String ¶
func (m *SocketAddress) String() string
func (*SocketAddress) XXX_OneofFuncs ¶
func (*SocketAddress) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type SocketAddress_NamedPort ¶
type SocketAddress_NamedPort struct {
NamedPort string `protobuf:"bytes,4,opt,name=named_port,proto3,oneof"`
}
type SocketAddress_PortValue ¶
type SocketAddress_PortValue struct {
PortValue uint32 `protobuf:"varint,3,opt,name=port_value,proto3,oneof"`
}
type SocketAddress_Protocol ¶
type SocketAddress_Protocol int32
const ( SocketAddress_TCP SocketAddress_Protocol = 0 // [#not-implemented-hide:] SocketAddress_UDP SocketAddress_Protocol = 1 )
func (SocketAddress_Protocol) EnumDescriptor ¶
func (SocketAddress_Protocol) EnumDescriptor() ([]byte, []int)
func (SocketAddress_Protocol) String ¶
func (x SocketAddress_Protocol) String() string
type Status ¶
type Status struct { // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // A developer-facing error message, which should be in English. Any // user-facing error message should be localized and sent in the // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // A list of messages that carry the error details. There is a common set of // message types for APIs to use. // google.protobuf.Any Details []*Any `protobuf:"bytes,3,rep,name=details" json:"details,omitempty"` }
The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be:
- Simple to use and understand for most users - Flexible enough to meet unexpected needs
Overview ¶
The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` that can be used for common error conditions.
Language mapping ¶
The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.
Other uses ¶
The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.
Example uses of this error model include:
- Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors.
- Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting.
- Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response.
- Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message.
- Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.
func (*Status) Descriptor ¶
func (*Status) GetDetails ¶
func (*Status) GetMessage ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
type StringMatch ¶
type StringMatch struct { // Types that are valid to be assigned to MatchType: // *StringMatch_Exact // *StringMatch_Prefix // *StringMatch_Regex MatchType isStringMatch_MatchType `protobuf_oneof:"match_type"` }
Describes how to match a given string in HTTP headers. Match is case-sensitive.
func (*StringMatch) Descriptor ¶
func (*StringMatch) Descriptor() ([]byte, []int)
func (*StringMatch) GetExact ¶
func (m *StringMatch) GetExact() string
func (*StringMatch) GetMatchType ¶
func (m *StringMatch) GetMatchType() isStringMatch_MatchType
func (*StringMatch) GetPrefix ¶
func (m *StringMatch) GetPrefix() string
func (*StringMatch) GetRegex ¶
func (m *StringMatch) GetRegex() string
func (*StringMatch) ProtoMessage ¶
func (*StringMatch) ProtoMessage()
func (*StringMatch) Reset ¶
func (m *StringMatch) Reset()
func (*StringMatch) String ¶
func (m *StringMatch) String() string
func (*StringMatch) XXX_OneofFuncs ¶
func (*StringMatch) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type StringMatch_Exact ¶
type StringMatch_Exact struct {
Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"`
}
type StringMatch_Prefix ¶
type StringMatch_Prefix struct {
Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"`
}
type StringMatch_Regex ¶
type StringMatch_Regex struct {
Regex string `protobuf:"bytes,3,opt,name=regex,proto3,oneof"`
}
type Struct ¶
type Struct struct { // Unordered map of dynamically typed values. Fields map[string]*Value `` /* 139-byte string literal not displayed */ }
`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language.
The JSON representation for `Struct` is JSON object.
func (*Struct) Descriptor ¶
func (*Struct) ProtoMessage ¶
func (*Struct) ProtoMessage()
type Subset ¶
type Subset struct { // REQUIRED. Name of the subset. The service name and the subset name can // be used for traffic splitting in a route rule. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // REQUIRED. Labels apply a filter over the endpoints of a service in the // service registry. See route rules for examples of usage. Labels map[string]string `` /* 146-byte string literal not displayed */ // Traffic policies that apply to this subset. Subsets inherit the // traffic policies specified at the DestinationRule level. Settings // specified at the subset level will override the corresponding settings // specified at the DestinationRule level. TrafficPolicy *TrafficPolicy `protobuf:"bytes,3,opt,name=traffic_policy" json:"traffic_policy,omitempty"` }
A subset of endpoints of a service. Subsets can be used for scenarios like A/B testing, or routing to a specific version of a service. Refer to VirtualService(#VirtualService) documentation for examples of using subsets in these scenarios. In addition, traffic policies defined at the service-level can be overridden at a subset-level. The following rule uses a round robin load balancing policy for all traffic going to a subset named testversion that is composed of endpoints (e.g., pods) with labels (version:v3).
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: bookinfo-ratings spec: host: ratings.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.
func (*Subset) Descriptor ¶
func (*Subset) GetTrafficPolicy ¶
func (m *Subset) GetTrafficPolicy() *TrafficPolicy
func (*Subset) ProtoMessage ¶
func (*Subset) ProtoMessage()
type TCPRoute ¶
type TCPRoute struct { // Match conditions to be satisfied for the rule to be // activated. All conditions inside a single match block have AND // semantics, while the list of match blocks have OR semantics. The rule // is matched if any one of the match blocks succeed. Match []*L4MatchAttributes `protobuf:"bytes,1,rep,name=match" json:"match,omitempty"` // The destination to which the connection should be forwarded to. // Currently, only one destination is allowed for TCP services. When TCP // weighted routing support is introduced in Envoy, multiple destinations // with weights can be specified. Route []*DestinationWeight `protobuf:"bytes,2,rep,name=route" json:"route,omitempty"` }
Describes match conditions and actions for routing TCP traffic. The following routing rule forwards traffic arriving at port 27017 for mongo.prod.svc.cluster.local from 172.17.16.* subnet to another Mongo server on port 5555.
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: bookinfo-Mongo spec: hosts: - mongo.prod.svc.cluster.local tcp: - match: - port: 27017 sourceSubnet: "172.17.16.0/24" route: - destination: host: mongo.backup.svc.cluster.local port: number: 5555
func (*TCPRoute) Descriptor ¶
func (*TCPRoute) GetMatch ¶
func (m *TCPRoute) GetMatch() []*L4MatchAttributes
func (*TCPRoute) GetRoute ¶
func (m *TCPRoute) GetRoute() []*DestinationWeight
func (*TCPRoute) ProtoMessage ¶
func (*TCPRoute) ProtoMessage()
type TLSSettings ¶
type TLSSettings struct { // REQUIRED: Indicates whether connections to this port should be secured // using TLS. The value of this field determines how TLS is enforced. Mode TLSSettings_TLSmode `protobuf:"varint,1,opt,name=mode,proto3,enum=istio.TLSSettings_TLSmode" json:"mode,omitempty"` // REQUIRED if mode is `MUTUAL`. The path to the file holding the // client-side TLS certificate to use. ClientCertificate string `protobuf:"bytes,2,opt,name=client_certificate,proto3" json:"client_certificate,omitempty"` // REQUIRED if mode is `MUTUAL`. The path to the file holding the // client's private key. PrivateKey string `protobuf:"bytes,3,opt,name=private_key,proto3" json:"private_key,omitempty"` // OPTIONAL: The path to the file containing certificate authority // certificates to use in verifying a presented server certificate. If // omitted, the proxy will not verify the server's certificate. CaCertificates string `protobuf:"bytes,4,opt,name=ca_certificates,proto3" json:"ca_certificates,omitempty"` // A list of alternate names to verify the subject identity in the // certificate. If specified, the proxy will verify that the server // certificate's subject alt name matches one of the specified values. SubjectAltNames []string `protobuf:"bytes,5,rep,name=subject_alt_names" json:"subject_alt_names,omitempty"` // SNI string to present to the server during TLS handshake. Sni string `protobuf:"bytes,6,opt,name=sni,proto3" json:"sni,omitempty"` }
SSL/TLS related settings for upstream connections. See Envoy's [TLS context](https://www.envoyproxy.io/docs/envoy/latest/api-v1/cluster_manager/cluster_ssl.html#config-cluster-manager-cluster-ssl) for more details. These settings are common to both HTTP and TCP upstreams.
For example, the following rule configures a client to use mutual TLS for connections to upstream database cluster.
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: db-mtls spec: host: mydbserver.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.
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: tls-foo spec: host: "*.foo.com" trafficPolicy: tls: mode: SIMPLE
func (*TLSSettings) Descriptor ¶
func (*TLSSettings) Descriptor() ([]byte, []int)
func (*TLSSettings) GetCaCertificates ¶
func (m *TLSSettings) GetCaCertificates() string
func (*TLSSettings) GetClientCertificate ¶
func (m *TLSSettings) GetClientCertificate() string
func (*TLSSettings) GetMode ¶
func (m *TLSSettings) GetMode() TLSSettings_TLSmode
func (*TLSSettings) GetPrivateKey ¶
func (m *TLSSettings) GetPrivateKey() string
func (*TLSSettings) GetSni ¶
func (m *TLSSettings) GetSni() string
func (*TLSSettings) GetSubjectAltNames ¶
func (m *TLSSettings) GetSubjectAltNames() []string
func (*TLSSettings) ProtoMessage ¶
func (*TLSSettings) ProtoMessage()
func (*TLSSettings) Reset ¶
func (m *TLSSettings) Reset()
func (*TLSSettings) String ¶
func (m *TLSSettings) String() string
type TLSSettings_TLSmode ¶
type TLSSettings_TLSmode int32
TLS connection mode
const ( // Do not setup a TLS connection to the upstream endpoint. TLSSettings_DISABLE TLSSettings_TLSmode = 0 // Originate a TLS connection to the upstream endpoint. TLSSettings_SIMPLE TLSSettings_TLSmode = 1 // Secure connections to the upstream using mutual TLS by presenting // client certificates for authentication. TLSSettings_MUTUAL TLSSettings_TLSmode = 2 )
func (TLSSettings_TLSmode) EnumDescriptor ¶
func (TLSSettings_TLSmode) EnumDescriptor() ([]byte, []int)
func (TLSSettings_TLSmode) String ¶
func (x TLSSettings_TLSmode) String() string
type TrafficPolicy ¶
type TrafficPolicy struct { // Settings controlling the load balancer algorithms. LoadBalancer *LoadBalancerSettings `protobuf:"bytes,1,opt,name=load_balancer" json:"load_balancer,omitempty"` // Settings controlling the volume of connections to an upstream service ConnectionPool *ConnectionPoolSettings `protobuf:"bytes,2,opt,name=connection_pool" json:"connection_pool,omitempty"` // Settings controlling eviction of unhealthy hosts from the load balancing pool OutlierDetection *OutlierDetection `protobuf:"bytes,3,opt,name=outlier_detection" json:"outlier_detection,omitempty"` // TLS related settings for connections to the upstream service. Tls *TLSSettings `protobuf:"bytes,4,opt,name=tls" json:"tls,omitempty"` // Traffic policies specific to individual ports. Note that port level // settings will override the destination-level settings. Traffic // settings specified at the destination-level will not be inherited when // overridden by port-level settings, i.e. default values will be applied // to fields omitted in port-level traffic policies. PortLevelSettings []*TrafficPolicy_PortTrafficPolicy `protobuf:"bytes,5,rep,name=port_level_settings" json:"port_level_settings,omitempty"` }
Traffic policies to apply for a specific destination, across all destination ports. See DestinationRule for examples.
func (*TrafficPolicy) Descriptor ¶
func (*TrafficPolicy) Descriptor() ([]byte, []int)
func (*TrafficPolicy) GetConnectionPool ¶
func (m *TrafficPolicy) GetConnectionPool() *ConnectionPoolSettings
func (*TrafficPolicy) GetLoadBalancer ¶
func (m *TrafficPolicy) GetLoadBalancer() *LoadBalancerSettings
func (*TrafficPolicy) GetOutlierDetection ¶
func (m *TrafficPolicy) GetOutlierDetection() *OutlierDetection
func (*TrafficPolicy) GetPortLevelSettings ¶
func (m *TrafficPolicy) GetPortLevelSettings() []*TrafficPolicy_PortTrafficPolicy
func (*TrafficPolicy) GetTls ¶
func (m *TrafficPolicy) GetTls() *TLSSettings
func (*TrafficPolicy) ProtoMessage ¶
func (*TrafficPolicy) ProtoMessage()
func (*TrafficPolicy) Reset ¶
func (m *TrafficPolicy) Reset()
func (*TrafficPolicy) String ¶
func (m *TrafficPolicy) String() string
type TrafficPolicy_PortTrafficPolicy ¶
type TrafficPolicy_PortTrafficPolicy struct { // Specifies the port name or number of a port on the destination service // on which this policy is being applied. // // Names must comply with DNS label syntax (rfc1035) and therefore cannot // collide with numbers. If there are multiple ports on a service with // the same protocol the names should be of the form <protocol-name>-<DNS // label>. Port *PortSelector `protobuf:"bytes,1,opt,name=port" json:"port,omitempty"` // Settings controlling the load balancer algorithms. LoadBalancer *LoadBalancerSettings `protobuf:"bytes,2,opt,name=load_balancer" json:"load_balancer,omitempty"` // Settings controlling the volume of connections to an upstream service ConnectionPool *ConnectionPoolSettings `protobuf:"bytes,3,opt,name=connection_pool" json:"connection_pool,omitempty"` // Settings controlling eviction of unhealthy hosts from the load balancing pool OutlierDetection *OutlierDetection `protobuf:"bytes,4,opt,name=outlier_detection" json:"outlier_detection,omitempty"` // TLS related settings for connections to the upstream service. Tls *TLSSettings `protobuf:"bytes,5,opt,name=tls" json:"tls,omitempty"` }
Traffic policies that apply to specific ports of the service
func (*TrafficPolicy_PortTrafficPolicy) Descriptor ¶
func (*TrafficPolicy_PortTrafficPolicy) Descriptor() ([]byte, []int)
func (*TrafficPolicy_PortTrafficPolicy) GetConnectionPool ¶
func (m *TrafficPolicy_PortTrafficPolicy) GetConnectionPool() *ConnectionPoolSettings
func (*TrafficPolicy_PortTrafficPolicy) GetLoadBalancer ¶
func (m *TrafficPolicy_PortTrafficPolicy) GetLoadBalancer() *LoadBalancerSettings
func (*TrafficPolicy_PortTrafficPolicy) GetOutlierDetection ¶
func (m *TrafficPolicy_PortTrafficPolicy) GetOutlierDetection() *OutlierDetection
func (*TrafficPolicy_PortTrafficPolicy) GetPort ¶
func (m *TrafficPolicy_PortTrafficPolicy) GetPort() *PortSelector
func (*TrafficPolicy_PortTrafficPolicy) GetTls ¶
func (m *TrafficPolicy_PortTrafficPolicy) GetTls() *TLSSettings
func (*TrafficPolicy_PortTrafficPolicy) ProtoMessage ¶
func (*TrafficPolicy_PortTrafficPolicy) ProtoMessage()
func (*TrafficPolicy_PortTrafficPolicy) Reset ¶
func (m *TrafficPolicy_PortTrafficPolicy) Reset()
func (*TrafficPolicy_PortTrafficPolicy) String ¶
func (m *TrafficPolicy_PortTrafficPolicy) String() string
type UInt32Value ¶
type UInt32Value struct { // The uint32 value. Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` }
Wrapper message for `uint32`.
The JSON representation for `UInt32Value` is JSON number.
func (*UInt32Value) Descriptor ¶
func (*UInt32Value) Descriptor() ([]byte, []int)
func (*UInt32Value) GetValue ¶
func (m *UInt32Value) GetValue() uint32
func (*UInt32Value) ProtoMessage ¶
func (*UInt32Value) ProtoMessage()
func (*UInt32Value) Reset ¶
func (m *UInt32Value) Reset()
func (*UInt32Value) String ¶
func (m *UInt32Value) String() string
type Value ¶
type Value struct { // The kind of value. // // Types that are valid to be assigned to Kind: // *Value_NullValue // *Value_NumberValue // *Value_StringValue // *Value_BoolValue // *Value_StructValue // *Value_ListValue Kind isValue_Kind `protobuf_oneof:"kind"` }
`Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of that variants, absence of any variant indicates an error.
The JSON representation for `Value` is JSON value.
func (*Value) Descriptor ¶
func (*Value) GetBoolValue ¶
func (*Value) GetListValue ¶
func (*Value) GetNullValue ¶
func (*Value) GetNumberValue ¶
func (*Value) GetStringValue ¶
func (*Value) GetStructValue ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
type Value_BoolValue ¶
type Value_BoolValue struct {
BoolValue bool `protobuf:"varint,4,opt,name=bool_value,proto3,oneof"`
}
type Value_ListValue ¶
type Value_ListValue struct {
ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,oneof"`
}
type Value_NullValue ¶
type Value_NullValue struct {
NullValue NullValue `protobuf:"varint,1,opt,name=null_value,proto3,enum=istio.NullValue,oneof"`
}
type Value_NumberValue ¶
type Value_NumberValue struct {
NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,proto3,oneof"`
}
type Value_StringValue ¶
type Value_StringValue struct {
StringValue string `protobuf:"bytes,3,opt,name=string_value,proto3,oneof"`
}
type Value_StructValue ¶
type Value_StructValue struct {
StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,oneof"`
}
type VirtualService ¶
type VirtualService struct { // REQUIRED. The destination hosts to which traffic is being sent. Could // be a DNS name with wildcard prefix or an IP address. Depending on the // platform, short-names can also be used instead of a FQDN (i.e. has no // dots in the name). In such a scenario, the FQDN of the host would be // derived based on the underlying platform. // // **A host name can be defined by only one VirtualService**. A single // VirtualService can be used to describe traffic properties for multiple // HTTP and TCP ports. // // *Note for Kubernetes users*: When short names are used (e.g. "reviews" // instead of "reviews.default.svc.cluster.local"), Istio will interpret // the short name based on the namespace of the rule, not the service. A // rule in the "default" namespace containing a host "reviews will be // interpreted as "reviews.default.svc.cluster.local", irrespective of // the actual namespace associated with the reviews service. _To avoid // potential misconfigurations, it is recommended to always use fully // qualified domain names over short names._ // // The hosts field applies to both HTTP and TCP services. Service inside // the mesh, i.e., those found in the service registry, must always be // referred to using their alphanumeric names. IP addresses are allowed // only for services defined via the Gateway. Hosts []string `protobuf:"bytes,1,rep,name=hosts" json:"hosts,omitempty"` // The names of gateways and sidecars that should apply these routes. A // single VirtualService is used for sidecars inside the mesh as well // as for one or more gateways. The selection condition imposed by this field // can be overridden using the source field in the match conditions of HTTP/TCP // routes. The reserved word `mesh` is used to imply all the sidecars in // the mesh. When this field is omitted, the default gateway (`mesh`) // will be used, which would apply the rule to all sidecars in the // mesh. If a list of gateway names is provided, the rules will apply // only to the gateways. To apply the rules to both gateways and sidecars, // specify `mesh` as one of the gateway names. Gateways []string `protobuf:"bytes,2,rep,name=gateways" json:"gateways,omitempty"` // An ordered list of route rules for HTTP traffic. // The first rule matching an incoming request is used. Http []*HTTPRoute `protobuf:"bytes,3,rep,name=http" json:"http,omitempty"` // An ordered list of route rules for TCP traffic. // The first rule matching an incoming request is used. Tcp []*TCPRoute `protobuf:"bytes,4,rep,name=tcp" json:"tcp,omitempty"` }
A `VirtualService` defines a set of traffic routing rules to apply when a host is addressed. Each routing rule defines matching criteria for traffic of a specific protocol. If the traffic is matched, then it is sent to a named destination service (or subset/version of it) defined in the registry.
The source of traffic can also be matched in a routing rule. This allows routing to be customized for specific client contexts.
The following example on Kubernetes, routes all HTTP traffic by default to pods of the reviews service with label "version: v1". In addition, HTTP requests containing /wpcatalog/, /consumercatalog/ url prefixes will be rewritten to /newcatalog and sent to pods with label "version: v2".
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: reviews-route spec: hosts: - reviews.prod.svc.cluster.local http: - match: - uri: prefix: "/wpcatalog" - uri: prefix: "/consumercatalog" rewrite: uri: "/newcatalog" route: - destination: host: reviews.prod.svc.cluster.local subset: v2 - 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`.
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: reviews-destination spec: host: reviews.prod.svc.cluster.local subsets: - name: v1 labels: version: v1 - name: v2 labels: version: v2
func (*VirtualService) Descriptor ¶
func (*VirtualService) Descriptor() ([]byte, []int)
func (*VirtualService) GetGateways ¶
func (m *VirtualService) GetGateways() []string
func (*VirtualService) GetHosts ¶
func (m *VirtualService) GetHosts() []string
func (*VirtualService) GetHttp ¶
func (m *VirtualService) GetHttp() []*HTTPRoute
func (*VirtualService) GetTcp ¶
func (m *VirtualService) GetTcp() []*TCPRoute
func (*VirtualService) ProtoMessage ¶
func (*VirtualService) ProtoMessage()
func (*VirtualService) Reset ¶
func (m *VirtualService) Reset()
func (*VirtualService) String ¶
func (m *VirtualService) String() string