Documentation ¶
Overview ¶
Package v1alpha3 is a generated protocol buffer package.
It is generated from these files:
networking/v1alpha3/destination_rule.proto networking/v1alpha3/envoy_filter.proto networking/v1alpha3/gateway.proto networking/v1alpha3/service_entry.proto networking/v1alpha3/virtual_service.proto
It has these top-level messages:
DestinationRule TrafficPolicy Subset LoadBalancerSettings ConnectionPoolSettings OutlierDetection TLSSettings EnvoyFilter Gateway Server Port ServiceEntry VirtualService Destination HTTPRoute TLSRoute TCPRoute HTTPMatchRequest DestinationWeight L4MatchAttributes TLSMatchAttributes HTTPRedirect HTTPRewrite StringMatch HTTPRetry CorsPolicy HTTPFaultInjection PortSelector
Index ¶
- Variables
- type ConnectionPoolSettings
- func (*ConnectionPoolSettings) Descriptor() ([]byte, []int)
- func (m *ConnectionPoolSettings) GetHttp() *ConnectionPoolSettings_HTTPSettings
- func (m *ConnectionPoolSettings) GetTcp() *ConnectionPoolSettings_TCPSettings
- func (m *ConnectionPoolSettings) Marshal() (dAtA []byte, err error)
- func (m *ConnectionPoolSettings) MarshalTo(dAtA []byte) (int, error)
- func (*ConnectionPoolSettings) ProtoMessage()
- func (m *ConnectionPoolSettings) Reset()
- func (m *ConnectionPoolSettings) Size() (n int)
- func (m *ConnectionPoolSettings) String() string
- func (m *ConnectionPoolSettings) Unmarshal(dAtA []byte) error
- 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 (m *ConnectionPoolSettings_HTTPSettings) Marshal() (dAtA []byte, err error)
- func (m *ConnectionPoolSettings_HTTPSettings) MarshalTo(dAtA []byte) (int, error)
- func (*ConnectionPoolSettings_HTTPSettings) ProtoMessage()
- func (m *ConnectionPoolSettings_HTTPSettings) Reset()
- func (m *ConnectionPoolSettings_HTTPSettings) Size() (n int)
- func (m *ConnectionPoolSettings_HTTPSettings) String() string
- func (m *ConnectionPoolSettings_HTTPSettings) Unmarshal(dAtA []byte) error
- type ConnectionPoolSettings_TCPSettings
- func (*ConnectionPoolSettings_TCPSettings) Descriptor() ([]byte, []int)
- func (m *ConnectionPoolSettings_TCPSettings) GetConnectTimeout() *google_protobuf.Duration
- func (m *ConnectionPoolSettings_TCPSettings) GetMaxConnections() int32
- func (m *ConnectionPoolSettings_TCPSettings) Marshal() (dAtA []byte, err error)
- func (m *ConnectionPoolSettings_TCPSettings) MarshalTo(dAtA []byte) (int, error)
- func (*ConnectionPoolSettings_TCPSettings) ProtoMessage()
- func (m *ConnectionPoolSettings_TCPSettings) Reset()
- func (m *ConnectionPoolSettings_TCPSettings) Size() (n int)
- func (m *ConnectionPoolSettings_TCPSettings) String() string
- func (m *ConnectionPoolSettings_TCPSettings) Unmarshal(dAtA []byte) error
- type CorsPolicy
- func (*CorsPolicy) Descriptor() ([]byte, []int)
- func (m *CorsPolicy) GetAllowCredentials() *google_protobuf1.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() *google_protobuf.Duration
- func (m *CorsPolicy) Marshal() (dAtA []byte, err error)
- func (m *CorsPolicy) MarshalTo(dAtA []byte) (int, error)
- func (*CorsPolicy) ProtoMessage()
- func (m *CorsPolicy) Reset()
- func (m *CorsPolicy) Size() (n int)
- func (m *CorsPolicy) String() string
- func (m *CorsPolicy) Unmarshal(dAtA []byte) error
- type Destination
- func (*Destination) Descriptor() ([]byte, []int)
- func (m *Destination) GetHost() string
- func (m *Destination) GetPort() *PortSelector
- func (m *Destination) GetSubset() string
- func (m *Destination) Marshal() (dAtA []byte, err error)
- func (m *Destination) MarshalTo(dAtA []byte) (int, error)
- func (*Destination) ProtoMessage()
- func (m *Destination) Reset()
- func (m *Destination) Size() (n int)
- func (m *Destination) String() string
- func (m *Destination) Unmarshal(dAtA []byte) error
- type DestinationRule
- func (*DestinationRule) Descriptor() ([]byte, []int)
- func (m *DestinationRule) GetHost() string
- func (m *DestinationRule) GetSubsets() []*Subset
- func (m *DestinationRule) GetTrafficPolicy() *TrafficPolicy
- func (m *DestinationRule) Marshal() (dAtA []byte, err error)
- func (m *DestinationRule) MarshalTo(dAtA []byte) (int, error)
- func (*DestinationRule) ProtoMessage()
- func (m *DestinationRule) Reset()
- func (m *DestinationRule) Size() (n int)
- func (m *DestinationRule) String() string
- func (m *DestinationRule) Unmarshal(dAtA []byte) error
- type DestinationWeight
- func (*DestinationWeight) Descriptor() ([]byte, []int)
- func (m *DestinationWeight) GetDestination() *Destination
- func (m *DestinationWeight) GetWeight() int32
- func (m *DestinationWeight) Marshal() (dAtA []byte, err error)
- func (m *DestinationWeight) MarshalTo(dAtA []byte) (int, error)
- func (*DestinationWeight) ProtoMessage()
- func (m *DestinationWeight) Reset()
- func (m *DestinationWeight) Size() (n int)
- func (m *DestinationWeight) String() string
- func (m *DestinationWeight) Unmarshal(dAtA []byte) error
- type EnvoyFilter
- func (*EnvoyFilter) Descriptor() ([]byte, []int)
- func (m *EnvoyFilter) GetFilters() []*EnvoyFilter_Filter
- func (m *EnvoyFilter) GetWorkloadLabels() map[string]string
- func (m *EnvoyFilter) Marshal() (dAtA []byte, err error)
- func (m *EnvoyFilter) MarshalTo(dAtA []byte) (int, error)
- func (*EnvoyFilter) ProtoMessage()
- func (m *EnvoyFilter) Reset()
- func (m *EnvoyFilter) Size() (n int)
- func (m *EnvoyFilter) String() string
- func (m *EnvoyFilter) Unmarshal(dAtA []byte) error
- type EnvoyFilter_Filter
- func (*EnvoyFilter_Filter) Descriptor() ([]byte, []int)
- func (m *EnvoyFilter_Filter) GetFilterConfig() *google_protobuf3.Struct
- func (m *EnvoyFilter_Filter) GetFilterName() string
- func (m *EnvoyFilter_Filter) GetFilterType() EnvoyFilter_Filter_FilterType
- func (m *EnvoyFilter_Filter) GetInsertPosition() *EnvoyFilter_InsertPosition
- func (m *EnvoyFilter_Filter) GetListenerMatch() *EnvoyFilter_ListenerMatch
- func (m *EnvoyFilter_Filter) Marshal() (dAtA []byte, err error)
- func (m *EnvoyFilter_Filter) MarshalTo(dAtA []byte) (int, error)
- func (*EnvoyFilter_Filter) ProtoMessage()
- func (m *EnvoyFilter_Filter) Reset()
- func (m *EnvoyFilter_Filter) Size() (n int)
- func (m *EnvoyFilter_Filter) String() string
- func (m *EnvoyFilter_Filter) Unmarshal(dAtA []byte) error
- type EnvoyFilter_Filter_FilterType
- type EnvoyFilter_InsertPosition
- func (*EnvoyFilter_InsertPosition) Descriptor() ([]byte, []int)
- func (m *EnvoyFilter_InsertPosition) GetIndex() EnvoyFilter_InsertPosition_Index
- func (m *EnvoyFilter_InsertPosition) GetRelativeTo() string
- func (m *EnvoyFilter_InsertPosition) Marshal() (dAtA []byte, err error)
- func (m *EnvoyFilter_InsertPosition) MarshalTo(dAtA []byte) (int, error)
- func (*EnvoyFilter_InsertPosition) ProtoMessage()
- func (m *EnvoyFilter_InsertPosition) Reset()
- func (m *EnvoyFilter_InsertPosition) Size() (n int)
- func (m *EnvoyFilter_InsertPosition) String() string
- func (m *EnvoyFilter_InsertPosition) Unmarshal(dAtA []byte) error
- type EnvoyFilter_InsertPosition_Index
- type EnvoyFilter_ListenerMatch
- func (*EnvoyFilter_ListenerMatch) Descriptor() ([]byte, []int)
- func (m *EnvoyFilter_ListenerMatch) GetAddress() []string
- func (m *EnvoyFilter_ListenerMatch) GetListenerProtocol() EnvoyFilter_ListenerMatch_ListenerProtocol
- func (m *EnvoyFilter_ListenerMatch) GetListenerType() EnvoyFilter_ListenerMatch_ListenerType
- func (m *EnvoyFilter_ListenerMatch) GetPortNamePrefix() string
- func (m *EnvoyFilter_ListenerMatch) GetPortNumber() uint32
- func (m *EnvoyFilter_ListenerMatch) Marshal() (dAtA []byte, err error)
- func (m *EnvoyFilter_ListenerMatch) MarshalTo(dAtA []byte) (int, error)
- func (*EnvoyFilter_ListenerMatch) ProtoMessage()
- func (m *EnvoyFilter_ListenerMatch) Reset()
- func (m *EnvoyFilter_ListenerMatch) Size() (n int)
- func (m *EnvoyFilter_ListenerMatch) String() string
- func (m *EnvoyFilter_ListenerMatch) Unmarshal(dAtA []byte) error
- type EnvoyFilter_ListenerMatch_ListenerProtocol
- type EnvoyFilter_ListenerMatch_ListenerType
- type Gateway
- func (*Gateway) Descriptor() ([]byte, []int)
- func (m *Gateway) GetSelector() map[string]string
- func (m *Gateway) GetServers() []*Server
- func (m *Gateway) Marshal() (dAtA []byte, err error)
- func (m *Gateway) MarshalTo(dAtA []byte) (int, error)
- func (*Gateway) ProtoMessage()
- func (m *Gateway) Reset()
- func (m *Gateway) Size() (n int)
- func (m *Gateway) String() string
- func (m *Gateway) Unmarshal(dAtA []byte) error
- type HTTPFaultInjection
- func (*HTTPFaultInjection) Descriptor() ([]byte, []int)
- func (m *HTTPFaultInjection) GetAbort() *HTTPFaultInjection_Abort
- func (m *HTTPFaultInjection) GetDelay() *HTTPFaultInjection_Delay
- func (m *HTTPFaultInjection) Marshal() (dAtA []byte, err error)
- func (m *HTTPFaultInjection) MarshalTo(dAtA []byte) (int, error)
- func (*HTTPFaultInjection) ProtoMessage()
- func (m *HTTPFaultInjection) Reset()
- func (m *HTTPFaultInjection) Size() (n int)
- func (m *HTTPFaultInjection) String() string
- func (m *HTTPFaultInjection) Unmarshal(dAtA []byte) error
- 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 (m *HTTPFaultInjection_Abort) Marshal() (dAtA []byte, err error)
- func (m *HTTPFaultInjection_Abort) MarshalTo(dAtA []byte) (int, error)
- func (*HTTPFaultInjection_Abort) ProtoMessage()
- func (m *HTTPFaultInjection_Abort) Reset()
- func (m *HTTPFaultInjection_Abort) Size() (n int)
- func (m *HTTPFaultInjection_Abort) String() string
- func (m *HTTPFaultInjection_Abort) Unmarshal(dAtA []byte) error
- 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() *google_protobuf.Duration
- func (m *HTTPFaultInjection_Delay) GetFixedDelay() *google_protobuf.Duration
- func (m *HTTPFaultInjection_Delay) GetHttpDelayType() isHTTPFaultInjection_Delay_HttpDelayType
- func (m *HTTPFaultInjection_Delay) GetPercent() int32
- func (m *HTTPFaultInjection_Delay) Marshal() (dAtA []byte, err error)
- func (m *HTTPFaultInjection_Delay) MarshalTo(dAtA []byte) (int, error)
- func (*HTTPFaultInjection_Delay) ProtoMessage()
- func (m *HTTPFaultInjection_Delay) Reset()
- func (m *HTTPFaultInjection_Delay) Size() (n int)
- func (m *HTTPFaultInjection_Delay) String() string
- func (m *HTTPFaultInjection_Delay) Unmarshal(dAtA []byte) error
- 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 (m *HTTPMatchRequest) Marshal() (dAtA []byte, err error)
- func (m *HTTPMatchRequest) MarshalTo(dAtA []byte) (int, error)
- func (*HTTPMatchRequest) ProtoMessage()
- func (m *HTTPMatchRequest) Reset()
- func (m *HTTPMatchRequest) Size() (n int)
- func (m *HTTPMatchRequest) String() string
- func (m *HTTPMatchRequest) Unmarshal(dAtA []byte) error
- type HTTPRedirect
- func (*HTTPRedirect) Descriptor() ([]byte, []int)
- func (m *HTTPRedirect) GetAuthority() string
- func (m *HTTPRedirect) GetUri() string
- func (m *HTTPRedirect) Marshal() (dAtA []byte, err error)
- func (m *HTTPRedirect) MarshalTo(dAtA []byte) (int, error)
- func (*HTTPRedirect) ProtoMessage()
- func (m *HTTPRedirect) Reset()
- func (m *HTTPRedirect) Size() (n int)
- func (m *HTTPRedirect) String() string
- func (m *HTTPRedirect) Unmarshal(dAtA []byte) error
- type HTTPRetry
- func (*HTTPRetry) Descriptor() ([]byte, []int)
- func (m *HTTPRetry) GetAttempts() int32
- func (m *HTTPRetry) GetPerTryTimeout() *google_protobuf.Duration
- func (m *HTTPRetry) Marshal() (dAtA []byte, err error)
- func (m *HTTPRetry) MarshalTo(dAtA []byte) (int, error)
- func (*HTTPRetry) ProtoMessage()
- func (m *HTTPRetry) Reset()
- func (m *HTTPRetry) Size() (n int)
- func (m *HTTPRetry) String() string
- func (m *HTTPRetry) Unmarshal(dAtA []byte) error
- type HTTPRewrite
- func (*HTTPRewrite) Descriptor() ([]byte, []int)
- func (m *HTTPRewrite) GetAuthority() string
- func (m *HTTPRewrite) GetUri() string
- func (m *HTTPRewrite) Marshal() (dAtA []byte, err error)
- func (m *HTTPRewrite) MarshalTo(dAtA []byte) (int, error)
- func (*HTTPRewrite) ProtoMessage()
- func (m *HTTPRewrite) Reset()
- func (m *HTTPRewrite) Size() (n int)
- func (m *HTTPRewrite) String() string
- func (m *HTTPRewrite) Unmarshal(dAtA []byte) error
- 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) GetRemoveResponseHeaders() []string
- func (m *HTTPRoute) GetRetries() *HTTPRetry
- func (m *HTTPRoute) GetRewrite() *HTTPRewrite
- func (m *HTTPRoute) GetRoute() []*DestinationWeight
- func (m *HTTPRoute) GetTimeout() *google_protobuf.Duration
- func (m *HTTPRoute) GetWebsocketUpgrade() bool
- func (m *HTTPRoute) Marshal() (dAtA []byte, err error)
- func (m *HTTPRoute) MarshalTo(dAtA []byte) (int, error)
- func (*HTTPRoute) ProtoMessage()
- func (m *HTTPRoute) Reset()
- func (m *HTTPRoute) Size() (n int)
- func (m *HTTPRoute) String() string
- func (m *HTTPRoute) Unmarshal(dAtA []byte) error
- 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 (m *L4MatchAttributes) Marshal() (dAtA []byte, err error)
- func (m *L4MatchAttributes) MarshalTo(dAtA []byte) (int, error)
- func (*L4MatchAttributes) ProtoMessage()
- func (m *L4MatchAttributes) Reset()
- func (m *L4MatchAttributes) Size() (n int)
- func (m *L4MatchAttributes) String() string
- func (m *L4MatchAttributes) Unmarshal(dAtA []byte) error
- 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 (m *LoadBalancerSettings) Marshal() (dAtA []byte, err error)
- func (m *LoadBalancerSettings) MarshalTo(dAtA []byte) (int, error)
- func (*LoadBalancerSettings) ProtoMessage()
- func (m *LoadBalancerSettings) Reset()
- func (m *LoadBalancerSettings) Size() (n int)
- func (m *LoadBalancerSettings) String() string
- func (m *LoadBalancerSettings) Unmarshal(dAtA []byte) error
- 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) GetHashKey() isLoadBalancerSettings_ConsistentHashLB_HashKey
- func (m *LoadBalancerSettings_ConsistentHashLB) GetHttpCookie() *LoadBalancerSettings_ConsistentHashLB_HTTPCookie
- func (m *LoadBalancerSettings_ConsistentHashLB) GetHttpHeaderName() string
- func (m *LoadBalancerSettings_ConsistentHashLB) GetMinimumRingSize() uint64
- func (m *LoadBalancerSettings_ConsistentHashLB) GetSourceIp() string
- func (m *LoadBalancerSettings_ConsistentHashLB) Marshal() (dAtA []byte, err error)
- func (m *LoadBalancerSettings_ConsistentHashLB) MarshalTo(dAtA []byte) (int, error)
- func (*LoadBalancerSettings_ConsistentHashLB) ProtoMessage()
- func (m *LoadBalancerSettings_ConsistentHashLB) Reset()
- func (m *LoadBalancerSettings_ConsistentHashLB) Size() (n int)
- func (m *LoadBalancerSettings_ConsistentHashLB) String() string
- func (m *LoadBalancerSettings_ConsistentHashLB) Unmarshal(dAtA []byte) error
- func (*LoadBalancerSettings_ConsistentHashLB) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type LoadBalancerSettings_ConsistentHashLB_HTTPCookie
- func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Descriptor() ([]byte, []int)
- func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetName() string
- func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetPath() string
- func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetTtl() *time.Duration
- func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Marshal() (dAtA []byte, err error)
- func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) MarshalTo(dAtA []byte) (int, error)
- func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) ProtoMessage()
- func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Reset()
- func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Size() (n int)
- func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) String() string
- func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Unmarshal(dAtA []byte) error
- type LoadBalancerSettings_ConsistentHashLB_HttpCookie
- type LoadBalancerSettings_ConsistentHashLB_HttpHeaderName
- type LoadBalancerSettings_ConsistentHashLB_SourceIp
- type LoadBalancerSettings_Simple
- type LoadBalancerSettings_SimpleLB
- type OutlierDetection
- func (*OutlierDetection) Descriptor() ([]byte, []int)
- func (m *OutlierDetection) GetBaseEjectionTime() *google_protobuf.Duration
- func (m *OutlierDetection) GetConsecutiveErrors() int32
- func (m *OutlierDetection) GetInterval() *google_protobuf.Duration
- func (m *OutlierDetection) GetMaxEjectionPercent() int32
- func (m *OutlierDetection) Marshal() (dAtA []byte, err error)
- func (m *OutlierDetection) MarshalTo(dAtA []byte) (int, error)
- func (*OutlierDetection) ProtoMessage()
- func (m *OutlierDetection) Reset()
- func (m *OutlierDetection) Size() (n int)
- func (m *OutlierDetection) String() string
- func (m *OutlierDetection) Unmarshal(dAtA []byte) error
- type Port
- func (*Port) Descriptor() ([]byte, []int)
- func (m *Port) GetName() string
- func (m *Port) GetNumber() uint32
- func (m *Port) GetProtocol() string
- func (m *Port) Marshal() (dAtA []byte, err error)
- func (m *Port) MarshalTo(dAtA []byte) (int, error)
- func (*Port) ProtoMessage()
- func (m *Port) Reset()
- func (m *Port) Size() (n int)
- func (m *Port) String() string
- func (m *Port) Unmarshal(dAtA []byte) error
- type PortSelector
- func (*PortSelector) Descriptor() ([]byte, []int)
- func (m *PortSelector) GetName() string
- func (m *PortSelector) GetNumber() uint32
- func (m *PortSelector) GetPort() isPortSelector_Port
- func (m *PortSelector) Marshal() (dAtA []byte, err error)
- func (m *PortSelector) MarshalTo(dAtA []byte) (int, error)
- func (*PortSelector) ProtoMessage()
- func (m *PortSelector) Reset()
- func (m *PortSelector) Size() (n int)
- func (m *PortSelector) String() string
- func (m *PortSelector) Unmarshal(dAtA []byte) error
- 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)
- func (m *Server) GetHosts() []string
- func (m *Server) GetPort() *Port
- func (m *Server) GetTls() *Server_TLSOptions
- func (m *Server) Marshal() (dAtA []byte, err error)
- func (m *Server) MarshalTo(dAtA []byte) (int, error)
- func (*Server) ProtoMessage()
- func (m *Server) Reset()
- func (m *Server) Size() (n int)
- func (m *Server) String() string
- func (m *Server) Unmarshal(dAtA []byte) error
- type Server_TLSOptions
- func (*Server_TLSOptions) Descriptor() ([]byte, []int)
- func (m *Server_TLSOptions) GetCaCertificates() string
- func (m *Server_TLSOptions) GetHttpsRedirect() bool
- func (m *Server_TLSOptions) GetMode() Server_TLSOptions_TLSmode
- func (m *Server_TLSOptions) GetPrivateKey() string
- func (m *Server_TLSOptions) GetServerCertificate() string
- func (m *Server_TLSOptions) GetSubjectAltNames() []string
- func (m *Server_TLSOptions) Marshal() (dAtA []byte, err error)
- func (m *Server_TLSOptions) MarshalTo(dAtA []byte) (int, error)
- func (*Server_TLSOptions) ProtoMessage()
- func (m *Server_TLSOptions) Reset()
- func (m *Server_TLSOptions) Size() (n int)
- func (m *Server_TLSOptions) String() string
- func (m *Server_TLSOptions) Unmarshal(dAtA []byte) error
- type Server_TLSOptions_TLSmode
- 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 (m *ServiceEntry) Marshal() (dAtA []byte, err error)
- func (m *ServiceEntry) MarshalTo(dAtA []byte) (int, error)
- func (*ServiceEntry) ProtoMessage()
- func (m *ServiceEntry) Reset()
- func (m *ServiceEntry) Size() (n int)
- func (m *ServiceEntry) String() string
- func (m *ServiceEntry) Unmarshal(dAtA []byte) error
- 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 (m *ServiceEntry_Endpoint) Marshal() (dAtA []byte, err error)
- func (m *ServiceEntry_Endpoint) MarshalTo(dAtA []byte) (int, error)
- func (*ServiceEntry_Endpoint) ProtoMessage()
- func (m *ServiceEntry_Endpoint) Reset()
- func (m *ServiceEntry_Endpoint) Size() (n int)
- func (m *ServiceEntry_Endpoint) String() string
- func (m *ServiceEntry_Endpoint) Unmarshal(dAtA []byte) error
- type ServiceEntry_Location
- type ServiceEntry_Resolution
- 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 (m *StringMatch) Marshal() (dAtA []byte, err error)
- func (m *StringMatch) MarshalTo(dAtA []byte) (int, error)
- func (*StringMatch) ProtoMessage()
- func (m *StringMatch) Reset()
- func (m *StringMatch) Size() (n int)
- func (m *StringMatch) String() string
- func (m *StringMatch) Unmarshal(dAtA []byte) error
- func (*StringMatch) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type StringMatch_Exact
- type StringMatch_Prefix
- type StringMatch_Regex
- type Subset
- func (*Subset) Descriptor() ([]byte, []int)
- func (m *Subset) GetLabels() map[string]string
- func (m *Subset) GetName() string
- func (m *Subset) GetTrafficPolicy() *TrafficPolicy
- func (m *Subset) Marshal() (dAtA []byte, err error)
- func (m *Subset) MarshalTo(dAtA []byte) (int, error)
- func (*Subset) ProtoMessage()
- func (m *Subset) Reset()
- func (m *Subset) Size() (n int)
- func (m *Subset) String() string
- func (m *Subset) Unmarshal(dAtA []byte) error
- type TCPRoute
- func (*TCPRoute) Descriptor() ([]byte, []int)
- func (m *TCPRoute) GetMatch() []*L4MatchAttributes
- func (m *TCPRoute) GetRoute() []*DestinationWeight
- func (m *TCPRoute) Marshal() (dAtA []byte, err error)
- func (m *TCPRoute) MarshalTo(dAtA []byte) (int, error)
- func (*TCPRoute) ProtoMessage()
- func (m *TCPRoute) Reset()
- func (m *TCPRoute) Size() (n int)
- func (m *TCPRoute) String() string
- func (m *TCPRoute) Unmarshal(dAtA []byte) error
- type TLSMatchAttributes
- func (*TLSMatchAttributes) Descriptor() ([]byte, []int)
- func (m *TLSMatchAttributes) GetDestinationSubnet() string
- func (m *TLSMatchAttributes) GetGateways() []string
- func (m *TLSMatchAttributes) GetPort() uint32
- func (m *TLSMatchAttributes) GetSniHosts() []string
- func (m *TLSMatchAttributes) GetSourceLabels() map[string]string
- func (m *TLSMatchAttributes) GetSourceSubnet() string
- func (m *TLSMatchAttributes) Marshal() (dAtA []byte, err error)
- func (m *TLSMatchAttributes) MarshalTo(dAtA []byte) (int, error)
- func (*TLSMatchAttributes) ProtoMessage()
- func (m *TLSMatchAttributes) Reset()
- func (m *TLSMatchAttributes) Size() (n int)
- func (m *TLSMatchAttributes) String() string
- func (m *TLSMatchAttributes) Unmarshal(dAtA []byte) error
- type TLSRoute
- func (*TLSRoute) Descriptor() ([]byte, []int)
- func (m *TLSRoute) GetMatch() []*TLSMatchAttributes
- func (m *TLSRoute) GetRoute() []*DestinationWeight
- func (m *TLSRoute) Marshal() (dAtA []byte, err error)
- func (m *TLSRoute) MarshalTo(dAtA []byte) (int, error)
- func (*TLSRoute) ProtoMessage()
- func (m *TLSRoute) Reset()
- func (m *TLSRoute) Size() (n int)
- func (m *TLSRoute) String() string
- func (m *TLSRoute) Unmarshal(dAtA []byte) error
- 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 (m *TLSSettings) Marshal() (dAtA []byte, err error)
- func (m *TLSSettings) MarshalTo(dAtA []byte) (int, error)
- func (*TLSSettings) ProtoMessage()
- func (m *TLSSettings) Reset()
- func (m *TLSSettings) Size() (n int)
- func (m *TLSSettings) String() string
- func (m *TLSSettings) Unmarshal(dAtA []byte) error
- 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 (m *TrafficPolicy) Marshal() (dAtA []byte, err error)
- func (m *TrafficPolicy) MarshalTo(dAtA []byte) (int, error)
- func (*TrafficPolicy) ProtoMessage()
- func (m *TrafficPolicy) Reset()
- func (m *TrafficPolicy) Size() (n int)
- func (m *TrafficPolicy) String() string
- func (m *TrafficPolicy) Unmarshal(dAtA []byte) error
- 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 (m *TrafficPolicy_PortTrafficPolicy) Marshal() (dAtA []byte, err error)
- func (m *TrafficPolicy_PortTrafficPolicy) MarshalTo(dAtA []byte) (int, error)
- func (*TrafficPolicy_PortTrafficPolicy) ProtoMessage()
- func (m *TrafficPolicy_PortTrafficPolicy) Reset()
- func (m *TrafficPolicy_PortTrafficPolicy) Size() (n int)
- func (m *TrafficPolicy_PortTrafficPolicy) String() string
- func (m *TrafficPolicy_PortTrafficPolicy) Unmarshal(dAtA []byte) error
- 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 (m *VirtualService) GetTls() []*TLSRoute
- func (m *VirtualService) Marshal() (dAtA []byte, err error)
- func (m *VirtualService) MarshalTo(dAtA []byte) (int, error)
- func (*VirtualService) ProtoMessage()
- func (m *VirtualService) Reset()
- func (m *VirtualService) Size() (n int)
- func (m *VirtualService) String() string
- func (m *VirtualService) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthDestinationRule = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDestinationRule = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthEnvoyFilter = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEnvoyFilter = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthGateway = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGateway = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthServiceEntry = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowServiceEntry = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthVirtualService = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowVirtualService = fmt.Errorf("proto: integer overflow") )
var EnvoyFilter_Filter_FilterType_name = map[int32]string{
0: "INVALID",
1: "HTTP",
2: "NETWORK",
}
var EnvoyFilter_Filter_FilterType_value = map[string]int32{
"INVALID": 0,
"HTTP": 1,
"NETWORK": 2,
}
var EnvoyFilter_InsertPosition_Index_name = map[int32]string{
0: "FIRST",
1: "LAST",
2: "BEFORE",
3: "AFTER",
}
var EnvoyFilter_InsertPosition_Index_value = map[string]int32{
"FIRST": 0,
"LAST": 1,
"BEFORE": 2,
"AFTER": 3,
}
var EnvoyFilter_ListenerMatch_ListenerProtocol_name = map[int32]string{
0: "ALL",
1: "HTTP",
2: "TCP",
}
var EnvoyFilter_ListenerMatch_ListenerProtocol_value = map[string]int32{
"ALL": 0,
"HTTP": 1,
"TCP": 2,
}
var EnvoyFilter_ListenerMatch_ListenerType_name = map[int32]string{
0: "ANY",
1: "SIDECAR_INBOUND",
2: "SIDECAR_OUTBOUND",
3: "GATEWAY",
}
var EnvoyFilter_ListenerMatch_ListenerType_value = map[string]int32{
"ANY": 0,
"SIDECAR_INBOUND": 1,
"SIDECAR_OUTBOUND": 2,
"GATEWAY": 3,
}
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 Server_TLSOptions_TLSmode_name = map[int32]string{
0: "PASSTHROUGH",
1: "SIMPLE",
2: "MUTUAL",
}
var Server_TLSOptions_TLSmode_value = map[string]int32{
"PASSTHROUGH": 0,
"SIMPLE": 1,
"MUTUAL": 2,
}
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 TLSSettings_TLSmode_name = map[int32]string{
0: "DISABLE",
1: "SIMPLE",
2: "MUTUAL",
3: "ISTIO_MUTUAL",
}
var TLSSettings_TLSmode_value = map[string]int32{
"DISABLE": 0,
"SIMPLE": 1,
"MUTUAL": 2,
"ISTIO_MUTUAL": 3,
}
Functions ¶
This section is empty.
Types ¶
type ConnectionPoolSettings ¶
type ConnectionPoolSettings struct { // Settings common to both HTTP and TCP upstream connections. Tcp *ConnectionPoolSettings_TCPSettings `protobuf:"bytes,1,opt,name=tcp" json:"tcp,omitempty"` // HTTP connection pool settings. Http *ConnectionPoolSettings_HTTPSettings `protobuf:"bytes,2,opt,name=http" json:"http,omitempty"` }
Connection pool settings for an upstream host. The settings apply to each individual host in the upstream service. See Envoy's [circuit breaker](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/circuit_breaking) for more details. Connection pool settings can be applied at the TCP level as well as at HTTP level.
For example, the following rule sets a limit of 100 connections to redis service called myredissrv with a connect timeout of 30ms
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: bookinfo-redis
spec:
host: myredissrv.prod.svc.cluster.local trafficPolicy: connectionPool: tcp: maxConnections: 100 connectTimeout: 30ms
```
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) Marshal ¶
func (m *ConnectionPoolSettings) Marshal() (dAtA []byte, err error)
func (*ConnectionPoolSettings) MarshalTo ¶
func (m *ConnectionPoolSettings) MarshalTo(dAtA []byte) (int, error)
func (*ConnectionPoolSettings) ProtoMessage ¶
func (*ConnectionPoolSettings) ProtoMessage()
func (*ConnectionPoolSettings) Reset ¶
func (m *ConnectionPoolSettings) Reset()
func (*ConnectionPoolSettings) Size ¶
func (m *ConnectionPoolSettings) Size() (n int)
func (*ConnectionPoolSettings) String ¶
func (m *ConnectionPoolSettings) String() string
func (*ConnectionPoolSettings) Unmarshal ¶
func (m *ConnectionPoolSettings) Unmarshal(dAtA []byte) error
type ConnectionPoolSettings_HTTPSettings ¶
type ConnectionPoolSettings_HTTPSettings struct { // Maximum number of pending HTTP requests to a destination. Default 1024. Http1MaxPendingRequests int32 `` /* 135-byte string literal not displayed */ // Maximum number of requests to a backend. Default 1024. Http2MaxRequests int32 `protobuf:"varint,2,opt,name=http2_max_requests,json=http2MaxRequests,proto3" json:"http2_max_requests,omitempty"` // Maximum number of requests per connection to a backend. Setting this // parameter to 1 disables keep alive. MaxRequestsPerConnection int32 `` /* 138-byte string literal not displayed */ // Maximum number of retries that can be outstanding to all hosts in a // cluster at a given time. Defaults to 3. MaxRetries int32 `protobuf:"varint,4,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"` }
Settings applicable to HTTP1.1/HTTP2/GRPC connections.
func (*ConnectionPoolSettings_HTTPSettings) Descriptor ¶
func (*ConnectionPoolSettings_HTTPSettings) Descriptor() ([]byte, []int)
func (*ConnectionPoolSettings_HTTPSettings) GetHttp1MaxPendingRequests ¶
func (m *ConnectionPoolSettings_HTTPSettings) GetHttp1MaxPendingRequests() int32
func (*ConnectionPoolSettings_HTTPSettings) GetHttp2MaxRequests ¶
func (m *ConnectionPoolSettings_HTTPSettings) GetHttp2MaxRequests() int32
func (*ConnectionPoolSettings_HTTPSettings) GetMaxRequestsPerConnection ¶
func (m *ConnectionPoolSettings_HTTPSettings) GetMaxRequestsPerConnection() int32
func (*ConnectionPoolSettings_HTTPSettings) GetMaxRetries ¶
func (m *ConnectionPoolSettings_HTTPSettings) GetMaxRetries() int32
func (*ConnectionPoolSettings_HTTPSettings) Marshal ¶
func (m *ConnectionPoolSettings_HTTPSettings) Marshal() (dAtA []byte, err error)
func (*ConnectionPoolSettings_HTTPSettings) MarshalTo ¶
func (m *ConnectionPoolSettings_HTTPSettings) MarshalTo(dAtA []byte) (int, error)
func (*ConnectionPoolSettings_HTTPSettings) ProtoMessage ¶
func (*ConnectionPoolSettings_HTTPSettings) ProtoMessage()
func (*ConnectionPoolSettings_HTTPSettings) Reset ¶
func (m *ConnectionPoolSettings_HTTPSettings) Reset()
func (*ConnectionPoolSettings_HTTPSettings) Size ¶
func (m *ConnectionPoolSettings_HTTPSettings) Size() (n int)
func (*ConnectionPoolSettings_HTTPSettings) String ¶
func (m *ConnectionPoolSettings_HTTPSettings) String() string
func (*ConnectionPoolSettings_HTTPSettings) Unmarshal ¶
func (m *ConnectionPoolSettings_HTTPSettings) Unmarshal(dAtA []byte) error
type ConnectionPoolSettings_TCPSettings ¶
type ConnectionPoolSettings_TCPSettings struct { // Maximum number of HTTP1 /TCP connections to a destination host. MaxConnections int32 `protobuf:"varint,1,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"` // TCP connection timeout. ConnectTimeout *google_protobuf.Duration `protobuf:"bytes,2,opt,name=connect_timeout,json=connectTimeout" json:"connect_timeout,omitempty"` }
Settings common to both HTTP and TCP upstream connections.
func (*ConnectionPoolSettings_TCPSettings) Descriptor ¶
func (*ConnectionPoolSettings_TCPSettings) Descriptor() ([]byte, []int)
func (*ConnectionPoolSettings_TCPSettings) GetConnectTimeout ¶
func (m *ConnectionPoolSettings_TCPSettings) GetConnectTimeout() *google_protobuf.Duration
func (*ConnectionPoolSettings_TCPSettings) GetMaxConnections ¶
func (m *ConnectionPoolSettings_TCPSettings) GetMaxConnections() int32
func (*ConnectionPoolSettings_TCPSettings) Marshal ¶
func (m *ConnectionPoolSettings_TCPSettings) Marshal() (dAtA []byte, err error)
func (*ConnectionPoolSettings_TCPSettings) MarshalTo ¶
func (m *ConnectionPoolSettings_TCPSettings) MarshalTo(dAtA []byte) (int, error)
func (*ConnectionPoolSettings_TCPSettings) ProtoMessage ¶
func (*ConnectionPoolSettings_TCPSettings) ProtoMessage()
func (*ConnectionPoolSettings_TCPSettings) Reset ¶
func (m *ConnectionPoolSettings_TCPSettings) Reset()
func (*ConnectionPoolSettings_TCPSettings) Size ¶
func (m *ConnectionPoolSettings_TCPSettings) Size() (n int)
func (*ConnectionPoolSettings_TCPSettings) String ¶
func (m *ConnectionPoolSettings_TCPSettings) String() string
func (*ConnectionPoolSettings_TCPSettings) Unmarshal ¶
func (m *ConnectionPoolSettings_TCPSettings) Unmarshal(dAtA []byte) error
type CorsPolicy ¶
type CorsPolicy struct { // The list of origins that are allowed to perform CORS requests. The // content will be serialized into the Access-Control-Allow-Origin // header. Wildcard * will allow all origins. AllowOrigin []string `protobuf:"bytes,1,rep,name=allow_origin,json=allowOrigin" json:"allow_origin,omitempty"` // List of HTTP methods allowed to access the resource. The content will // be serialized into the Access-Control-Allow-Methods header. AllowMethods []string `protobuf:"bytes,2,rep,name=allow_methods,json=allowMethods" json:"allow_methods,omitempty"` // List of HTTP headers that can be used when requesting the // resource. Serialized to Access-Control-Allow-Methods header. AllowHeaders []string `protobuf:"bytes,3,rep,name=allow_headers,json=allowHeaders" json:"allow_headers,omitempty"` // A white list of HTTP headers that the browsers are allowed to // access. Serialized into Access-Control-Expose-Headers header. ExposeHeaders []string `protobuf:"bytes,4,rep,name=expose_headers,json=exposeHeaders" json:"expose_headers,omitempty"` // Specifies how long the the results of a preflight request can be // cached. Translates to the Access-Control-Max-Age header. MaxAge *google_protobuf.Duration `protobuf:"bytes,5,opt,name=max_age,json=maxAge" json:"max_age,omitempty"` // Indicates whether the caller is allowed to send the actual request // (not the preflight) using credentials. Translates to // Access-Control-Allow-Credentials header. AllowCredentials *google_protobuf1.BoolValue `protobuf:"bytes,6,opt,name=allow_credentials,json=allowCredentials" json:"allow_credentials,omitempty"` }
Describes the Cross-Origin Resource Sharing (CORS) policy, for a given service. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS for further details about cross origin resource sharing. For example, the following rule restricts cross origin requests to those originating from example.com domain using HTTP POST/GET, and sets the Access-Control-Allow-Credentials header to false. In addition, it only exposes X-Foo-bar header and sets an expiry period of 1 day.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: ratings-route
spec:
hosts: - ratings.prod.svc.cluster.local http: - route: - destination: host: ratings.prod.svc.cluster.local subset: v1 corsPolicy: allowOrigin: - example.com allowMethods: - POST - GET allowCredentials: false allowHeaders: - X-Foo-Bar maxAge: "1d"
```
func (*CorsPolicy) Descriptor ¶
func (*CorsPolicy) Descriptor() ([]byte, []int)
func (*CorsPolicy) GetAllowCredentials ¶
func (m *CorsPolicy) GetAllowCredentials() *google_protobuf1.BoolValue
func (*CorsPolicy) GetAllowHeaders ¶
func (m *CorsPolicy) GetAllowHeaders() []string
func (*CorsPolicy) GetAllowMethods ¶
func (m *CorsPolicy) GetAllowMethods() []string
func (*CorsPolicy) GetAllowOrigin ¶
func (m *CorsPolicy) GetAllowOrigin() []string
func (*CorsPolicy) GetExposeHeaders ¶
func (m *CorsPolicy) GetExposeHeaders() []string
func (*CorsPolicy) GetMaxAge ¶
func (m *CorsPolicy) GetMaxAge() *google_protobuf.Duration
func (*CorsPolicy) Marshal ¶
func (m *CorsPolicy) Marshal() (dAtA []byte, err error)
func (*CorsPolicy) ProtoMessage ¶
func (*CorsPolicy) ProtoMessage()
func (*CorsPolicy) Reset ¶
func (m *CorsPolicy) Reset()
func (*CorsPolicy) Size ¶
func (m *CorsPolicy) Size() (n int)
func (*CorsPolicy) String ¶
func (m *CorsPolicy) String() string
func (*CorsPolicy) Unmarshal ¶
func (m *CorsPolicy) Unmarshal(dAtA []byte) error
type Destination ¶
type Destination struct { // REQUIRED. The 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. If a service // exposes only a single port it is not required to explicitly select the // port. 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.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: reviews-route namespace: foo
spec:
hosts: - reviews # interpreted as reviews.foo.svc.cluster.local http: - match: - uri: prefix: "/wpcatalog" - uri: prefix: "/consumercatalog" rewrite: uri: "/newcatalog" route: - destination: host: reviews # interpreted as reviews.foo.svc.cluster.local subset: v2 - route: - destination: host: reviews # interpreted as reviews.foo.svc.cluster.local subset: v1
```
And the associated DestinationRule ¶
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: reviews-destination namespace: foo
spec:
host: reviews # interpreted as reviews.foo.svc.cluster.local subsets: - name: v1 labels: version: v1 - name: v2 labels: version: v2
```
The following VirtualService sets a timeout of 5s for all calls to productpage.prod.svc.cluster.local service in Kubernetes. Notice that there are no subsets defined in this rule. Istio will fetch all instances of productpage.prod.svc.cluster.local service from the service registry and populate the sidecar's load balancing pool. Also, notice that this rule is set in the istio-system namespace but uses the fully qualified domain name of the productpage service, productpage.prod.svc.cluster.local. Therefore the rule's namespace does not have an impact in resolving the name of the productpage service.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: my-productpage-rule namespace: istio-system
spec:
hosts: - productpage.prod.svc.cluster.local # ignores rule namespace http: - timeout: 5s route: - destination: host: productpage.prod.svc.cluster.local
```
To control routing for traffic bound to services outside the mesh, external services must first be added to Istio's internal service registry using the ServiceEntry resource. VirtualServices can then be defined to control traffic bound to these external services. For example, the following rules define a Service for wikipedia.org and set a timeout of 5s for http requests.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:
name: external-svc-wikipedia
spec:
hosts: - wikipedia.org location: MESH_EXTERNAL ports: - number: 80 name: example-http protocol: HTTP resolution: DNS
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: my-wiki-rule
spec:
hosts: - wikipedia.org http: - timeout: 5s route: - destination: host: wikipedia.org
```
func (*Destination) 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) Marshal ¶
func (m *Destination) Marshal() (dAtA []byte, err error)
func (*Destination) ProtoMessage ¶
func (*Destination) ProtoMessage()
func (*Destination) Reset ¶
func (m *Destination) Reset()
func (*Destination) Size ¶
func (m *Destination) Size() (n int)
func (*Destination) String ¶
func (m *Destination) String() string
func (*Destination) Unmarshal ¶
func (m *Destination) Unmarshal(dAtA []byte) error
type DestinationRule ¶
type DestinationRule struct { // REQUIRED. The 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=trafficPolicy" json:"traffic_policy,omitempty"` // One or more named sets that represent individual versions of a // service. Traffic policies can be overridden at subset level. Subsets []*Subset `protobuf:"bytes,3,rep,name=subsets" json:"subsets,omitempty"` }
`DestinationRule` defines policies that apply to traffic intended for a service after routing has occurred. These rules specify configuration for load balancing, connection pool size from the sidecar, and outlier detection settings to detect and evict unhealthy hosts from the load balancing pool. For example, a simple load balancing policy for the ratings service would look as follows:
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: bookinfo-ratings
spec:
host: ratings.prod.svc.cluster.local trafficPolicy: loadBalancer: simple: LEAST_CONN
```
Version specific policies can be specified by defining a named `subset` and overriding the settings specified at the service level. The following rule uses a round robin load balancing policy for all traffic going to a subset named testversion that is composed of endpoints (e.g., pods) with labels (version:v3).
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: bookinfo-ratings
spec:
host: ratings.prod.svc.cluster.local trafficPolicy: loadBalancer: simple: LEAST_CONN subsets: - name: testversion labels: version: v3 trafficPolicy: loadBalancer: simple: ROUND_ROBIN
```
**Note:** Policies specified for subsets will not take effect until a route rule explicitly sends traffic to this subset.
Traffic policies can be customized to specific ports as well. The following rule uses the least connection load balancing policy for all traffic to port 80, while uses a round robin load balancing setting for traffic to the port 9080.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: bookinfo-ratings-port
spec:
host: ratings.prod.svc.cluster.local trafficPolicy: # Apply to all ports portLevelSettings: - port: number: 80 loadBalancer: simple: LEAST_CONN - port: number: 9080 loadBalancer: simple: ROUND_ROBIN
```
func (*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) Marshal ¶
func (m *DestinationRule) Marshal() (dAtA []byte, err error)
func (*DestinationRule) ProtoMessage ¶
func (*DestinationRule) ProtoMessage()
func (*DestinationRule) Reset ¶
func (m *DestinationRule) Reset()
func (*DestinationRule) Size ¶
func (m *DestinationRule) Size() (n int)
func (*DestinationRule) String ¶
func (m *DestinationRule) String() string
func (*DestinationRule) Unmarshal ¶
func (m *DestinationRule) Unmarshal(dAtA []byte) error
type DestinationWeight ¶
type DestinationWeight struct { // REQUIRED. Destination uniquely identifies the instances of a service // to which the request/connection should be forwarded to. Destination *Destination `protobuf:"bytes,1,opt,name=destination" json:"destination,omitempty"` // REQUIRED. The proportion of traffic to be forwarded to the service // version. (0-100). Sum of weights across destinations SHOULD BE == 100. // If there is only destination in a rule, the weight value is assumed to // be 100. Weight int32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` }
Each routing rule is associated with one or more service versions (see glossary in beginning of document). Weights associated with the version determine the proportion of traffic it receives. For example, the following rule will route 25% of traffic for the "reviews" service to instances with the "v2" tag and the remaining traffic (i.e., 75%) to "v1".
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: reviews-route
spec:
hosts: - reviews.prod.svc.cluster.local http: - route: - destination: host: reviews.prod.svc.cluster.local subset: v2 weight: 25 - destination: host: reviews.prod.svc.cluster.local subset: v1 weight: 75
```
And the associated DestinationRule ¶
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: reviews-destination
spec:
host: reviews.prod.svc.cluster.local subsets: - name: v1 labels: version: v1 - name: v2 labels: version: v2
```
Traffic can also be split across two entirely different services without having to define new subsets. For example, the following rule forwards 25% of traffic to reviews.com to dev.reviews.com
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: reviews-route-two-domains
spec:
hosts: - reviews.com http: - route: - destination: host: dev.reviews.com weight: 25 - destination: host: reviews.com weight: 75
```
func (*DestinationWeight) Descriptor ¶
func (*DestinationWeight) Descriptor() ([]byte, []int)
func (*DestinationWeight) GetDestination ¶
func (m *DestinationWeight) GetDestination() *Destination
func (*DestinationWeight) GetWeight ¶
func (m *DestinationWeight) GetWeight() int32
func (*DestinationWeight) Marshal ¶
func (m *DestinationWeight) Marshal() (dAtA []byte, err error)
func (*DestinationWeight) MarshalTo ¶
func (m *DestinationWeight) MarshalTo(dAtA []byte) (int, error)
func (*DestinationWeight) ProtoMessage ¶
func (*DestinationWeight) ProtoMessage()
func (*DestinationWeight) Reset ¶
func (m *DestinationWeight) Reset()
func (*DestinationWeight) Size ¶
func (m *DestinationWeight) Size() (n int)
func (*DestinationWeight) String ¶
func (m *DestinationWeight) String() string
func (*DestinationWeight) Unmarshal ¶
func (m *DestinationWeight) Unmarshal(dAtA []byte) error
type EnvoyFilter ¶
type EnvoyFilter struct { // One or more labels that indicate a specific set of pods/VMs whose // proxies should be configured to use these additional filters. The // scope of label search is platform dependent. On Kubernetes, for // example, the scope includes pods running in all reachable // namespaces. Omitting the selector applies the filter to all proxies in // the mesh. // NOTE: There can be only one EnvoyFilter bound to a specific workload. // The behavior is undefined if multiple EnvoyFilter configurations are // specified for the same workload. WorkloadLabels map[string]string `` /* 184-byte string literal not displayed */ // REQUIRED: Envoy network filters/http filters to be added to matching // listeners. When adding network filters to http connections, care // should be taken to ensure that the filter is added before // envoy.http_connection_manager. Filters []*EnvoyFilter_Filter `protobuf:"bytes,2,rep,name=filters" json:"filters,omitempty"` }
`EnvoyFilter` describes Envoy proxy-specific filters that can be used to customize the Envoy proxy configuration generated by Istio networking subsystem (Pilot). This feature must be used with care, as incorrect configurations could potentially destabilize the entire mesh.
NOTE 1: Since this is break glass configuration, there will not be any backward compatibility across different Istio releases. In other words, this configuration is subject to change based on internal implementation of Istio networking subsystem.
NOTE 2: There can be only one EnvoyFilter bound to a specific workload. The behavior is undefined if multiple EnvoyFilter configurations are specified for the same workload.
The following example for Kubernetes enables Envoy's Lua filter for all inbound calls arriving at service port 8080 of the reviews service pod with labels "app: reviews".
```yaml apiVersion: networking.istio.io/v1alpha3 kind: EnvoyFilter metadata:
name: reviews-lua
spec:
workloadLabels: app: reviews filters: - listenerMatch: portNumber: 8080 listenerType: SIDECAR_INBOUND #will match with the inbound listener for reviews:8080 filterName: envoy.lua filterType: HTTP filterConfig: inlineCode: | ... lua code ...
```
func (*EnvoyFilter) Descriptor ¶
func (*EnvoyFilter) Descriptor() ([]byte, []int)
func (*EnvoyFilter) GetFilters ¶
func (m *EnvoyFilter) GetFilters() []*EnvoyFilter_Filter
func (*EnvoyFilter) GetWorkloadLabels ¶
func (m *EnvoyFilter) GetWorkloadLabels() map[string]string
func (*EnvoyFilter) Marshal ¶
func (m *EnvoyFilter) Marshal() (dAtA []byte, err error)
func (*EnvoyFilter) ProtoMessage ¶
func (*EnvoyFilter) ProtoMessage()
func (*EnvoyFilter) Reset ¶
func (m *EnvoyFilter) Reset()
func (*EnvoyFilter) Size ¶
func (m *EnvoyFilter) Size() (n int)
func (*EnvoyFilter) String ¶
func (m *EnvoyFilter) String() string
func (*EnvoyFilter) Unmarshal ¶
func (m *EnvoyFilter) Unmarshal(dAtA []byte) error
type EnvoyFilter_Filter ¶
type EnvoyFilter_Filter struct { // Filter will be added to the listner only if the match conditions are true. // If not specified, the filters will be applied to all listeners. ListenerMatch *EnvoyFilter_ListenerMatch `protobuf:"bytes,1,opt,name=listener_match,json=listenerMatch" json:"listener_match,omitempty"` // Insert position in the filter chain. Defaults to FIRST InsertPosition *EnvoyFilter_InsertPosition `protobuf:"bytes,2,opt,name=insert_position,json=insertPosition" json:"insert_position,omitempty"` // REQUIRED: The type of filter to instantiate. FilterType EnvoyFilter_Filter_FilterType `` /* 153-byte string literal not displayed */ // REQUIRED: The name of the filter to instantiate. The name must match a supported // filter _compiled into_ Envoy. FilterName string `protobuf:"bytes,4,opt,name=filter_name,json=filterName,proto3" json:"filter_name,omitempty"` // REQUIRED: Filter specific configuration which depends on the filter being // instantiated. FilterConfig *google_protobuf3.Struct `protobuf:"bytes,5,opt,name=filter_config,json=filterConfig" json:"filter_config,omitempty"` }
Envoy filters to be added to a network or http filter chain.
func (*EnvoyFilter_Filter) Descriptor ¶
func (*EnvoyFilter_Filter) Descriptor() ([]byte, []int)
func (*EnvoyFilter_Filter) GetFilterConfig ¶
func (m *EnvoyFilter_Filter) GetFilterConfig() *google_protobuf3.Struct
func (*EnvoyFilter_Filter) GetFilterName ¶
func (m *EnvoyFilter_Filter) GetFilterName() string
func (*EnvoyFilter_Filter) GetFilterType ¶
func (m *EnvoyFilter_Filter) GetFilterType() EnvoyFilter_Filter_FilterType
func (*EnvoyFilter_Filter) GetInsertPosition ¶
func (m *EnvoyFilter_Filter) GetInsertPosition() *EnvoyFilter_InsertPosition
func (*EnvoyFilter_Filter) GetListenerMatch ¶
func (m *EnvoyFilter_Filter) GetListenerMatch() *EnvoyFilter_ListenerMatch
func (*EnvoyFilter_Filter) Marshal ¶
func (m *EnvoyFilter_Filter) Marshal() (dAtA []byte, err error)
func (*EnvoyFilter_Filter) MarshalTo ¶
func (m *EnvoyFilter_Filter) MarshalTo(dAtA []byte) (int, error)
func (*EnvoyFilter_Filter) ProtoMessage ¶
func (*EnvoyFilter_Filter) ProtoMessage()
func (*EnvoyFilter_Filter) Reset ¶
func (m *EnvoyFilter_Filter) Reset()
func (*EnvoyFilter_Filter) Size ¶
func (m *EnvoyFilter_Filter) Size() (n int)
func (*EnvoyFilter_Filter) String ¶
func (m *EnvoyFilter_Filter) String() string
func (*EnvoyFilter_Filter) Unmarshal ¶
func (m *EnvoyFilter_Filter) Unmarshal(dAtA []byte) error
type EnvoyFilter_Filter_FilterType ¶
type EnvoyFilter_Filter_FilterType int32
const ( // placeholder EnvoyFilter_Filter_INVALID EnvoyFilter_Filter_FilterType = 0 // Http filter EnvoyFilter_Filter_HTTP EnvoyFilter_Filter_FilterType = 1 // Network filter EnvoyFilter_Filter_NETWORK EnvoyFilter_Filter_FilterType = 2 )
func (EnvoyFilter_Filter_FilterType) EnumDescriptor ¶
func (EnvoyFilter_Filter_FilterType) EnumDescriptor() ([]byte, []int)
func (EnvoyFilter_Filter_FilterType) String ¶
func (x EnvoyFilter_Filter_FilterType) String() string
type EnvoyFilter_InsertPosition ¶
type EnvoyFilter_InsertPosition struct { // Position of this filter in the filter chain. Index EnvoyFilter_InsertPosition_Index `` /* 128-byte string literal not displayed */ // If BEFORE or AFTER position is specified, specify the name of the // filter relative to which this filter should be inserted. RelativeTo string `protobuf:"bytes,2,opt,name=relative_to,json=relativeTo,proto3" json:"relative_to,omitempty"` }
Indicates the relative index in the filter chain where the filter should be inserted.
func (*EnvoyFilter_InsertPosition) Descriptor ¶
func (*EnvoyFilter_InsertPosition) Descriptor() ([]byte, []int)
func (*EnvoyFilter_InsertPosition) GetIndex ¶
func (m *EnvoyFilter_InsertPosition) GetIndex() EnvoyFilter_InsertPosition_Index
func (*EnvoyFilter_InsertPosition) GetRelativeTo ¶
func (m *EnvoyFilter_InsertPosition) GetRelativeTo() string
func (*EnvoyFilter_InsertPosition) Marshal ¶
func (m *EnvoyFilter_InsertPosition) Marshal() (dAtA []byte, err error)
func (*EnvoyFilter_InsertPosition) MarshalTo ¶
func (m *EnvoyFilter_InsertPosition) MarshalTo(dAtA []byte) (int, error)
func (*EnvoyFilter_InsertPosition) ProtoMessage ¶
func (*EnvoyFilter_InsertPosition) ProtoMessage()
func (*EnvoyFilter_InsertPosition) Reset ¶
func (m *EnvoyFilter_InsertPosition) Reset()
func (*EnvoyFilter_InsertPosition) Size ¶
func (m *EnvoyFilter_InsertPosition) Size() (n int)
func (*EnvoyFilter_InsertPosition) String ¶
func (m *EnvoyFilter_InsertPosition) String() string
func (*EnvoyFilter_InsertPosition) Unmarshal ¶
func (m *EnvoyFilter_InsertPosition) Unmarshal(dAtA []byte) error
type EnvoyFilter_InsertPosition_Index ¶
type EnvoyFilter_InsertPosition_Index int32
Index/position in the filter chain.
const ( // Insert first EnvoyFilter_InsertPosition_FIRST EnvoyFilter_InsertPosition_Index = 0 // Insert last EnvoyFilter_InsertPosition_LAST EnvoyFilter_InsertPosition_Index = 1 // Insert before the named filter. EnvoyFilter_InsertPosition_BEFORE EnvoyFilter_InsertPosition_Index = 2 // Insert after the named filter. EnvoyFilter_InsertPosition_AFTER EnvoyFilter_InsertPosition_Index = 3 )
func (EnvoyFilter_InsertPosition_Index) EnumDescriptor ¶
func (EnvoyFilter_InsertPosition_Index) EnumDescriptor() ([]byte, []int)
func (EnvoyFilter_InsertPosition_Index) String ¶
func (x EnvoyFilter_InsertPosition_Index) String() string
type EnvoyFilter_ListenerMatch ¶
type EnvoyFilter_ListenerMatch struct { // The service port/gateway port to which traffic is being // sent/received. If not specified, matches all listeners. Eventhough // inbound listeners are generated for the instance/pod ports, only // service ports should be used to match listeners. PortNumber uint32 `protobuf:"varint,1,opt,name=port_number,json=portNumber,proto3" json:"port_number,omitempty"` // Instead of using specific port numbers, a set of ports matching a // given port name prefix can be selected. E.g., "mongo" selects ports // named mongo-port, mongo, mongoDB, MONGO, etc. Matching is case // insensitive. PortNamePrefix string `protobuf:"bytes,2,opt,name=port_name_prefix,json=portNamePrefix,proto3" json:"port_name_prefix,omitempty"` // Inbound vs outbound sidecar listener or gateway listener. If not specified, // matches all listeners. ListenerType EnvoyFilter_ListenerMatch_ListenerType `` /* 168-byte string literal not displayed */ // Selects a class of listeners for the same protocol. If not // specified, applies to listeners on all protocols. Use the protocol // selection to select all HTTP listeners (includes HTTP2/gRPC/HTTPS // where Envoy terminates TLS) or all TCP listeners (includes HTTPS // passthrough using SNI). ListenerProtocol EnvoyFilter_ListenerMatch_ListenerProtocol `` /* 184-byte string literal not displayed */ // One or more IP addresses to which the listener is bound. If // specified, should match atleast one address in the list. Address []string `protobuf:"bytes,5,rep,name=address" json:"address,omitempty"` }
Select a listener to add the filter to based on the match conditions. All conditions specified in the ListenerMatch must be met for the filter to be applied to a listener.
func (*EnvoyFilter_ListenerMatch) Descriptor ¶
func (*EnvoyFilter_ListenerMatch) Descriptor() ([]byte, []int)
func (*EnvoyFilter_ListenerMatch) GetAddress ¶
func (m *EnvoyFilter_ListenerMatch) GetAddress() []string
func (*EnvoyFilter_ListenerMatch) GetListenerProtocol ¶
func (m *EnvoyFilter_ListenerMatch) GetListenerProtocol() EnvoyFilter_ListenerMatch_ListenerProtocol
func (*EnvoyFilter_ListenerMatch) GetListenerType ¶
func (m *EnvoyFilter_ListenerMatch) GetListenerType() EnvoyFilter_ListenerMatch_ListenerType
func (*EnvoyFilter_ListenerMatch) GetPortNamePrefix ¶
func (m *EnvoyFilter_ListenerMatch) GetPortNamePrefix() string
func (*EnvoyFilter_ListenerMatch) GetPortNumber ¶
func (m *EnvoyFilter_ListenerMatch) GetPortNumber() uint32
func (*EnvoyFilter_ListenerMatch) Marshal ¶
func (m *EnvoyFilter_ListenerMatch) Marshal() (dAtA []byte, err error)
func (*EnvoyFilter_ListenerMatch) MarshalTo ¶
func (m *EnvoyFilter_ListenerMatch) MarshalTo(dAtA []byte) (int, error)
func (*EnvoyFilter_ListenerMatch) ProtoMessage ¶
func (*EnvoyFilter_ListenerMatch) ProtoMessage()
func (*EnvoyFilter_ListenerMatch) Reset ¶
func (m *EnvoyFilter_ListenerMatch) Reset()
func (*EnvoyFilter_ListenerMatch) Size ¶
func (m *EnvoyFilter_ListenerMatch) Size() (n int)
func (*EnvoyFilter_ListenerMatch) String ¶
func (m *EnvoyFilter_ListenerMatch) String() string
func (*EnvoyFilter_ListenerMatch) Unmarshal ¶
func (m *EnvoyFilter_ListenerMatch) Unmarshal(dAtA []byte) error
type EnvoyFilter_ListenerMatch_ListenerProtocol ¶
type EnvoyFilter_ListenerMatch_ListenerProtocol int32
const ( // All protocols EnvoyFilter_ListenerMatch_ALL EnvoyFilter_ListenerMatch_ListenerProtocol = 0 // HTTP or HTTPS (with termination) / HTTP2/gRPC EnvoyFilter_ListenerMatch_HTTP EnvoyFilter_ListenerMatch_ListenerProtocol = 1 // Any non-HTTP listener EnvoyFilter_ListenerMatch_TCP EnvoyFilter_ListenerMatch_ListenerProtocol = 2 )
func (EnvoyFilter_ListenerMatch_ListenerProtocol) EnumDescriptor ¶
func (EnvoyFilter_ListenerMatch_ListenerProtocol) EnumDescriptor() ([]byte, []int)
func (EnvoyFilter_ListenerMatch_ListenerProtocol) String ¶
func (x EnvoyFilter_ListenerMatch_ListenerProtocol) String() string
type EnvoyFilter_ListenerMatch_ListenerType ¶
type EnvoyFilter_ListenerMatch_ListenerType int32
const ( // All listeners EnvoyFilter_ListenerMatch_ANY EnvoyFilter_ListenerMatch_ListenerType = 0 // Inbound listener in sidecar EnvoyFilter_ListenerMatch_SIDECAR_INBOUND EnvoyFilter_ListenerMatch_ListenerType = 1 // Outbound listener in sidecar EnvoyFilter_ListenerMatch_SIDECAR_OUTBOUND EnvoyFilter_ListenerMatch_ListenerType = 2 // Gateway listener EnvoyFilter_ListenerMatch_GATEWAY EnvoyFilter_ListenerMatch_ListenerType = 3 )
func (EnvoyFilter_ListenerMatch_ListenerType) EnumDescriptor ¶
func (EnvoyFilter_ListenerMatch_ListenerType) EnumDescriptor() ([]byte, []int)
func (EnvoyFilter_ListenerMatch_ListenerType) String ¶
func (x EnvoyFilter_ListenerMatch_ListenerType) String() string
type Gateway ¶
type Gateway struct { // REQUIRED: A list of server specifications. Servers []*Server `protobuf:"bytes,1,rep,name=servers" json:"servers,omitempty"` // REQUIRED: One or more labels that indicate a specific set of pods/VMs // on which this gateway configuration should be applied. // The scope of label search is platform dependent. // On Kubernetes, for example, the scope includes pods running in // all reachable namespaces. Selector map[string]string `` /* 150-byte string literal not displayed */ }
`Gateway` describes a load balancer operating at the edge of the mesh receiving incoming or outgoing HTTP/TCP connections. The specification describes a set of ports that should be exposed, the type of protocol to use, SNI configuration for the load balancer, etc.
For example, the following Gateway 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.
```yaml 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 301 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 hosts: - "*" - port: number: 2379 # to expose internal service via external port 2379 name: mongo protocol: MONGO hosts: - "*"
``` The Gateway specification above describes the L4-L6 properties of a load balancer. A `VirtualService` can then be bound to a gateway to control the forwarding of traffic arriving at a particular host or gateway port.
For example, the following VirtualService splits traffic for "https://uk.bookinfo.com/reviews", "https://eu.bookinfo.com/reviews", "http://uk.bookinfo.com:9080/reviews", "http://eu.bookinfo.com:9080/reviews" into two versions (prod and qa) of an internal reviews service on port 9080. In addition, requests containing the cookie "user: dev-123" will be sent to special port 7777 in the qa version. The same rule is also applicable inside the mesh for requests to the "reviews.prod.svc.cluster.local" service. This rule is applicable across ports 443, 9080. Note that "http://uk.bookinfo.com" gets redirected to "https://uk.bookinfo.com" (i.e. 80 redirects to 443).
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: bookinfo-rule
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 host: reviews.qa.svc.cluster.local - match: uri: prefix: /reviews/ route: - destination: port: number: 9080 # can be omitted if its the only port for reviews host: reviews.prod.svc.cluster.local weight: 80 - destination: host: reviews.qa.svc.cluster.local weight: 20
```
The following VirtualService forwards traffic arriving at (external) port 27017 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`.
```yaml 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: 27017 sourceSubnet: "172.17.16.0/24" route: - destination: host: mongo.prod.svc.cluster.local port: number: 5555
```
func (*Gateway) Descriptor ¶
func (*Gateway) GetSelector ¶
func (*Gateway) GetServers ¶
func (*Gateway) ProtoMessage ¶
func (*Gateway) ProtoMessage()
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) Marshal ¶
func (m *HTTPFaultInjection) Marshal() (dAtA []byte, err error)
func (*HTTPFaultInjection) MarshalTo ¶
func (m *HTTPFaultInjection) MarshalTo(dAtA []byte) (int, error)
func (*HTTPFaultInjection) ProtoMessage ¶
func (*HTTPFaultInjection) ProtoMessage()
func (*HTTPFaultInjection) Reset ¶
func (m *HTTPFaultInjection) Reset()
func (*HTTPFaultInjection) Size ¶
func (m *HTTPFaultInjection) Size() (n int)
func (*HTTPFaultInjection) String ¶
func (m *HTTPFaultInjection) String() string
func (*HTTPFaultInjection) Unmarshal ¶
func (m *HTTPFaultInjection) Unmarshal(dAtA []byte) error
type HTTPFaultInjection_Abort ¶
type HTTPFaultInjection_Abort struct { // Percentage of requests to be aborted with the error code provided (0-100). Percent int32 `protobuf:"varint,1,opt,name=percent,proto3" json:"percent,omitempty"` // Types that are valid to be assigned to ErrorType: // *HTTPFaultInjection_Abort_HttpStatus // *HTTPFaultInjection_Abort_GrpcStatus // *HTTPFaultInjection_Abort_Http2Error ErrorType isHTTPFaultInjection_Abort_ErrorType `protobuf_oneof:"error_type"` }
Abort specification is used to prematurely abort a request with a pre-specified error code. The following example will return an HTTP 400 error code for 10% of the requests to the "ratings" service "v1".
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: ratings-route
spec:
hosts: - ratings.prod.svc.cluster.local http: - route: - destination: host: ratings.prod.svc.cluster.local subset: v1 fault: abort: percent: 10 httpStatus: 400
```
The _httpStatus_ field is used to indicate the HTTP status code to return to the caller. The optional _percent_ field, a value between 0 and 100, is used to only abort a certain percentage of requests. If not specified, all requests are aborted.
func (*HTTPFaultInjection_Abort) Descriptor ¶
func (*HTTPFaultInjection_Abort) Descriptor() ([]byte, []int)
func (*HTTPFaultInjection_Abort) GetErrorType ¶
func (m *HTTPFaultInjection_Abort) GetErrorType() isHTTPFaultInjection_Abort_ErrorType
func (*HTTPFaultInjection_Abort) GetGrpcStatus ¶
func (m *HTTPFaultInjection_Abort) GetGrpcStatus() string
func (*HTTPFaultInjection_Abort) GetHttp2Error ¶
func (m *HTTPFaultInjection_Abort) GetHttp2Error() string
func (*HTTPFaultInjection_Abort) GetHttpStatus ¶
func (m *HTTPFaultInjection_Abort) GetHttpStatus() int32
func (*HTTPFaultInjection_Abort) GetPercent ¶
func (m *HTTPFaultInjection_Abort) GetPercent() int32
func (*HTTPFaultInjection_Abort) Marshal ¶
func (m *HTTPFaultInjection_Abort) Marshal() (dAtA []byte, err error)
func (*HTTPFaultInjection_Abort) MarshalTo ¶
func (m *HTTPFaultInjection_Abort) MarshalTo(dAtA []byte) (int, error)
func (*HTTPFaultInjection_Abort) ProtoMessage ¶
func (*HTTPFaultInjection_Abort) ProtoMessage()
func (*HTTPFaultInjection_Abort) Reset ¶
func (m *HTTPFaultInjection_Abort) Reset()
func (*HTTPFaultInjection_Abort) Size ¶
func (m *HTTPFaultInjection_Abort) Size() (n int)
func (*HTTPFaultInjection_Abort) String ¶
func (m *HTTPFaultInjection_Abort) String() string
func (*HTTPFaultInjection_Abort) Unmarshal ¶
func (m *HTTPFaultInjection_Abort) Unmarshal(dAtA []byte) error
func (*HTTPFaultInjection_Abort) XXX_OneofFuncs ¶
func (*HTTPFaultInjection_Abort) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type HTTPFaultInjection_Abort_GrpcStatus ¶
type HTTPFaultInjection_Abort_GrpcStatus struct {
GrpcStatus string `protobuf:"bytes,3,opt,name=grpc_status,json=grpcStatus,proto3,oneof"`
}
func (*HTTPFaultInjection_Abort_GrpcStatus) MarshalTo ¶
func (m *HTTPFaultInjection_Abort_GrpcStatus) MarshalTo(dAtA []byte) (int, error)
func (*HTTPFaultInjection_Abort_GrpcStatus) Size ¶
func (m *HTTPFaultInjection_Abort_GrpcStatus) Size() (n int)
type HTTPFaultInjection_Abort_Http2Error ¶
type HTTPFaultInjection_Abort_Http2Error struct {
Http2Error string `protobuf:"bytes,4,opt,name=http2_error,json=http2Error,proto3,oneof"`
}
func (*HTTPFaultInjection_Abort_Http2Error) MarshalTo ¶
func (m *HTTPFaultInjection_Abort_Http2Error) MarshalTo(dAtA []byte) (int, error)
func (*HTTPFaultInjection_Abort_Http2Error) Size ¶
func (m *HTTPFaultInjection_Abort_Http2Error) Size() (n int)
type HTTPFaultInjection_Abort_HttpStatus ¶
type HTTPFaultInjection_Abort_HttpStatus struct {
HttpStatus int32 `protobuf:"varint,2,opt,name=http_status,json=httpStatus,proto3,oneof"`
}
func (*HTTPFaultInjection_Abort_HttpStatus) MarshalTo ¶
func (m *HTTPFaultInjection_Abort_HttpStatus) MarshalTo(dAtA []byte) (int, error)
func (*HTTPFaultInjection_Abort_HttpStatus) Size ¶
func (m *HTTPFaultInjection_Abort_HttpStatus) Size() (n int)
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
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: reviews-route
spec:
hosts: - reviews.prod.svc.cluster.local http: - match: - sourceLabels: env: prod route: - destination: host: reviews.prod.svc.cluster.local subset: v1 fault: delay: percent: 10 fixedDelay: 5s
```
The _fixedDelay_ field is used to indicate the amount of delay in seconds. An optional _percent_ field, a value between 0 and 100, can be used to only delay a certain percentage of requests. If left unspecified, all request will be delayed.
func (*HTTPFaultInjection_Delay) Descriptor ¶
func (*HTTPFaultInjection_Delay) Descriptor() ([]byte, []int)
func (*HTTPFaultInjection_Delay) GetExponentialDelay ¶
func (m *HTTPFaultInjection_Delay) GetExponentialDelay() *google_protobuf.Duration
func (*HTTPFaultInjection_Delay) GetFixedDelay ¶
func (m *HTTPFaultInjection_Delay) GetFixedDelay() *google_protobuf.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) Marshal ¶
func (m *HTTPFaultInjection_Delay) Marshal() (dAtA []byte, err error)
func (*HTTPFaultInjection_Delay) MarshalTo ¶
func (m *HTTPFaultInjection_Delay) MarshalTo(dAtA []byte) (int, error)
func (*HTTPFaultInjection_Delay) ProtoMessage ¶
func (*HTTPFaultInjection_Delay) ProtoMessage()
func (*HTTPFaultInjection_Delay) Reset ¶
func (m *HTTPFaultInjection_Delay) Reset()
func (*HTTPFaultInjection_Delay) Size ¶
func (m *HTTPFaultInjection_Delay) Size() (n int)
func (*HTTPFaultInjection_Delay) String ¶
func (m *HTTPFaultInjection_Delay) String() string
func (*HTTPFaultInjection_Delay) Unmarshal ¶
func (m *HTTPFaultInjection_Delay) Unmarshal(dAtA []byte) error
func (*HTTPFaultInjection_Delay) XXX_OneofFuncs ¶
func (*HTTPFaultInjection_Delay) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type HTTPFaultInjection_Delay_ExponentialDelay ¶
type HTTPFaultInjection_Delay_ExponentialDelay struct {
ExponentialDelay *google_protobuf.Duration `protobuf:"bytes,3,opt,name=exponential_delay,json=exponentialDelay,oneof"`
}
func (*HTTPFaultInjection_Delay_ExponentialDelay) MarshalTo ¶
func (m *HTTPFaultInjection_Delay_ExponentialDelay) MarshalTo(dAtA []byte) (int, error)
func (*HTTPFaultInjection_Delay_ExponentialDelay) Size ¶
func (m *HTTPFaultInjection_Delay_ExponentialDelay) Size() (n int)
type HTTPFaultInjection_Delay_FixedDelay ¶
type HTTPFaultInjection_Delay_FixedDelay struct {
FixedDelay *google_protobuf.Duration `protobuf:"bytes,2,opt,name=fixed_delay,json=fixedDelay,oneof"`
}
func (*HTTPFaultInjection_Delay_FixedDelay) MarshalTo ¶
func (m *HTTPFaultInjection_Delay_FixedDelay) MarshalTo(dAtA []byte) (int, error)
func (*HTTPFaultInjection_Delay_FixedDelay) Size ¶
func (m *HTTPFaultInjection_Delay_FixedDelay) Size() (n int)
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 `` /* 178-byte string literal not displayed */ // Names of gateways where the rule should be applied to. Gateway names // at the top of the VirtualService (if any) are overridden. The gateway match is // independent of sourceLabels. Gateways []string `protobuf:"bytes,8,rep,name=gateways" json:"gateways,omitempty"` }
HttpMatchRequest specifies a set of criterion to be met in order for the rule to be applied to the HTTP request. For example, the following restricts the rule to match only requests where the URL path starts with /ratings/v2/ and the request contains a `cookie` with value `user=jason`.
```yaml 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) Marshal ¶
func (m *HTTPMatchRequest) Marshal() (dAtA []byte, err error)
func (*HTTPMatchRequest) ProtoMessage ¶
func (*HTTPMatchRequest) ProtoMessage()
func (*HTTPMatchRequest) Reset ¶
func (m *HTTPMatchRequest) Reset()
func (*HTTPMatchRequest) Size ¶
func (m *HTTPMatchRequest) Size() (n int)
func (*HTTPMatchRequest) String ¶
func (m *HTTPMatchRequest) String() string
func (*HTTPMatchRequest) Unmarshal ¶
func (m *HTTPMatchRequest) Unmarshal(dAtA []byte) error
type HTTPRedirect ¶
type HTTPRedirect struct { // On a redirect, overwrite the Path portion of the URL with this // value. Note that the entire path will be replaced, irrespective of the // request URI being matched as an exact path or prefix. Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` // On a redirect, overwrite the Authority/Host portion of the URL with // this value. Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` }
HTTPRedirect can be used to send a 301 redirect response to the caller, where the Authority/Host and the URI in the response can be swapped with the specified values. For example, the following rule redirects requests for /v1/getProductRatings API on the ratings service to /v1/bookRatings provided by the bookratings service.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: ratings-route
spec:
hosts: - ratings.prod.svc.cluster.local http: - match: - uri: exact: /v1/getProductRatings redirect: uri: /v1/bookRatings authority: newratings.default.svc.cluster.local ...
```
func (*HTTPRedirect) Descriptor ¶
func (*HTTPRedirect) Descriptor() ([]byte, []int)
func (*HTTPRedirect) GetAuthority ¶
func (m *HTTPRedirect) GetAuthority() string
func (*HTTPRedirect) GetUri ¶
func (m *HTTPRedirect) GetUri() string
func (*HTTPRedirect) Marshal ¶
func (m *HTTPRedirect) Marshal() (dAtA []byte, err error)
func (*HTTPRedirect) ProtoMessage ¶
func (*HTTPRedirect) ProtoMessage()
func (*HTTPRedirect) Reset ¶
func (m *HTTPRedirect) Reset()
func (*HTTPRedirect) Size ¶
func (m *HTTPRedirect) Size() (n int)
func (*HTTPRedirect) String ¶
func (m *HTTPRedirect) String() string
func (*HTTPRedirect) Unmarshal ¶
func (m *HTTPRedirect) Unmarshal(dAtA []byte) error
type HTTPRetry ¶
type HTTPRetry struct { // REQUIRED. Number of retries for a given request. The interval // between retries will be determined automatically (25ms+). Actual // number of retries attempted depends on the httpReqTimeout. Attempts int32 `protobuf:"varint,1,opt,name=attempts,proto3" json:"attempts,omitempty"` // Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms. PerTryTimeout *google_protobuf.Duration `protobuf:"bytes,2,opt,name=per_try_timeout,json=perTryTimeout" json:"per_try_timeout,omitempty"` }
Describes the retry policy to use when a HTTP request fails. For example, the following rule sets the maximum number of retries to 3 when calling ratings:v1 service, with a 2s timeout per retry attempt.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: ratings-route
spec:
hosts: - ratings.prod.svc.cluster.local http: - route: - destination: host: ratings.prod.svc.cluster.local subset: v1 retries: attempts: 3 perTryTimeout: 2s
```
func (*HTTPRetry) Descriptor ¶
func (*HTTPRetry) GetAttempts ¶
func (*HTTPRetry) GetPerTryTimeout ¶
func (m *HTTPRetry) GetPerTryTimeout() *google_protobuf.Duration
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.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: ratings-route
spec:
hosts: - ratings.prod.svc.cluster.local http: - match: - uri: prefix: /ratings rewrite: uri: /v1/bookRatings route: - destination: host: ratings.prod.svc.cluster.local subset: v1
```
func (*HTTPRewrite) Descriptor ¶
func (*HTTPRewrite) Descriptor() ([]byte, []int)
func (*HTTPRewrite) GetAuthority ¶
func (m *HTTPRewrite) GetAuthority() string
func (*HTTPRewrite) GetUri ¶
func (m *HTTPRewrite) GetUri() string
func (*HTTPRewrite) Marshal ¶
func (m *HTTPRewrite) Marshal() (dAtA []byte, err error)
func (*HTTPRewrite) ProtoMessage ¶
func (*HTTPRewrite) ProtoMessage()
func (*HTTPRewrite) Reset ¶
func (m *HTTPRewrite) Reset()
func (*HTTPRewrite) Size ¶
func (m *HTTPRewrite) Size() (n int)
func (*HTTPRewrite) String ¶
func (m *HTTPRewrite) String() string
func (*HTTPRewrite) Unmarshal ¶
func (m *HTTPRewrite) Unmarshal(dAtA []byte) error
type HTTPRoute ¶
type HTTPRoute struct { // Match conditions to be satisfied for the rule to be // activated. All conditions inside a single match block have AND // semantics, while the list of match blocks have OR semantics. The rule // is matched if any one of the match blocks succeed. Match []*HTTPMatchRequest `protobuf:"bytes,1,rep,name=match" json:"match,omitempty"` // A http rule can either redirect or forward (default) traffic. The // forwarding target can be one of several versions of a service (see // glossary in beginning of document). Weights associated with the // service version determine the proportion of traffic it receives. Route []*DestinationWeight `protobuf:"bytes,2,rep,name=route" json:"route,omitempty"` // A http rule can either redirect or forward (default) traffic. If // traffic passthrough option is specified in the rule, // route/redirect will be ignored. The redirect primitive can be used to // send a HTTP 301 redirect to a different URI or Authority. Redirect *HTTPRedirect `protobuf:"bytes,3,opt,name=redirect" json:"redirect,omitempty"` // Rewrite HTTP URIs and Authority headers. Rewrite cannot be used with // Redirect primitive. Rewrite will be performed before forwarding. Rewrite *HTTPRewrite `protobuf:"bytes,4,opt,name=rewrite" json:"rewrite,omitempty"` // Indicates that a HTTP/1.1 client connection to this particular route // should be allowed (and expected) to upgrade to a WebSocket connection. // The default is false. Istio's reference sidecar implementation (Envoy) // expects the first request to this route to contain the WebSocket // upgrade headers. Otherwise, the request will be rejected. Note that // Websocket allows secondary protocol negotiation which may then be // subject to further routing rules based on the protocol selected. WebsocketUpgrade bool `protobuf:"varint,5,opt,name=websocket_upgrade,json=websocketUpgrade,proto3" json:"websocket_upgrade,omitempty"` // Timeout for HTTP requests. Timeout *google_protobuf.Duration `protobuf:"bytes,6,opt,name=timeout" json:"timeout,omitempty"` // Retry policy for HTTP requests. Retries *HTTPRetry `protobuf:"bytes,7,opt,name=retries" json:"retries,omitempty"` // Fault injection policy to apply on HTTP traffic. Fault *HTTPFaultInjection `protobuf:"bytes,8,opt,name=fault" json:"fault,omitempty"` // Mirror HTTP traffic to a another destination in addition to forwarding // the requests to the intended destination. Mirrored traffic is on a // best effort basis where the sidecar/gateway will not wait for the // mirrored cluster to respond before returning the response from the // original destination. Statistics will be generated for the mirrored // destination. Mirror *Destination `protobuf:"bytes,9,opt,name=mirror" json:"mirror,omitempty"` // Cross-Origin Resource Sharing policy (CORS). Refer to // https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS // for further details about cross origin resource sharing. CorsPolicy *CorsPolicy `protobuf:"bytes,10,opt,name=cors_policy,json=corsPolicy" json:"cors_policy,omitempty"` // Additional HTTP headers to add before forwarding a request to the // destination service. AppendHeaders map[string]string `` /* 182-byte string literal not displayed */ // Http headers to remove before returning the response to the caller // $hide_from_docs RemoveResponseHeaders []string `protobuf:"bytes,12,rep,name=remove_response_headers,json=removeResponseHeaders" json:"remove_response_headers,omitempty"` }
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) GetRemoveResponseHeaders ¶
func (*HTTPRoute) GetRetries ¶
func (*HTTPRoute) GetRewrite ¶
func (m *HTTPRoute) GetRewrite() *HTTPRewrite
func (*HTTPRoute) GetRoute ¶
func (m *HTTPRoute) GetRoute() []*DestinationWeight
func (*HTTPRoute) GetTimeout ¶
func (m *HTTPRoute) GetTimeout() *google_protobuf.Duration
func (*HTTPRoute) GetWebsocketUpgrade ¶
func (*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,json=destinationSubnet,proto3" json:"destination_subnet,omitempty"` // Specifies the port on the host that is being addressed. Many services // only expose a single port or label ports with the protocols they support, // in these cases it is not required to explicitly select the port. 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 // $hide_from_docs SourceSubnet string `protobuf:"bytes,3,opt,name=source_subnet,json=sourceSubnet,proto3" json:"source_subnet,omitempty"` // One or more labels that constrain the applicability of a rule to // workloads with the given labels. If the VirtualService has a list of // gateways specified at the top, it should include the reserved gateway // `mesh` in order for this field to be applicable. SourceLabels map[string]string `` /* 178-byte string literal not displayed */ // Names of gateways where the rule should be applied to. Gateway names // at the top of the VirtualService (if any) are overridden. The gateway // match is independent of sourceLabels. Gateways []string `protobuf:"bytes,5,rep,name=gateways" json:"gateways,omitempty"` }
L4 connection match attributes. Note that L4 connection matching support is incomplete.
func (*L4MatchAttributes) Descriptor ¶
func (*L4MatchAttributes) Descriptor() ([]byte, []int)
func (*L4MatchAttributes) GetDestinationSubnet ¶
func (m *L4MatchAttributes) GetDestinationSubnet() string
func (*L4MatchAttributes) GetGateways ¶
func (m *L4MatchAttributes) GetGateways() []string
func (*L4MatchAttributes) GetPort ¶
func (m *L4MatchAttributes) GetPort() uint32
func (*L4MatchAttributes) GetSourceLabels ¶
func (m *L4MatchAttributes) GetSourceLabels() map[string]string
func (*L4MatchAttributes) GetSourceSubnet ¶
func (m *L4MatchAttributes) GetSourceSubnet() string
func (*L4MatchAttributes) Marshal ¶
func (m *L4MatchAttributes) Marshal() (dAtA []byte, err error)
func (*L4MatchAttributes) MarshalTo ¶
func (m *L4MatchAttributes) MarshalTo(dAtA []byte) (int, error)
func (*L4MatchAttributes) ProtoMessage ¶
func (*L4MatchAttributes) ProtoMessage()
func (*L4MatchAttributes) Reset ¶
func (m *L4MatchAttributes) Reset()
func (*L4MatchAttributes) Size ¶
func (m *L4MatchAttributes) Size() (n int)
func (*L4MatchAttributes) String ¶
func (m *L4MatchAttributes) String() string
func (*L4MatchAttributes) Unmarshal ¶
func (m *L4MatchAttributes) Unmarshal(dAtA []byte) error
type LoadBalancerSettings ¶
type LoadBalancerSettings struct { // Upstream load balancing policy. // // Types that are valid to be assigned to LbPolicy: // *LoadBalancerSettings_Simple // *LoadBalancerSettings_ConsistentHash LbPolicy isLoadBalancerSettings_LbPolicy `protobuf_oneof:"lb_policy"` }
Load balancing policies to apply for a specific destination. See Envoy's load balancing [documentation](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/load_balancing.html) for more details.
For example, the following rule uses a round robin load balancing policy for all traffic going to the ratings service.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: bookinfo-ratings
spec:
host: ratings.prod.svc.cluster.local trafficPolicy: loadBalancer: simple: ROUND_ROBIN
```
The following example sets up sticky sessions for the ratings service hashing-based load balancer for the same ratings service using the the User cookie as the hash key.
```yaml
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: bookinfo-ratings spec: host: ratings.prod.svc.cluster.local trafficPolicy: loadBalancer: consistentHash: httpCookie: name: user ttl: 0s
```
func (*LoadBalancerSettings) 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) Marshal ¶
func (m *LoadBalancerSettings) Marshal() (dAtA []byte, err error)
func (*LoadBalancerSettings) MarshalTo ¶
func (m *LoadBalancerSettings) MarshalTo(dAtA []byte) (int, error)
func (*LoadBalancerSettings) ProtoMessage ¶
func (*LoadBalancerSettings) ProtoMessage()
func (*LoadBalancerSettings) Reset ¶
func (m *LoadBalancerSettings) Reset()
func (*LoadBalancerSettings) Size ¶
func (m *LoadBalancerSettings) Size() (n int)
func (*LoadBalancerSettings) String ¶
func (m *LoadBalancerSettings) String() string
func (*LoadBalancerSettings) Unmarshal ¶
func (m *LoadBalancerSettings) Unmarshal(dAtA []byte) error
func (*LoadBalancerSettings) XXX_OneofFuncs ¶
func (*LoadBalancerSettings) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type LoadBalancerSettings_ConsistentHash ¶
type LoadBalancerSettings_ConsistentHash struct {
ConsistentHash *LoadBalancerSettings_ConsistentHashLB `protobuf:"bytes,2,opt,name=consistent_hash,json=consistentHash,oneof"`
}
func (*LoadBalancerSettings_ConsistentHash) MarshalTo ¶
func (m *LoadBalancerSettings_ConsistentHash) MarshalTo(dAtA []byte) (int, error)
func (*LoadBalancerSettings_ConsistentHash) Size ¶
func (m *LoadBalancerSettings_ConsistentHash) Size() (n int)
type LoadBalancerSettings_ConsistentHashLB ¶
type LoadBalancerSettings_ConsistentHashLB struct { // REQUIRED: The hash key to use. // // Types that are valid to be assigned to HashKey: // *LoadBalancerSettings_ConsistentHashLB_HttpHeaderName // *LoadBalancerSettings_ConsistentHashLB_HttpCookie // *LoadBalancerSettings_ConsistentHashLB_SourceIp HashKey isLoadBalancerSettings_ConsistentHashLB_HashKey `protobuf_oneof:"hash_key"` // The minimum number of virtual nodes to use for the hash // ring. Defaults to 1024. Larger ring sizes result in more granular // load distributions. If the number of hosts in the load balancing // pool is larger than the ring size, each host will be assigned a // single virtual node. MinimumRingSize uint64 `protobuf:"varint,4,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"` }
Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service.
func (*LoadBalancerSettings_ConsistentHashLB) Descriptor ¶
func (*LoadBalancerSettings_ConsistentHashLB) Descriptor() ([]byte, []int)
func (*LoadBalancerSettings_ConsistentHashLB) GetHashKey ¶
func (m *LoadBalancerSettings_ConsistentHashLB) GetHashKey() isLoadBalancerSettings_ConsistentHashLB_HashKey
func (*LoadBalancerSettings_ConsistentHashLB) GetHttpCookie ¶
func (m *LoadBalancerSettings_ConsistentHashLB) GetHttpCookie() *LoadBalancerSettings_ConsistentHashLB_HTTPCookie
func (*LoadBalancerSettings_ConsistentHashLB) GetHttpHeaderName ¶
func (m *LoadBalancerSettings_ConsistentHashLB) GetHttpHeaderName() string
func (*LoadBalancerSettings_ConsistentHashLB) GetMinimumRingSize ¶
func (m *LoadBalancerSettings_ConsistentHashLB) GetMinimumRingSize() uint64
func (*LoadBalancerSettings_ConsistentHashLB) GetSourceIp ¶
func (m *LoadBalancerSettings_ConsistentHashLB) GetSourceIp() string
func (*LoadBalancerSettings_ConsistentHashLB) Marshal ¶
func (m *LoadBalancerSettings_ConsistentHashLB) Marshal() (dAtA []byte, err error)
func (*LoadBalancerSettings_ConsistentHashLB) MarshalTo ¶
func (m *LoadBalancerSettings_ConsistentHashLB) MarshalTo(dAtA []byte) (int, error)
func (*LoadBalancerSettings_ConsistentHashLB) ProtoMessage ¶
func (*LoadBalancerSettings_ConsistentHashLB) ProtoMessage()
func (*LoadBalancerSettings_ConsistentHashLB) Reset ¶
func (m *LoadBalancerSettings_ConsistentHashLB) Reset()
func (*LoadBalancerSettings_ConsistentHashLB) Size ¶
func (m *LoadBalancerSettings_ConsistentHashLB) Size() (n int)
func (*LoadBalancerSettings_ConsistentHashLB) String ¶
func (m *LoadBalancerSettings_ConsistentHashLB) String() string
func (*LoadBalancerSettings_ConsistentHashLB) Unmarshal ¶
func (m *LoadBalancerSettings_ConsistentHashLB) Unmarshal(dAtA []byte) error
func (*LoadBalancerSettings_ConsistentHashLB) XXX_OneofFuncs ¶
func (*LoadBalancerSettings_ConsistentHashLB) 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_ConsistentHashLB_HTTPCookie ¶
type LoadBalancerSettings_ConsistentHashLB_HTTPCookie struct { // REQUIRED. Name of the cookie. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Path to set for the cookie. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // REQUIRED. Lifetime of the cookie. Ttl *time.Duration `protobuf:"bytes,3,opt,name=ttl,stdduration" json:"ttl,omitempty"` }
Describes a HTTP cookie that will be used as the hash key for the Consistent Hash load balancer. If the cookie is not present, it will be generated.
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Descriptor ¶
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Descriptor() ([]byte, []int)
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetName ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetName() string
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetPath ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetPath() string
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetTtl ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetTtl() *time.Duration
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Marshal ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Marshal() (dAtA []byte, err error)
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) MarshalTo ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) MarshalTo(dAtA []byte) (int, error)
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) ProtoMessage ¶
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) ProtoMessage()
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Reset ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Reset()
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Size ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Size() (n int)
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) String ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) String() string
func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Unmarshal ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Unmarshal(dAtA []byte) error
type LoadBalancerSettings_ConsistentHashLB_HttpCookie ¶
type LoadBalancerSettings_ConsistentHashLB_HttpCookie struct {
HttpCookie *LoadBalancerSettings_ConsistentHashLB_HTTPCookie `protobuf:"bytes,2,opt,name=http_cookie,json=httpCookie,oneof"`
}
func (*LoadBalancerSettings_ConsistentHashLB_HttpCookie) MarshalTo ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HttpCookie) MarshalTo(dAtA []byte) (int, error)
func (*LoadBalancerSettings_ConsistentHashLB_HttpCookie) Size ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HttpCookie) Size() (n int)
type LoadBalancerSettings_ConsistentHashLB_HttpHeaderName ¶
type LoadBalancerSettings_ConsistentHashLB_HttpHeaderName struct {
HttpHeaderName string `protobuf:"bytes,1,opt,name=http_header_name,json=httpHeaderName,proto3,oneof"`
}
func (*LoadBalancerSettings_ConsistentHashLB_HttpHeaderName) MarshalTo ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HttpHeaderName) MarshalTo(dAtA []byte) (int, error)
func (*LoadBalancerSettings_ConsistentHashLB_HttpHeaderName) Size ¶
func (m *LoadBalancerSettings_ConsistentHashLB_HttpHeaderName) Size() (n int)
type LoadBalancerSettings_ConsistentHashLB_SourceIp ¶
type LoadBalancerSettings_ConsistentHashLB_SourceIp struct {
SourceIp string `protobuf:"bytes,3,opt,name=source_ip,json=sourceIp,proto3,oneof"`
}
func (*LoadBalancerSettings_ConsistentHashLB_SourceIp) MarshalTo ¶
func (m *LoadBalancerSettings_ConsistentHashLB_SourceIp) MarshalTo(dAtA []byte) (int, error)
func (*LoadBalancerSettings_ConsistentHashLB_SourceIp) Size ¶
func (m *LoadBalancerSettings_ConsistentHashLB_SourceIp) Size() (n int)
type LoadBalancerSettings_Simple ¶
type LoadBalancerSettings_Simple struct {
Simple LoadBalancerSettings_SimpleLB `protobuf:"varint,1,opt,name=simple,proto3,enum=istio.networking.v1alpha3.LoadBalancerSettings_SimpleLB,oneof"`
}
func (*LoadBalancerSettings_Simple) MarshalTo ¶
func (m *LoadBalancerSettings_Simple) MarshalTo(dAtA []byte) (int, error)
func (*LoadBalancerSettings_Simple) Size ¶
func (m *LoadBalancerSettings_Simple) Size() (n int)
type LoadBalancerSettings_SimpleLB ¶
type LoadBalancerSettings_SimpleLB int32
Standard load balancing algorithms that require no tuning.
const ( // Round Robin policy. Default LoadBalancerSettings_ROUND_ROBIN LoadBalancerSettings_SimpleLB = 0 // The least request load balancer uses an O(1) algorithm which selects // two random healthy hosts and picks the host which has fewer active // requests. LoadBalancerSettings_LEAST_CONN LoadBalancerSettings_SimpleLB = 1 // The random load balancer selects a random healthy host. The random // load balancer generally performs better than round robin if no health // checking policy is configured. LoadBalancerSettings_RANDOM LoadBalancerSettings_SimpleLB = 2 // This option will forward the connection to the original IP address // requested by the caller without doing any form of load // balancing. This option must be used with care. It is meant for // advanced use cases. Refer to Original Destination load balancer in // Envoy for further details. LoadBalancerSettings_PASSTHROUGH LoadBalancerSettings_SimpleLB = 3 )
func (LoadBalancerSettings_SimpleLB) EnumDescriptor ¶
func (LoadBalancerSettings_SimpleLB) EnumDescriptor() ([]byte, []int)
func (LoadBalancerSettings_SimpleLB) String ¶
func (x LoadBalancerSettings_SimpleLB) String() string
type OutlierDetection ¶
type OutlierDetection struct { // Number of errors before a host is ejected from the connection // pool. Defaults to 5. When the upstream host is accessed over HTTP, a // 5xx return code qualifies as an error. When the upstream host is // accessed over an opaque TCP connection, connect timeouts and // connection error/failure events qualify as an error. ConsecutiveErrors int32 `protobuf:"varint,1,opt,name=consecutive_errors,json=consecutiveErrors,proto3" json:"consecutive_errors,omitempty"` // Time interval between ejection sweep analysis. format: // 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s. Interval *google_protobuf.Duration `protobuf:"bytes,2,opt,name=interval" json:"interval,omitempty"` // Minimum ejection duration. A host will remain ejected for a period // equal to the product of minimum ejection duration and the number of // times the host has been ejected. This technique allows the system to // automatically increase the ejection period for unhealthy upstream // servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s. BaseEjectionTime *google_protobuf.Duration `protobuf:"bytes,3,opt,name=base_ejection_time,json=baseEjectionTime" json:"base_ejection_time,omitempty"` // Maximum % of hosts in the load balancing pool for the upstream // service that can be ejected. Defaults to 10%. MaxEjectionPercent int32 `protobuf:"varint,4,opt,name=max_ejection_percent,json=maxEjectionPercent,proto3" json:"max_ejection_percent,omitempty"` }
A Circuit breaker implementation that tracks the status of each individual host in the upstream service. Applicable to both HTTP and TCP services. For HTTP services, hosts that continually return 5xx errors for API calls are ejected from the pool for a pre-defined period of time. For TCP services, connection timeouts or connection failures to a given host counts as an error when measuring the consecutive errors metric. See Envoy's [outlier detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/outlier) for more details.
The following rule sets a connection pool size of 100 connections and 1000 concurrent HTTP2 requests, with no more than 10 req/connection to "reviews" service. In addition, it configures upstream hosts to be scanned every 5 mins, such that any host that fails 7 consecutive times with 5XX error code will be ejected for 15 minutes.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: reviews-cb-policy
spec:
host: reviews.prod.svc.cluster.local trafficPolicy: connectionPool: tcp: maxConnections: 100 http: http2MaxRequests: 1000 maxRequestsPerConnection: 10 outlierDetection: consecutiveErrors: 7 interval: 5m baseEjectionTime: 15m
```
func (*OutlierDetection) Descriptor ¶
func (*OutlierDetection) Descriptor() ([]byte, []int)
func (*OutlierDetection) GetBaseEjectionTime ¶
func (m *OutlierDetection) GetBaseEjectionTime() *google_protobuf.Duration
func (*OutlierDetection) GetConsecutiveErrors ¶
func (m *OutlierDetection) GetConsecutiveErrors() int32
func (*OutlierDetection) GetInterval ¶
func (m *OutlierDetection) GetInterval() *google_protobuf.Duration
func (*OutlierDetection) GetMaxEjectionPercent ¶
func (m *OutlierDetection) GetMaxEjectionPercent() int32
func (*OutlierDetection) Marshal ¶
func (m *OutlierDetection) Marshal() (dAtA []byte, err error)
func (*OutlierDetection) ProtoMessage ¶
func (*OutlierDetection) ProtoMessage()
func (*OutlierDetection) Reset ¶
func (m *OutlierDetection) Reset()
func (*OutlierDetection) Size ¶
func (m *OutlierDetection) Size() (n int)
func (*OutlierDetection) String ¶
func (m *OutlierDetection) String() string
func (*OutlierDetection) Unmarshal ¶
func (m *OutlierDetection) Unmarshal(dAtA []byte) error
type 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|TLS. // 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"` }
Port describes the properties of a specific port of a service.
func (*Port) Descriptor ¶
func (*Port) GetProtocol ¶
func (*Port) ProtoMessage ¶
func (*Port) ProtoMessage()
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 number of a port to be used for matching or selection for final routing.
func (*PortSelector) Descriptor ¶
func (*PortSelector) Descriptor() ([]byte, []int)
func (*PortSelector) GetName ¶
func (m *PortSelector) GetName() string
func (*PortSelector) GetNumber ¶
func (m *PortSelector) GetNumber() uint32
func (*PortSelector) GetPort ¶
func (m *PortSelector) GetPort() isPortSelector_Port
func (*PortSelector) Marshal ¶
func (m *PortSelector) Marshal() (dAtA []byte, err error)
func (*PortSelector) ProtoMessage ¶
func (*PortSelector) ProtoMessage()
func (*PortSelector) Reset ¶
func (m *PortSelector) Reset()
func (*PortSelector) Size ¶
func (m *PortSelector) Size() (n int)
func (*PortSelector) String ¶
func (m *PortSelector) String() string
func (*PortSelector) Unmarshal ¶
func (m *PortSelector) Unmarshal(dAtA []byte) error
func (*PortSelector) XXX_OneofFuncs ¶
func (*PortSelector) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type PortSelector_Name ¶
type PortSelector_Name struct {
Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"`
}
func (*PortSelector_Name) MarshalTo ¶
func (m *PortSelector_Name) MarshalTo(dAtA []byte) (int, error)
func (*PortSelector_Name) Size ¶
func (m *PortSelector_Name) Size() (n int)
type PortSelector_Number ¶
type PortSelector_Number struct {
Number uint32 `protobuf:"varint,1,opt,name=number,proto3,oneof"`
}
func (*PortSelector_Number) MarshalTo ¶
func (m *PortSelector_Number) MarshalTo(dAtA []byte) (int, error)
func (*PortSelector_Number) Size ¶
func (m *PortSelector_Number) Size() (n int)
type Server ¶
type Server struct { // REQUIRED: The Port on which the proxy should listen for incoming // connections Port *Port `protobuf:"bytes,1,opt,name=port" json:"port,omitempty"` // REQUIRED. A list of hosts exposed by this gateway. At least one // host is required. While typically applicable to // HTTP services, it can also be used for TCP services using TLS with // SNI. May contain a wildcard prefix for the bottom-level component of // a domain name. For example `*.foo.com` matches `bar.foo.com` // and `*.com` matches `bar.foo.com`, `example.com`, and so on. // // **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" json:"hosts,omitempty"` // Set of TLS related options that govern the server's behavior. Use // these options to control if all http requests should be redirected to // https, and the TLS modes to use. Tls *Server_TLSOptions `protobuf:"bytes,3,opt,name=tls" json:"tls,omitempty"` }
`Server` describes the properties of the proxy on a given load balancer port. For example,
```yaml apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata:
name: my-ingress
spec:
selector: app: my-ingress-gateway servers: - port: number: 80 name: http2 protocol: HTTP2 hosts: - "*"
```
Another example ¶
```yaml apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata:
name: my-tcp-ingress
spec:
selector: app: my-tcp-ingress-gateway servers: - port: number: 27018 name: mongo protocol: MONGO hosts: - "*"
```
The following is an example of TLS configuration for port 443 ¶
```yaml apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata:
name: my-tls-ingress
spec:
selector: app: my-tls-ingress-gateway servers: - port: number: 443 name: https protocol: HTTPS hosts: - "*" tls: mode: SIMPLE serverCertificate: /etc/certs/server.pem privateKey: /etc/certs/privatekey.pem
```
func (*Server) Descriptor ¶
func (*Server) GetTls ¶
func (m *Server) GetTls() *Server_TLSOptions
func (*Server) ProtoMessage ¶
func (*Server) ProtoMessage()
type Server_TLSOptions ¶
type Server_TLSOptions struct { // If set to true, the load balancer will send a 301 redirect for all // http connections, asking the clients to use HTTPS. HttpsRedirect bool `protobuf:"varint,1,opt,name=https_redirect,json=httpsRedirect,proto3" json:"https_redirect,omitempty"` // Optional: Indicates whether connections to this port should be // secured using TLS. The value of this field determines how TLS is // enforced. Mode Server_TLSOptions_TLSmode `protobuf:"varint,2,opt,name=mode,proto3,enum=istio.networking.v1alpha3.Server_TLSOptions_TLSmode" json:"mode,omitempty"` // REQUIRED if mode is `SIMPLE` or `MUTUAL`. The path to the file // holding the server-side TLS certificate to use. ServerCertificate string `protobuf:"bytes,3,opt,name=server_certificate,json=serverCertificate,proto3" json:"server_certificate,omitempty"` // REQUIRED if mode is `SIMPLE` or `MUTUAL`. The path to the file // holding the server's private key. PrivateKey string `protobuf:"bytes,4,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // REQUIRED if mode is `MUTUAL`. The path to a file containing // certificate authority certificates to use in verifying a presented // client side certificate. CaCertificates string `protobuf:"bytes,5,opt,name=ca_certificates,json=caCertificates,proto3" json:"ca_certificates,omitempty"` // A list of alternate names to verify the subject identity in the // certificate presented by the client. SubjectAltNames []string `protobuf:"bytes,6,rep,name=subject_alt_names,json=subjectAltNames" json:"subject_alt_names,omitempty"` }
func (*Server_TLSOptions) Descriptor ¶
func (*Server_TLSOptions) Descriptor() ([]byte, []int)
func (*Server_TLSOptions) GetCaCertificates ¶
func (m *Server_TLSOptions) GetCaCertificates() string
func (*Server_TLSOptions) GetHttpsRedirect ¶
func (m *Server_TLSOptions) GetHttpsRedirect() bool
func (*Server_TLSOptions) GetMode ¶
func (m *Server_TLSOptions) GetMode() Server_TLSOptions_TLSmode
func (*Server_TLSOptions) GetPrivateKey ¶
func (m *Server_TLSOptions) GetPrivateKey() string
func (*Server_TLSOptions) GetServerCertificate ¶
func (m *Server_TLSOptions) GetServerCertificate() string
func (*Server_TLSOptions) GetSubjectAltNames ¶
func (m *Server_TLSOptions) GetSubjectAltNames() []string
func (*Server_TLSOptions) Marshal ¶
func (m *Server_TLSOptions) Marshal() (dAtA []byte, err error)
func (*Server_TLSOptions) MarshalTo ¶
func (m *Server_TLSOptions) MarshalTo(dAtA []byte) (int, error)
func (*Server_TLSOptions) ProtoMessage ¶
func (*Server_TLSOptions) ProtoMessage()
func (*Server_TLSOptions) Reset ¶
func (m *Server_TLSOptions) Reset()
func (*Server_TLSOptions) Size ¶
func (m *Server_TLSOptions) Size() (n int)
func (*Server_TLSOptions) String ¶
func (m *Server_TLSOptions) String() string
func (*Server_TLSOptions) Unmarshal ¶
func (m *Server_TLSOptions) Unmarshal(dAtA []byte) error
type Server_TLSOptions_TLSmode ¶
type Server_TLSOptions_TLSmode int32
TLS modes enforced by the proxy
const ( // 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) EnumDescriptor ¶
func (Server_TLSOptions_TLSmode) EnumDescriptor() ([]byte, []int)
func (Server_TLSOptions_TLSmode) String ¶
func (x Server_TLSOptions_TLSmode) String() string
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. Unix domain socket // addresses are not supported in this field. Addresses []string `protobuf:"bytes,2,rep,name=addresses" json:"addresses,omitempty"` // REQUIRED. The ports associated with the external service. If the // Endpoints are unix domain socket addresses, there must be exactly one // port. Ports []*Port `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.networking.v1alpha3.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 `` /* 129-byte string literal not displayed */ // 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.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:
name: external-svc-mongocluster
spec:
hosts: - mymongodb.somedomain # not used addresses: - 192.192.192.192/24 # VIPs ports: - number: 27018 name: mongodb protocol: MONGO location: MESH_INTERNAL resolution: STATIC endpoints: - address: 2.2.2.2 - address: 3.3.3.3
```
and the associated DestinationRule
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: mtls-mongocluster
spec:
host: mymongodb.somedomain trafficPolicy: tls: mode: MUTUAL clientCertificate: /etc/certs/myclientcert.pem privateKey: /etc/certs/client_private_key.pem caCertificates: /etc/certs/rootcacerts.pem
```
The following example uses a combination of service entry and TLS routing in virtual service to demonstrate the use of SNI routing to forward unterminated TLS traffic from the application to external services via the sidecar. The sidecar inspects the SNI value in the ClientHello message to route to the appropriate external service.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:
name: external-svc-https
spec:
hosts: - api.dropboxapi.com - www.googleapis.com - api.facebook.com location: MESH_EXTERNAL ports: - number: 443 name: https protocol: HTTPS resolution: DNS
```
And the associated VirtualService to route based on the SNI value.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: tls-routing
spec:
hosts: - api.dropboxapi.com - www.googleapis.com - api.facebook.com tls: - match: - port: 443 sniHosts: - api.dropboxapi.com route: - destination: host: api.dropboxapi.com - match: - port: 443 sniHosts: - www.googleapis.com route: - destination: host: www.googleapis.com - match: - port: 443 sniHosts: - api.facebook.com route: - destination: host: api.facebook.com
```
The following example demonstrates the use of a dedicated egress gateway through which all external service traffic is forwarded.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:
name: external-svc-httpbin
spec:
hosts: - httpbin.com location: MESH_EXTERNAL ports: - number: 80 name: http protocol: HTTP resolution: DNS
```
Define a gateway to handle all egress traffic.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata:
name: istio-egressgateway
spec:
selector: istio: egressgateway servers: - port: number: 80 name: http protocol: HTTP hosts: - "*"
```
And the associated VirtualService to route from the sidecar to the gateway service (istio-egressgateway.istio-system.svc.cluster.local), as well as route from the gateway to the external service.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: gateway-routing
spec:
hosts: - httpbin.com gateways: - mesh - istio-egressgateway http: - match: - port: 80 gateways: - mesh route: - destination: host: istio-egressgateway.istio-system.svc.cluster.local - match: - port: 80 gateway: - istio-egressgateway route: - destination: host: httpbin.com
```
The following example demonstrates the use of wildcards in the hosts for external services. If the connection has to be routed to the IP address requested by the application (i.e. application resolves DNS and attempts to connect to a specific IP), the discovery mode must be set to `NONE`.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:
name: external-svc-wildcard-example
spec:
hosts: - "*.bar.com" location: MESH_EXTERNAL ports: - number: 80 name: http protocol: HTTP resolution: NONE
```
The following example demonstrates a service that is available via a Unix Domain Socket on the host of the client. The resolution must be set to STATIC to use unix address endpoints.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:
name: unix-domain-socket-example
spec:
hosts: - "example.unix.local" location: MESH_EXTERNAL ports: - number: 80 name: http protocol: HTTP resolution: STATIC endpoints: - address: unix:///var/run/example/socket
```
For HTTP based services, it is possible to create a VirtualService backed by multiple DNS addressable endpoints. In such a scenario, the application can use the HTTP_PROXY environment variable to transparently reroute API calls for the VirtualService to a chosen backend. For example, the following configuration creates a non-existent external service called foo.bar.com backed by three domains: us.foo.bar.com:8080, uk.foo.bar.com:9080, and in.foo.bar.com:7080
```yaml apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:
name: external-svc-dns
spec:
hosts: - foo.bar.com location: MESH_EXTERNAL ports: - number: 80 name: https protocol: HTTP resolution: DNS endpoints: - address: us.foo.bar.com ports: https: 8080 - address: uk.foo.bar.com ports: https: 9080 - address: in.foo.bar.com ports: https: 7080
```
With HTTP_PROXY=http://localhost/, calls from the application to http://foo.bar.com will be load balanced across the three domains specified above. In other words, a call to http://foo.bar.com/baz would be translated to http://uk.foo.bar.com/baz.
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) Marshal ¶
func (m *ServiceEntry) Marshal() (dAtA []byte, err error)
func (*ServiceEntry) ProtoMessage ¶
func (*ServiceEntry) ProtoMessage()
func (*ServiceEntry) Reset ¶
func (m *ServiceEntry) Reset()
func (*ServiceEntry) Size ¶
func (m *ServiceEntry) Size() (n int)
func (*ServiceEntry) String ¶
func (m *ServiceEntry) String() string
func (*ServiceEntry) Unmarshal ¶
func (m *ServiceEntry) Unmarshal(dAtA []byte) error
type ServiceEntry_Endpoint ¶
type ServiceEntry_Endpoint struct { // REQUIRED: Address associated with the network endpoint without the // port. Domain names can be used if and only if the resolution is set // to DNS, and must be fully-qualified without wildcards. Use the form // unix:///absolute/path/to/socket for unix domain socket endpoints. Address string `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. Do not use for unix:// addresses. 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) Marshal ¶
func (m *ServiceEntry_Endpoint) Marshal() (dAtA []byte, err error)
func (*ServiceEntry_Endpoint) MarshalTo ¶
func (m *ServiceEntry_Endpoint) MarshalTo(dAtA []byte) (int, error)
func (*ServiceEntry_Endpoint) ProtoMessage ¶
func (*ServiceEntry_Endpoint) ProtoMessage()
func (*ServiceEntry_Endpoint) Reset ¶
func (m *ServiceEntry_Endpoint) Reset()
func (*ServiceEntry_Endpoint) Size ¶
func (m *ServiceEntry_Endpoint) Size() (n int)
func (*ServiceEntry_Endpoint) String ¶
func (m *ServiceEntry_Endpoint) String() string
func (*ServiceEntry_Endpoint) Unmarshal ¶
func (m *ServiceEntry_Endpoint) Unmarshal(dAtA []byte) error
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. DNS resolution cannot be used with unix // domain socket endpoints. 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 StringMatch ¶
type StringMatch struct { // Types that are valid to be assigned to MatchType: // *StringMatch_Exact // *StringMatch_Prefix // *StringMatch_Regex MatchType isStringMatch_MatchType `protobuf_oneof:"match_type"` }
Describes how to match a given string in HTTP headers. Match is case-sensitive.
func (*StringMatch) Descriptor ¶
func (*StringMatch) Descriptor() ([]byte, []int)
func (*StringMatch) GetExact ¶
func (m *StringMatch) GetExact() string
func (*StringMatch) GetMatchType ¶
func (m *StringMatch) GetMatchType() isStringMatch_MatchType
func (*StringMatch) GetPrefix ¶
func (m *StringMatch) GetPrefix() string
func (*StringMatch) GetRegex ¶
func (m *StringMatch) GetRegex() string
func (*StringMatch) Marshal ¶
func (m *StringMatch) Marshal() (dAtA []byte, err error)
func (*StringMatch) ProtoMessage ¶
func (*StringMatch) ProtoMessage()
func (*StringMatch) Reset ¶
func (m *StringMatch) Reset()
func (*StringMatch) Size ¶
func (m *StringMatch) Size() (n int)
func (*StringMatch) String ¶
func (m *StringMatch) String() string
func (*StringMatch) Unmarshal ¶
func (m *StringMatch) Unmarshal(dAtA []byte) error
func (*StringMatch) XXX_OneofFuncs ¶
func (*StringMatch) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type StringMatch_Exact ¶
type StringMatch_Exact struct {
Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"`
}
func (*StringMatch_Exact) MarshalTo ¶
func (m *StringMatch_Exact) MarshalTo(dAtA []byte) (int, error)
func (*StringMatch_Exact) Size ¶
func (m *StringMatch_Exact) Size() (n int)
type StringMatch_Prefix ¶
type StringMatch_Prefix struct {
Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"`
}
func (*StringMatch_Prefix) MarshalTo ¶
func (m *StringMatch_Prefix) MarshalTo(dAtA []byte) (int, error)
func (*StringMatch_Prefix) Size ¶
func (m *StringMatch_Prefix) Size() (n int)
type StringMatch_Regex ¶
type StringMatch_Regex struct {
Regex string `protobuf:"bytes,3,opt,name=regex,proto3,oneof"`
}
func (*StringMatch_Regex) MarshalTo ¶
func (m *StringMatch_Regex) MarshalTo(dAtA []byte) (int, error)
func (*StringMatch_Regex) Size ¶
func (m *StringMatch_Regex) Size() (n int)
type Subset ¶
type Subset struct { // REQUIRED. Name of the subset. The service name and the subset name can // be used for traffic splitting in a route rule. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // REQUIRED. Labels apply a filter over the endpoints of a service in the // service registry. See route rules for examples of usage. Labels map[string]string `` /* 146-byte string literal not displayed */ // Traffic policies that apply to this subset. Subsets inherit the // traffic policies specified at the DestinationRule level. Settings // specified at the subset level will override the corresponding settings // specified at the DestinationRule level. TrafficPolicy *TrafficPolicy `protobuf:"bytes,3,opt,name=traffic_policy,json=trafficPolicy" json:"traffic_policy,omitempty"` }
A subset of endpoints of a service. Subsets can be used for scenarios like A/B testing, or routing to a specific version of a service. Refer to VirtualService(#VirtualService) documentation for examples of using subsets in these scenarios. In addition, traffic policies defined at the service-level can be overridden at a subset-level. The following rule uses a round robin load balancing policy for all traffic going to a subset named testversion that is composed of endpoints (e.g., pods) with labels (version:v3).
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: bookinfo-ratings
spec:
host: ratings.prod.svc.cluster.local trafficPolicy: loadBalancer: simple: LEAST_CONN subsets: - name: testversion labels: version: v3 trafficPolicy: loadBalancer: simple: ROUND_ROBIN
```
**Note:** Policies specified for subsets will not take effect until a route rule explicitly sends traffic to this subset.
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 to another Mongo server on port 5555.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: bookinfo-Mongo
spec:
hosts: - mongo.prod.svc.cluster.local tcp: - match: - port: 27017 route: - destination: host: mongo.backup.svc.cluster.local port: number: 5555
```
func (*TCPRoute) Descriptor ¶
func (*TCPRoute) GetMatch ¶
func (m *TCPRoute) GetMatch() []*L4MatchAttributes
func (*TCPRoute) GetRoute ¶
func (m *TCPRoute) GetRoute() []*DestinationWeight
func (*TCPRoute) ProtoMessage ¶
func (*TCPRoute) ProtoMessage()
type TLSMatchAttributes ¶
type TLSMatchAttributes struct { // REQUIRED. SNI (server name indicator) to match on. Wildcard prefixes // can be used in the SNI value. E.g., *.com will match foo.example.com // as well as example.com. SniHosts []string `protobuf:"bytes,1,rep,name=sni_hosts,json=sniHosts" json:"sni_hosts,omitempty"` // 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,2,opt,name=destination_subnet,json=destinationSubnet,proto3" json:"destination_subnet,omitempty"` // Specifies the port on the host that is being addressed. Many services // only expose a single port or label ports with the protocols they // support, in these cases it is not required to explicitly select the // port. Port uint32 `protobuf:"varint,3,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 // $hide_from_docs SourceSubnet string `protobuf:"bytes,4,opt,name=source_subnet,json=sourceSubnet,proto3" json:"source_subnet,omitempty"` // One or more labels that constrain the applicability of a rule to // workloads with the given labels. If the VirtualService has a list of // gateways specified at the top, it should include the reserved gateway // `mesh` in order for this field to be applicable. SourceLabels map[string]string `` /* 178-byte string literal not displayed */ // Names of gateways where the rule should be applied to. Gateway names // at the top of the VirtualService (if any) are overridden. The gateway // match is independent of sourceLabels. Gateways []string `protobuf:"bytes,6,rep,name=gateways" json:"gateways,omitempty"` }
TLS connection match attributes.
func (*TLSMatchAttributes) Descriptor ¶
func (*TLSMatchAttributes) Descriptor() ([]byte, []int)
func (*TLSMatchAttributes) GetDestinationSubnet ¶
func (m *TLSMatchAttributes) GetDestinationSubnet() string
func (*TLSMatchAttributes) GetGateways ¶
func (m *TLSMatchAttributes) GetGateways() []string
func (*TLSMatchAttributes) GetPort ¶
func (m *TLSMatchAttributes) GetPort() uint32
func (*TLSMatchAttributes) GetSniHosts ¶
func (m *TLSMatchAttributes) GetSniHosts() []string
func (*TLSMatchAttributes) GetSourceLabels ¶
func (m *TLSMatchAttributes) GetSourceLabels() map[string]string
func (*TLSMatchAttributes) GetSourceSubnet ¶
func (m *TLSMatchAttributes) GetSourceSubnet() string
func (*TLSMatchAttributes) Marshal ¶
func (m *TLSMatchAttributes) Marshal() (dAtA []byte, err error)
func (*TLSMatchAttributes) MarshalTo ¶
func (m *TLSMatchAttributes) MarshalTo(dAtA []byte) (int, error)
func (*TLSMatchAttributes) ProtoMessage ¶
func (*TLSMatchAttributes) ProtoMessage()
func (*TLSMatchAttributes) Reset ¶
func (m *TLSMatchAttributes) Reset()
func (*TLSMatchAttributes) Size ¶
func (m *TLSMatchAttributes) Size() (n int)
func (*TLSMatchAttributes) String ¶
func (m *TLSMatchAttributes) String() string
func (*TLSMatchAttributes) Unmarshal ¶
func (m *TLSMatchAttributes) Unmarshal(dAtA []byte) error
type TLSRoute ¶
type TLSRoute struct { // REQUIRED. Match conditions to be satisfied for the rule to be // activated. All conditions inside a single match block have AND // semantics, while the list of match blocks have OR semantics. The rule // is matched if any one of the match blocks succeed. Match []*TLSMatchAttributes `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 TLS 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 unterminated TLS traffic (TLS/HTTPS) The following routing rule forwards unterminated TLS traffic arriving at port 443 of gateway called "mygateway" to internal services in the mesh based on the SNI value.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata:
name: bookinfo-sni
spec:
hosts: - "*.bookinfo.com" gateways: - mygateway tls: - match: - port: 443 sniHosts: - login.bookinfo.com route: - destination: host: login.prod.svc.cluster.local - match: - port: 443 sniHosts: - reviews.bookinfo.com route: - destination: host: reviews.prod.svc.cluster.local
```
func (*TLSRoute) Descriptor ¶
func (*TLSRoute) GetMatch ¶
func (m *TLSRoute) GetMatch() []*TLSMatchAttributes
func (*TLSRoute) GetRoute ¶
func (m *TLSRoute) GetRoute() []*DestinationWeight
func (*TLSRoute) ProtoMessage ¶
func (*TLSRoute) 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.networking.v1alpha3.TLSSettings_TLSmode" json:"mode,omitempty"` // REQUIRED if mode is `MUTUAL`. The path to the file holding the // client-side TLS certificate to use. // Should be empty if mode is `ISTIO_MUTUAL`. ClientCertificate string `protobuf:"bytes,2,opt,name=client_certificate,json=clientCertificate,proto3" json:"client_certificate,omitempty"` // REQUIRED if mode is `MUTUAL`. The path to the file holding the // client's private key. // Should be empty if mode is `ISTIO_MUTUAL`. PrivateKey string `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // OPTIONAL: The path to the file containing certificate authority // certificates to use in verifying a presented server certificate. If // omitted, the proxy will not verify the server's certificate. // Should be empty if mode is `ISTIO_MUTUAL`. CaCertificates string `protobuf:"bytes,4,opt,name=ca_certificates,json=caCertificates,proto3" json:"ca_certificates,omitempty"` // A list of alternate names to verify the subject identity in the // certificate. If specified, the proxy will verify that the server // certificate's subject alt name matches one of the specified values. // Should be empty if mode is `ISTIO_MUTUAL`. SubjectAltNames []string `protobuf:"bytes,5,rep,name=subject_alt_names,json=subjectAltNames" json:"subject_alt_names,omitempty"` // SNI string to present to the server during TLS handshake. // Should be empty if mode is `ISTIO_MUTUAL`. 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.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: db-mtls
spec:
host: mydbserver.prod.svc.cluster.local trafficPolicy: tls: mode: MUTUAL clientCertificate: /etc/certs/myclientcert.pem privateKey: /etc/certs/client_private_key.pem caCertificates: /etc/certs/rootcacerts.pem
```
The following rule configures a client to use TLS when talking to a foreign service whose domain matches *.foo.com.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: tls-foo
spec:
host: "*.foo.com" trafficPolicy: tls: mode: SIMPLE
```
The following rule configures a client to use Istio mutual TLS when talking to rating services.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: ratings-istio-mtls
spec:
host: ratings.prod.svc.cluster.local trafficPolicy: tls: mode: ISTIO_MUTUAL
```
func (*TLSSettings) Descriptor ¶
func (*TLSSettings) Descriptor() ([]byte, []int)
func (*TLSSettings) GetCaCertificates ¶
func (m *TLSSettings) GetCaCertificates() string
func (*TLSSettings) GetClientCertificate ¶
func (m *TLSSettings) GetClientCertificate() string
func (*TLSSettings) GetMode ¶
func (m *TLSSettings) GetMode() TLSSettings_TLSmode
func (*TLSSettings) GetPrivateKey ¶
func (m *TLSSettings) GetPrivateKey() string
func (*TLSSettings) GetSni ¶
func (m *TLSSettings) GetSni() string
func (*TLSSettings) GetSubjectAltNames ¶
func (m *TLSSettings) GetSubjectAltNames() []string
func (*TLSSettings) Marshal ¶
func (m *TLSSettings) Marshal() (dAtA []byte, err error)
func (*TLSSettings) ProtoMessage ¶
func (*TLSSettings) ProtoMessage()
func (*TLSSettings) Reset ¶
func (m *TLSSettings) Reset()
func (*TLSSettings) Size ¶
func (m *TLSSettings) Size() (n int)
func (*TLSSettings) String ¶
func (m *TLSSettings) String() string
func (*TLSSettings) Unmarshal ¶
func (m *TLSSettings) Unmarshal(dAtA []byte) error
type TLSSettings_TLSmode ¶
type TLSSettings_TLSmode int32
TLS connection mode
const ( // 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 // Secure connections to the upstream using mutual TLS by presenting // client certificates for authentication. // Compared to Mutual mode, this mode uses certificates generated // automatically by Istio for mTLS authentication. When this mode is // used, all other fields in `TLSSettings` should be empty. TLSSettings_ISTIO_MUTUAL TLSSettings_TLSmode = 3 )
func (TLSSettings_TLSmode) EnumDescriptor ¶
func (TLSSettings_TLSmode) EnumDescriptor() ([]byte, []int)
func (TLSSettings_TLSmode) String ¶
func (x TLSSettings_TLSmode) String() string
type TrafficPolicy ¶
type TrafficPolicy struct { // Settings controlling the load balancer algorithms. LoadBalancer *LoadBalancerSettings `protobuf:"bytes,1,opt,name=load_balancer,json=loadBalancer" json:"load_balancer,omitempty"` // Settings controlling the volume of connections to an upstream service ConnectionPool *ConnectionPoolSettings `protobuf:"bytes,2,opt,name=connection_pool,json=connectionPool" json:"connection_pool,omitempty"` // Settings controlling eviction of unhealthy hosts from the load balancing pool OutlierDetection *OutlierDetection `protobuf:"bytes,3,opt,name=outlier_detection,json=outlierDetection" json:"outlier_detection,omitempty"` // TLS related settings for connections to the upstream service. Tls *TLSSettings `protobuf:"bytes,4,opt,name=tls" json:"tls,omitempty"` // Traffic policies 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=portLevelSettings" 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) Marshal ¶
func (m *TrafficPolicy) Marshal() (dAtA []byte, err error)
func (*TrafficPolicy) ProtoMessage ¶
func (*TrafficPolicy) ProtoMessage()
func (*TrafficPolicy) Reset ¶
func (m *TrafficPolicy) Reset()
func (*TrafficPolicy) Size ¶
func (m *TrafficPolicy) Size() (n int)
func (*TrafficPolicy) String ¶
func (m *TrafficPolicy) String() string
func (*TrafficPolicy) Unmarshal ¶
func (m *TrafficPolicy) Unmarshal(dAtA []byte) error
type 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=loadBalancer" json:"load_balancer,omitempty"` // Settings controlling the volume of connections to an upstream service ConnectionPool *ConnectionPoolSettings `protobuf:"bytes,3,opt,name=connection_pool,json=connectionPool" json:"connection_pool,omitempty"` // Settings controlling eviction of unhealthy hosts from the load balancing pool OutlierDetection *OutlierDetection `protobuf:"bytes,4,opt,name=outlier_detection,json=outlierDetection" 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) Marshal ¶
func (m *TrafficPolicy_PortTrafficPolicy) Marshal() (dAtA []byte, err error)
func (*TrafficPolicy_PortTrafficPolicy) MarshalTo ¶
func (m *TrafficPolicy_PortTrafficPolicy) MarshalTo(dAtA []byte) (int, error)
func (*TrafficPolicy_PortTrafficPolicy) ProtoMessage ¶
func (*TrafficPolicy_PortTrafficPolicy) ProtoMessage()
func (*TrafficPolicy_PortTrafficPolicy) Reset ¶
func (m *TrafficPolicy_PortTrafficPolicy) Reset()
func (*TrafficPolicy_PortTrafficPolicy) Size ¶
func (m *TrafficPolicy_PortTrafficPolicy) Size() (n int)
func (*TrafficPolicy_PortTrafficPolicy) String ¶
func (m *TrafficPolicy_PortTrafficPolicy) String() string
func (*TrafficPolicy_PortTrafficPolicy) Unmarshal ¶
func (m *TrafficPolicy_PortTrafficPolicy) Unmarshal(dAtA []byte) error
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 protocol-specific routes. The reserved word `mesh` is used to imply // all the sidecars in the mesh. When this field is omitted, the default // gateway (`mesh`) will be used, which would apply the rule to all // sidecars in the mesh. If a list of gateway names is provided, the // rules will apply only to the gateways. To apply the rules to both // gateways and sidecars, specify `mesh` as one of the gateway names. Gateways []string `protobuf:"bytes,2,rep,name=gateways" json:"gateways,omitempty"` // An ordered list of route rules for HTTP traffic. HTTP routes will be // applied to platform service ports named 'http-*'/'http2-*'/'grpc-*', gateway // ports with protocol HTTP/HTTP2/GRPC/ TLS-terminated-HTTPS and service // entry ports using HTTP/HTTP2/GRPC protocols. The first rule matching // an incoming request is used. Http []*HTTPRoute `protobuf:"bytes,3,rep,name=http" json:"http,omitempty"` // An ordered list of route rule for non-terminated TLS & HTTPS // traffic. Routing is typically performed using the SNI value presented // by the ClientHello message. TLS routes will be applied to platform // service ports named 'https-*', 'tls-*', unterminated gateway ports using // HTTPS/TLS protocols (i.e. with "passthrough" TLS mode) and service // entry ports using HTTPS/TLS protocols. The first rule matching an // incoming request is used. NOTE: Traffic 'https-*' or 'tls-*' ports // without associated virtual service will be treated as opaque TCP // traffic. Tls []*TLSRoute `protobuf:"bytes,5,rep,name=tls" json:"tls,omitempty"` // An ordered list of route rules for opaque TCP traffic. TCP routes will // be applied to any port that is not a HTTP or TLS port. The first rule // matching an incoming request is used. Tcp []*TCPRoute `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".
```yaml 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`.
```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata:
name: reviews-destination
spec:
host: reviews.prod.svc.cluster.local subsets: - name: v1 labels: version: v1 - name: v2 labels: version: v2
```
func (*VirtualService) 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) GetTls ¶
func (m *VirtualService) GetTls() []*TLSRoute
func (*VirtualService) Marshal ¶
func (m *VirtualService) Marshal() (dAtA []byte, err error)
func (*VirtualService) ProtoMessage ¶
func (*VirtualService) ProtoMessage()
func (*VirtualService) Reset ¶
func (m *VirtualService) Reset()
func (*VirtualService) Size ¶
func (m *VirtualService) Size() (n int)
func (*VirtualService) String ¶
func (m *VirtualService) String() string
func (*VirtualService) Unmarshal ¶
func (m *VirtualService) Unmarshal(dAtA []byte) error