diff --git a/Gopkg.lock b/Gopkg.lock
index b6781d9ea9b8..77106b05ae31 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -1625,7 +1625,7 @@
[[projects]]
branch = "release-1.1"
- digest = "1:0c781a65425b185d8342d37b1a582f16059f927c50f54910aa8e42a2b00099f7"
+ digest = "1:680e918d2481ea58c31e83fe054aa2e346a091b9d46b6c98f96717f849f6ddca"
name = "istio.io/api"
packages = [
"authentication/v1alpha1",
@@ -1641,7 +1641,7 @@
"rbac/v1alpha1",
]
pruneopts = "T"
- revision = "aec9db9d9a57faf688b4d5606fddede85d4d3855"
+ revision = "6286ff0e63603c77cf7ec30510c39e5cebae65b2"
[[projects]]
branch = "release-1.11"
diff --git a/istioctl/cmd/istioctl/kubeinject.go b/istioctl/cmd/istioctl/kubeinject.go
index 79939ace3e05..379ef3eb6bac 100644
--- a/istioctl/cmd/istioctl/kubeinject.go
+++ b/istioctl/cmd/istioctl/kubeinject.go
@@ -254,6 +254,10 @@ istioctl kube-inject -f deployment.yaml -o deployment-injected.yaml --injectConf
return err
}
}
+ err = model.ValidateMeshConfig(meshConfig)
+ if err != nil {
+ return err
+ }
var sidecarTemplate string
diff --git a/mixer/test/client/gateway/gateway_test.go b/mixer/test/client/gateway/gateway_test.go
index daead9d075eb..e64bc312d3f5 100644
--- a/mixer/test/client/gateway/gateway_test.go
+++ b/mixer/test/client/gateway/gateway_test.go
@@ -223,6 +223,9 @@ func (mock) ID(*core.Node) string {
func (mock) GetProxyServiceInstances(_ *model.Proxy) ([]*model.ServiceInstance, error) {
return nil, nil
}
+func (mock) GetProxyLocality(_ *model.Proxy) string {
+ return ""
+}
func (mock) GetService(_ model.Hostname) (*model.Service, error) { return nil, nil }
func (mock) InstancesByPort(_ model.Hostname, _ int, _ model.LabelsCollection) ([]*model.ServiceInstance, error) {
return nil, nil
diff --git a/mixer/test/client/pilotplugin/pilotplugin_test.go b/mixer/test/client/pilotplugin/pilotplugin_test.go
index 2068e658b90b..cb6768e2710c 100644
--- a/mixer/test/client/pilotplugin/pilotplugin_test.go
+++ b/mixer/test/client/pilotplugin/pilotplugin_test.go
@@ -297,6 +297,9 @@ func (mock) ID(*core.Node) string {
func (mock) GetProxyServiceInstances(_ *model.Proxy) ([]*model.ServiceInstance, error) {
return nil, nil
}
+func (mock) GetProxyLocality(_ *model.Proxy) string {
+ return ""
+}
func (mock) GetService(_ model.Hostname) (*model.Service, error) { return nil, nil }
func (mock) InstancesByPort(_ model.Hostname, _ int, _ model.LabelsCollection) ([]*model.ServiceInstance, error) {
return nil, nil
diff --git a/mixer/test/client/pilotplugin_mtls/pilotplugin_mtls_test.go b/mixer/test/client/pilotplugin_mtls/pilotplugin_mtls_test.go
index b147d4d0a490..4f0ed8a4e2b6 100644
--- a/mixer/test/client/pilotplugin_mtls/pilotplugin_mtls_test.go
+++ b/mixer/test/client/pilotplugin_mtls/pilotplugin_mtls_test.go
@@ -312,6 +312,9 @@ func (mock) ID(*core.Node) string {
func (mock) GetProxyServiceInstances(_ *model.Proxy) ([]*model.ServiceInstance, error) {
return nil, nil
}
+func (mock) GetProxyLocality(_ *model.Proxy) string {
+ return ""
+}
func (mock) GetService(_ model.Hostname) (*model.Service, error) { return nil, nil }
func (mock) InstancesByPort(_ model.Hostname, _ int, _ model.LabelsCollection) ([]*model.ServiceInstance, error) {
return nil, nil
diff --git a/mixer/test/client/pilotplugin_tcp/pilotplugin_tcp_test.go b/mixer/test/client/pilotplugin_tcp/pilotplugin_tcp_test.go
index 7035dc45cd8c..82a6abdaa6f8 100644
--- a/mixer/test/client/pilotplugin_tcp/pilotplugin_tcp_test.go
+++ b/mixer/test/client/pilotplugin_tcp/pilotplugin_tcp_test.go
@@ -174,6 +174,9 @@ func (mock) ID(*core.Node) string {
func (mock) GetProxyServiceInstances(_ *model.Proxy) ([]*model.ServiceInstance, error) {
return nil, nil
}
+func (mock) GetProxyLocality(_ *model.Proxy) string {
+ return ""
+}
func (mock) GetService(_ model.Hostname) (*model.Service, error) { return nil, nil }
func (mock) InstancesByPort(_ model.Hostname, _ int, _ model.LabelsCollection) ([]*model.ServiceInstance, error) {
return nil, nil
diff --git a/pilot/pkg/bootstrap/server.go b/pilot/pkg/bootstrap/server.go
index 5164685bc10f..7f0a056f412c 100644
--- a/pilot/pkg/bootstrap/server.go
+++ b/pilot/pkg/bootstrap/server.go
@@ -410,6 +410,11 @@ func (s *Server) initMesh(args *PilotArgs) error {
}
}
+ if err = model.ValidateMeshConfig(mesh); err != nil {
+ log.Errorf("invalid mesh configuration: %v", err)
+ return err
+ }
+
log.Infof("mesh configuration %s", spew.Sdump(mesh))
log.Infof("version %s", version.Info.String())
log.Infof("flags %s", spew.Sdump(args))
diff --git a/pilot/pkg/kube/inject/webhook.go b/pilot/pkg/kube/inject/webhook.go
index c605a0231eef..b5720594e3c2 100644
--- a/pilot/pkg/kube/inject/webhook.go
+++ b/pilot/pkg/kube/inject/webhook.go
@@ -36,6 +36,7 @@ import (
meshconfig "istio.io/api/mesh/v1alpha1"
"istio.io/istio/pilot/cmd"
+ "istio.io/istio/pilot/pkg/model"
"istio.io/istio/pkg/log"
)
@@ -87,6 +88,10 @@ func loadConfig(injectFile, meshFile string) (*Config, *meshconfig.MeshConfig, e
if err != nil {
return nil, nil, err
}
+ err = model.ValidateMeshConfig(meshConfig)
+ if err != nil {
+ return nil, nil, err
+ }
log.Infof("New configuration: sha256sum %x", sha256.Sum256(data))
log.Infof("Policy: %v", c.Policy)
diff --git a/pilot/pkg/model/context.go b/pilot/pkg/model/context.go
index 219355a623e3..6a371fcf3ee1 100644
--- a/pilot/pkg/model/context.go
+++ b/pilot/pkg/model/context.go
@@ -21,6 +21,7 @@ import (
"strings"
"time"
+ "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
"github.com/gogo/protobuf/types"
multierror "github.com/hashicorp/go-multierror"
@@ -86,6 +87,9 @@ type Proxy struct {
// namespace.
ID string
+ // Locality is the location of where Envoy proxy runs.
+ Locality Locality
+
// DNSDomain defines the DNS domain suffix for short hostnames (e.g.
// "default.svc.cluster.local")
DNSDomain string
@@ -282,6 +286,19 @@ func GetProxyConfigNamespace(proxy *Proxy) string {
return ""
}
+// GetProxyLocality returns the locality where Envoy proxy is running.
+func GetProxyLocality(proxy *core.Node) *Locality {
+ if proxy == nil || proxy.Locality == nil {
+ return nil
+ }
+
+ return &Locality{
+ Region: proxy.Locality.Region,
+ Zone: proxy.Locality.Zone,
+ SubZone: proxy.Locality.SubZone,
+ }
+}
+
const (
serviceNodeSeparator = "~"
diff --git a/pilot/pkg/model/locality.go b/pilot/pkg/model/locality.go
new file mode 100644
index 000000000000..1f0bdc647e28
--- /dev/null
+++ b/pilot/pkg/model/locality.go
@@ -0,0 +1,61 @@
+// Copyright 2019 Istio Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package model
+
+type LocalityInterface interface {
+ GetRegion() string
+ GetZone() string
+ GetSubZone() string
+}
+
+// Identifies location of where either Envoy runs or where upstream hosts run.
+type Locality struct {
+ // Region this proxy belongs to.
+ Region string
+ // Defines the local service zone where Envoy is running. Though optional, it
+ // should be set if discovery service routing is used and the discovery
+ // service exposes :ref:`zone data `,
+ // either in this message or via :option:`--service-zone`. The meaning of zone
+ // is context dependent, e.g. `Availability Zone (AZ)
+ // `_
+ // on AWS, `Zone `_ on
+ // GCP, etc.
+ Zone string
+ // When used for locality of upstream hosts, this field further splits zone
+ // into smaller chunks of sub-zones so they can be load balanced
+ // independently.
+ SubZone string
+}
+
+func (l *Locality) GetRegion() string {
+ if l != nil {
+ return l.Region
+ }
+ return ""
+}
+
+func (l *Locality) GetZone() string {
+ if l != nil {
+ return l.Zone
+ }
+ return ""
+}
+
+func (l *Locality) GetSubZone() string {
+ if l != nil {
+ return l.SubZone
+ }
+ return ""
+}
diff --git a/pilot/pkg/model/push_context.go b/pilot/pkg/model/push_context.go
index 256439cdafbf..f01f0b319ced 100644
--- a/pilot/pkg/model/push_context.go
+++ b/pilot/pkg/model/push_context.go
@@ -480,6 +480,17 @@ func (ps *PushContext) GetAllSidecarScopes() map[string][]*SidecarScope {
return ps.sidecarsByNamespace
}
+// ServicePort returns the port model for the given service and port.
+func (ps *PushContext) ServicePort(hostname Hostname, port int) *Port {
+ portList := ps.ServicePort2Name[string(hostname)]
+ for i := range portList {
+ if portList[i] != nil && portList[i].Port == port {
+ return portList[i]
+ }
+ }
+ return nil
+}
+
// DestinationRule returns a destination rule for a service name in a given domain.
func (ps *PushContext) DestinationRule(proxy *Proxy, hostname Hostname) *Config {
// If proxy has a sidecar scope that is user supplied, then get the destination rules from the sidecar scope
diff --git a/pilot/pkg/model/service.go b/pilot/pkg/model/service.go
index e4494f509238..a66138e63caf 100644
--- a/pilot/pkg/model/service.go
+++ b/pilot/pkg/model/service.go
@@ -496,6 +496,9 @@ type ServiceDiscovery interface {
// determine the intended destination of a connection without a Host header on the request.
GetProxyServiceInstances(*Proxy) ([]*ServiceInstance, error)
+ // GetProxyLocality returns the locality where the proxy runs.
+ GetProxyLocality(*Proxy) string
+
// ManagementPorts lists set of management ports associated with an IPv4 address.
// These management ports are typically used by the platform for out of band management
// tasks such as health checks, etc. In a scenario where the proxy functions in the
@@ -535,12 +538,12 @@ func (h Hostname) Matches(o Hostname) bool {
return true
}
- hWildcard := string(h[0]) == "*"
+ hWildcard := len(h) > 0 && string(h[0]) == "*"
if hWildcard && len(o) == 0 {
return true
}
- oWildcard := string(o[0]) == "*"
+ oWildcard := len(o) > 0 && string(o[0]) == "*"
if !hWildcard && !oWildcard {
// both are non-wildcards, so do normal string comparison
return h == o
@@ -574,8 +577,8 @@ func (h Hostname) SubsetOf(o Hostname) bool {
return true
}
- hWildcard := string(h[0]) == "*"
- oWildcard := string(o[0]) == "*"
+ hWildcard := len(h) > 0 && string(h[0]) == "*"
+ oWildcard := len(o) > 0 && string(o[0]) == "*"
if !oWildcard {
if hWildcard {
return false
diff --git a/pilot/pkg/model/service_test.go b/pilot/pkg/model/service_test.go
index 0fe9e5976e07..b40c10cd95f9 100644
--- a/pilot/pkg/model/service_test.go
+++ b/pilot/pkg/model/service_test.go
@@ -224,6 +224,8 @@ func TestHostnameMatches(t *testing.T) {
out bool
}{
{"empty", "", "", true},
+ {"first empty", "", "foo.com", false},
+ {"second empty", "foo.com", "", false},
{"non-wildcard domain",
"foo.com", "foo.com", true},
diff --git a/pilot/pkg/model/validation.go b/pilot/pkg/model/validation.go
index eb8968ebb077..f79cdb290022 100644
--- a/pilot/pkg/model/validation.go
+++ b/pilot/pkg/model/validation.go
@@ -824,7 +824,6 @@ func validateLoadBalancer(settings *networking.LoadBalancerSettings) (errs error
}
}
}
-
return
}
@@ -1044,6 +1043,10 @@ func ValidateMeshConfig(mesh *meshconfig.MeshConfig) (errs error) {
errs = multierror.Append(errs, err)
}
+ if err := validateLocalityLbSetting(mesh.LocalityLbSetting); err != nil {
+ errs = multierror.Append(errs, err)
+ }
+
return
}
@@ -2214,3 +2217,111 @@ func ValidateNetworkEndpointAddress(n *NetworkEndpoint) error {
}
return nil
}
+
+// validateLocalityLbSetting checks the LocalityLbSetting of MeshConfig
+func validateLocalityLbSetting(lb *meshconfig.LocalityLoadBalancerSetting) error {
+ if lb == nil {
+ return nil
+ }
+
+ if len(lb.GetDistribute()) > 0 && len(lb.GetFailover()) > 0 {
+ return fmt.Errorf("can not simultaneously specify 'distribute' and 'failover'")
+ }
+
+ srcLocalities := []string{}
+ for _, locality := range lb.GetDistribute() {
+ srcLocalities = append(srcLocalities, locality.From)
+ var totalWeight uint32
+ destLocalities := []string{}
+ for loc, weight := range locality.To {
+ destLocalities = append(destLocalities, loc)
+ if weight == 0 {
+ return fmt.Errorf("locality weight must not be in range [1, 100]")
+ }
+ totalWeight += weight
+ }
+ if totalWeight != 100 {
+ return fmt.Errorf("total locality weight %v != 100", totalWeight)
+ }
+ if err := validateLocalities(destLocalities); err != nil {
+ return err
+ }
+ }
+
+ if err := validateLocalities(srcLocalities); err != nil {
+ return err
+ }
+
+ for _, failover := range lb.GetFailover() {
+ if failover.From == failover.To {
+ return fmt.Errorf("locality lb failover settings must specify different regions")
+ }
+ if strings.Contains(failover.To, "*") {
+ return fmt.Errorf("locality lb failover region should not contain '*' wildcard")
+ }
+ }
+
+ return nil
+}
+
+func validateLocalities(localities []string) error {
+ regionZoneSubZoneMap := map[string]map[string]map[string]bool{}
+
+ for _, locality := range localities {
+ if n := strings.Count(locality, "*"); n > 0 {
+ if n > 1 || !strings.HasSuffix(locality, "*") {
+ return fmt.Errorf("locality %s wildcard '*' number can not exceed 1 and must be in the end", locality)
+ }
+ }
+
+ items := strings.SplitN(locality, "/", 3)
+ for _, item := range items {
+ if item == "" {
+ return fmt.Errorf("locality %s must not contain empty region/zone/subzone info", locality)
+ }
+ }
+ if _, ok := regionZoneSubZoneMap["*"]; ok {
+ return fmt.Errorf("locality %s overlap with previous specified ones", locality)
+ }
+ switch len(items) {
+ case 1:
+ if _, ok := regionZoneSubZoneMap[items[0]]; ok {
+ return fmt.Errorf("locality %s overlap with previous specified ones", locality)
+ }
+ regionZoneSubZoneMap[items[0]] = map[string]map[string]bool{"*": {"*": true}}
+ case 2:
+ if _, ok := regionZoneSubZoneMap[items[0]]; ok {
+ if _, ok := regionZoneSubZoneMap[items[0]]["*"]; ok {
+ return fmt.Errorf("locality %s overlap with previous specified ones", locality)
+ }
+ if _, ok := regionZoneSubZoneMap[items[0]][items[1]]; ok {
+ return fmt.Errorf("locality %s overlap with previous specified ones", locality)
+ }
+ regionZoneSubZoneMap[items[0]][items[1]] = map[string]bool{"*": true}
+ } else {
+ regionZoneSubZoneMap[items[0]] = map[string]map[string]bool{items[1]: {"*": true}}
+ }
+ case 3:
+ if _, ok := regionZoneSubZoneMap[items[0]]; ok {
+ if _, ok := regionZoneSubZoneMap[items[0]]["*"]; ok {
+ return fmt.Errorf("locality %s overlap with previous specified ones", locality)
+ }
+ if _, ok := regionZoneSubZoneMap[items[0]][items[1]]; ok {
+ if regionZoneSubZoneMap[items[0]][items[1]]["*"] {
+ return fmt.Errorf("locality %s overlap with previous specified ones", locality)
+ }
+ if regionZoneSubZoneMap[items[0]][items[1]][items[2]] {
+ return fmt.Errorf("locality %s overlap with previous specified ones", locality)
+ }
+ regionZoneSubZoneMap[items[0]][items[1]][items[2]] = true
+ } else {
+ regionZoneSubZoneMap[items[0]][items[1]] = map[string]bool{items[2]: true}
+ }
+ } else {
+ regionZoneSubZoneMap[items[0]] = map[string]map[string]bool{items[1]: {items[2]: true}}
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/pilot/pkg/model/validation_test.go b/pilot/pkg/model/validation_test.go
index 798e3507bf11..9d1c7ee0ac13 100644
--- a/pilot/pkg/model/validation_test.go
+++ b/pilot/pkg/model/validation_test.go
@@ -3996,3 +3996,171 @@ func TestValidateSidecar(t *testing.T) {
})
}
}
+
+func TestValidateLocalityLbSetting(t *testing.T) {
+ cases := []struct {
+ name string
+ in *meshconfig.LocalityLoadBalancerSetting
+ valid bool
+ }{
+ {
+ name: "valid mesh config without LocalityLoadBalancerSetting",
+ in: nil,
+ valid: true,
+ },
+
+ {
+ name: "invalid LocalityLoadBalancerSetting_Distribute total weight > 100",
+ in: &meshconfig.LocalityLoadBalancerSetting{
+ Distribute: []*meshconfig.LocalityLoadBalancerSetting_Distribute{
+ {
+ From: "a/b/c",
+ To: map[string]uint32{
+ "a/b/c": 80,
+ "a/b1": 25,
+ },
+ },
+ },
+ },
+ valid: false,
+ },
+ {
+ name: "invalid LocalityLoadBalancerSetting_Distribute total weight < 100",
+ in: &meshconfig.LocalityLoadBalancerSetting{
+ Distribute: []*meshconfig.LocalityLoadBalancerSetting_Distribute{
+ {
+ From: "a/b/c",
+ To: map[string]uint32{
+ "a/b/c": 80,
+ "a/b1": 15,
+ },
+ },
+ },
+ },
+ valid: false,
+ },
+ {
+ name: "invalid LocalityLoadBalancerSetting_Distribute weight = 0",
+ in: &meshconfig.LocalityLoadBalancerSetting{
+ Distribute: []*meshconfig.LocalityLoadBalancerSetting_Distribute{
+ {
+ From: "a/b/c",
+ To: map[string]uint32{
+ "a/b/c": 0,
+ "a/b1": 100,
+ },
+ },
+ },
+ },
+ valid: false,
+ },
+ {
+ name: "invalid LocalityLoadBalancerSetting specify both distribute and failover",
+ in: &meshconfig.LocalityLoadBalancerSetting{
+ Distribute: []*meshconfig.LocalityLoadBalancerSetting_Distribute{
+ {
+ From: "a/b/c",
+ To: map[string]uint32{
+ "a/b/c": 80,
+ "a/b1": 20,
+ },
+ },
+ },
+ Failover: []*meshconfig.LocalityLoadBalancerSetting_Failover{
+ {
+ From: "region1",
+ To: "region2",
+ },
+ },
+ },
+ valid: false,
+ },
+
+ {
+ name: "invalid failover src and dst have same region",
+ in: &meshconfig.LocalityLoadBalancerSetting{
+ Failover: []*meshconfig.LocalityLoadBalancerSetting_Failover{
+ {
+ From: "region1",
+ To: "region1",
+ },
+ },
+ },
+ valid: false,
+ },
+ }
+
+ for _, c := range cases {
+ if got := validateLocalityLbSetting(c.in); (got == nil) != c.valid {
+ t.Errorf("ValidateLocalityLbSetting failed on %v: got valid=%v but wanted valid=%v: %v",
+ c.name, got == nil, c.valid, got)
+ }
+ }
+}
+
+func TestValidateLocalities(t *testing.T) {
+ cases := []struct {
+ name string
+ localities []string
+ valid bool
+ }{
+ {
+ name: "multi wildcard locality",
+ localities: []string{"*/zone/*"},
+ valid: false,
+ },
+ {
+ name: "wildcard not in suffix",
+ localities: []string{"*/zone"},
+ valid: false,
+ },
+ {
+ name: "explicit wildcard region overlap",
+ localities: []string{"*", "a/b/c"},
+ valid: false,
+ },
+ {
+ name: "implicit wildcard region overlap",
+ localities: []string{"a", "a/b/c"},
+ valid: false,
+ },
+ {
+ name: "explicit wildcard zone overlap",
+ localities: []string{"a/*", "a/b/c"},
+ valid: false,
+ },
+ {
+ name: "implicit wildcard zone overlap",
+ localities: []string{"a/b", "a/b/c"},
+ valid: false,
+ },
+ {
+ name: "explicit wildcard subzone overlap",
+ localities: []string{"a/b/*", "a/b/c"},
+ valid: false,
+ },
+ {
+ name: "implicit wildcard subzone overlap",
+ localities: []string{"a/b", "a/b/c"},
+ valid: false,
+ },
+ {
+ name: "valid localities",
+ localities: []string{"a1/*", "a2/*", "a3/b3/c3", "a4/b4", "a5/b5/*"},
+ valid: true,
+ },
+ }
+ for _, c := range cases {
+ t.Run(c.name, func(t *testing.T) {
+ err := validateLocalities(c.localities)
+ if !c.valid && err == nil {
+ t.Errorf("expect invalid localities")
+ }
+
+ if c.valid && err != nil {
+ t.Errorf("expect valid localities. but got err %v", err)
+ }
+ })
+ }
+
+}
diff --git a/pilot/pkg/networking/core/v1alpha3/cluster.go b/pilot/pkg/networking/core/v1alpha3/cluster.go
index 196130f71222..85625155a336 100644
--- a/pilot/pkg/networking/core/v1alpha3/cluster.go
+++ b/pilot/pkg/networking/core/v1alpha3/cluster.go
@@ -16,7 +16,9 @@ package v1alpha3
import (
"fmt"
+ "math"
"path"
+ "sort"
"strconv"
"strings"
"time"
@@ -29,6 +31,7 @@ import (
envoy_type "github.com/envoyproxy/go-control-plane/envoy/type"
"github.com/gogo/protobuf/types"
+ meshconfig "istio.io/api/mesh/v1alpha1"
networking "istio.io/api/networking/v1alpha3"
"istio.io/istio/pilot/pkg/model"
"istio.io/istio/pilot/pkg/networking/plugin"
@@ -88,6 +91,16 @@ func (configgen *ConfigGeneratorImpl) BuildClusters(env *model.Environment, prox
if configgen.CanUsePrecomputedCDS(proxy) {
if sidecarScope != nil && sidecarScope.XDSOutboundClusters != nil {
clusters = append(clusters, sidecarScope.XDSOutboundClusters...)
+ // For locality loadbalancing
+ for i, cluster := range clusters {
+ if cluster.LoadAssignment != nil {
+ // TODO: cache per locality
+ // Currently make a shallow copy of cluster which is fast
+ clone := util.CloneCluster(cluster)
+ ApplyLocalityLBSetting(proxy, cluster, push)
+ clusters[i] = clone
+ }
+ }
recomputeOutboundClusters = false
}
}
@@ -110,6 +123,14 @@ func (configgen *ConfigGeneratorImpl) BuildClusters(env *model.Environment, prox
if configgen.PrecomputedOutboundClustersForGateways != nil &&
configgen.PrecomputedOutboundClustersForGateways[proxy.ConfigNamespace] != nil {
clusters = append(clusters, configgen.PrecomputedOutboundClustersForGateways[proxy.ConfigNamespace]...)
+ // For locality loadbalancing
+ for i, cluster := range clusters {
+ if cluster.LoadAssignment != nil {
+ clone := util.CloneCluster(cluster)
+ ApplyLocalityLBSetting(proxy, clone, push)
+ clusters[i] = clone
+ }
+ }
recomputeOutboundClusters = false
}
}
@@ -130,6 +151,29 @@ func (configgen *ConfigGeneratorImpl) BuildClusters(env *model.Environment, prox
return normalizeClusters(push, proxy, clusters), nil
}
+func ApplyLocalityLBSetting(proxy *model.Proxy, cluster *apiv2.Cluster, push *model.PushContext) {
+ _, subsetName, hostname, portNumber := model.ParseSubsetKey(cluster.Name)
+ if config := push.DestinationRule(proxy, hostname); config != nil {
+ if port := push.ServicePort(hostname, portNumber); port != nil {
+ destinationRule := config.Spec.(*networking.DestinationRule)
+ _, outlierDetection, _, _ := SelectTrafficPolicyComponents(destinationRule.TrafficPolicy, port)
+ setLocalityPriority := false
+ if outlierDetection != nil {
+ setLocalityPriority = true
+ }
+ for _, subset := range destinationRule.Subsets {
+ if subset.Name == subsetName {
+ _, outlierDetection, _, _ := SelectTrafficPolicyComponents(subset.TrafficPolicy, port)
+ if outlierDetection != nil {
+ setLocalityPriority = true
+ }
+ }
+ }
+ applyLocalityLBSetting(proxy, cluster.LoadAssignment, push.Env.Mesh.LocalityLbSetting, setLocalityPriority)
+ }
+ }
+}
+
// resolves cluster name conflicts. there can be duplicate cluster names if there are conflicting service definitions.
// for any clusters that share the same name the first cluster is kept and the others are discarded.
func normalizeClusters(push *model.PushContext, proxy *model.Proxy, clusters []*apiv2.Cluster) []*apiv2.Cluster {
@@ -183,7 +227,11 @@ func (configgen *ConfigGeneratorImpl) buildOutboundClusters(env *model.Environme
defaultSni := model.BuildDNSSrvSubsetKey(model.TrafficDirectionOutbound, "", service.Hostname, port.Port)
applyTrafficPolicy(env, defaultCluster, destinationRule.TrafficPolicy, port, serviceAccounts,
defaultSni, DefaultClusterMode, model.TrafficDirectionOutbound)
-
+ setLocalityPriority := false
+ if defaultCluster.OutlierDetection != nil {
+ setLocalityPriority = true
+ }
+ applyLocalityLBSetting(proxy, defaultCluster.LoadAssignment, env.Mesh.LocalityLbSetting, setLocalityPriority)
for _, subset := range destinationRule.Subsets {
inputParams.Subset = subset.Name
subsetClusterName := model.BuildSubsetKey(model.TrafficDirectionOutbound, subset.Name, service.Hostname, port.Port)
@@ -201,6 +249,11 @@ func (configgen *ConfigGeneratorImpl) buildOutboundClusters(env *model.Environme
DefaultClusterMode, model.TrafficDirectionOutbound)
applyTrafficPolicy(env, subsetCluster, subset.TrafficPolicy, port, serviceAccounts, defaultSni,
DefaultClusterMode, model.TrafficDirectionOutbound)
+ setLocalityPriority = false
+ if subsetCluster.OutlierDetection != nil {
+ setLocalityPriority = true
+ }
+ applyLocalityLBSetting(proxy, subsetCluster.LoadAssignment, env.Mesh.LocalityLbSetting, setLocalityPriority)
// call plugins
for _, p := range configgen.Plugins {
p.OnOutboundCluster(inputParams, subsetCluster)
@@ -246,6 +299,11 @@ func (configgen *ConfigGeneratorImpl) buildOutboundSniDnatClusters(env *model.En
destinationRule := config.Spec.(*networking.DestinationRule)
applyTrafficPolicy(env, defaultCluster, destinationRule.TrafficPolicy, port, nil, "",
SniDnatClusterMode, model.TrafficDirectionOutbound)
+ setLocalityPriority := false
+ if defaultCluster.OutlierDetection != nil {
+ setLocalityPriority = true
+ }
+ applyLocalityLBSetting(proxy, defaultCluster.LoadAssignment, env.Mesh.LocalityLbSetting, setLocalityPriority)
for _, subset := range destinationRule.Subsets {
subsetClusterName := model.BuildDNSSrvSubsetKey(model.TrafficDirectionOutbound, subset.Name, service.Hostname, port.Port)
@@ -261,6 +319,11 @@ func (configgen *ConfigGeneratorImpl) buildOutboundSniDnatClusters(env *model.En
SniDnatClusterMode, model.TrafficDirectionOutbound)
applyTrafficPolicy(env, subsetCluster, subset.TrafficPolicy, port, nil, "",
SniDnatClusterMode, model.TrafficDirectionOutbound)
+ setLocalityPriority = false
+ if subsetCluster.OutlierDetection != nil {
+ setLocalityPriority = true
+ }
+ applyLocalityLBSetting(proxy, subsetCluster.LoadAssignment, env.Mesh.LocalityLbSetting, setLocalityPriority)
clusters = append(clusters, subsetCluster)
}
}
@@ -530,6 +593,9 @@ func buildIstioMutualTLS(serviceAccounts []string, sni string) *networking.TLSSe
// SelectTrafficPolicyComponents returns the components of TrafficPolicy that should be used for given port.
func SelectTrafficPolicyComponents(policy *networking.TrafficPolicy, port *model.Port) (
*networking.ConnectionPoolSettings, *networking.OutlierDetection, *networking.LoadBalancerSettings, *networking.TLSSettings) {
+ if policy == nil {
+ return nil, nil, nil, nil
+ }
connectionPool := policy.ConnectionPool
outlierDetection := policy.OutlierDetection
loadBalancer := policy.LoadBalancer
@@ -576,9 +642,6 @@ const (
// listenerOpts
func applyTrafficPolicy(env *model.Environment, cluster *apiv2.Cluster, policy *networking.TrafficPolicy,
port *model.Port, serviceAccounts []string, defaultSni string, clusterMode ClusterMode, direction model.TrafficDirection) {
- if policy == nil {
- return
- }
connectionPool, outlierDetection, loadBalancer, tls := SelectTrafficPolicyComponents(policy, port)
applyConnectionPool(env, cluster, connectionPool, direction)
@@ -744,6 +807,130 @@ func applyLoadBalancer(cluster *apiv2.Cluster, lb *networking.LoadBalancerSettin
},
}
}
+
+ // Locality weighted load balancing
+ cluster.CommonLbConfig = &apiv2.Cluster_CommonLbConfig{
+ LocalityConfigSpecifier: &apiv2.Cluster_CommonLbConfig_LocalityWeightedLbConfig_{
+ LocalityWeightedLbConfig: &apiv2.Cluster_CommonLbConfig_LocalityWeightedLbConfig{},
+ },
+ }
+}
+
+func applyLocalityLBSetting(
+ proxy *model.Proxy,
+ loadAssignment *apiv2.ClusterLoadAssignment,
+ localityLB *meshconfig.LocalityLoadBalancerSetting,
+ localityPriority bool) {
+ if proxy == nil || loadAssignment == nil {
+ return
+ }
+
+ // one of Distribute or Failover settings can be applied.
+ if localityLB.GetDistribute() != nil {
+ applyLocalityWeight(proxy, loadAssignment, localityLB.GetDistribute())
+ } else if localityPriority {
+ applyLocalityFailover(proxy, loadAssignment, localityLB.GetFailover())
+ }
+}
+
+// set locality loadbalancing weight
+func applyLocalityWeight(
+ proxy *model.Proxy,
+ loadAssignment *apiv2.ClusterLoadAssignment,
+ distribute []*meshconfig.LocalityLoadBalancerSetting_Distribute) {
+ if distribute == nil {
+ return
+ }
+
+ // Support Locality weighted load balancing
+ // (https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/load_balancing/locality_weight.html)
+ // by providing weights in LocalityLbEndpoints via load_balancing_weight.
+ // By setting weights across different localities, it can allow
+ // Envoy to weight assignments across different zones and geographical locations.
+ for _, localityWeightSetting := range distribute {
+ if localityWeightSetting != nil &&
+ util.LocalityMatch(&proxy.Locality, localityWeightSetting.From) {
+ misMatched := map[int]struct{}{}
+ for i := range loadAssignment.Endpoints {
+ misMatched[i] = struct{}{}
+ }
+ for locality, weight := range localityWeightSetting.To {
+ // index -> original weight
+ destLocMap := map[int]uint32{}
+ totalWeight := uint32(0)
+ for i, ep := range loadAssignment.Endpoints {
+ if _, exist := misMatched[i]; exist {
+ if util.LocalityMatch(ep.Locality, locality) {
+ delete(misMatched, i)
+ destLocMap[i] = ep.LoadBalancingWeight.Value
+ totalWeight += destLocMap[i]
+ }
+ }
+ }
+ // in case wildcard dest matching multi groups of endpoints
+ // the load balancing weight for a locality is divided by the sum of the weights of all localities
+ for index, originalWeight := range destLocMap {
+ weight := float64(originalWeight*weight) / float64(totalWeight)
+ loadAssignment.Endpoints[index].LoadBalancingWeight = &types.UInt32Value{
+ Value: uint32(math.Ceil(weight)),
+ }
+ }
+ }
+
+ // remove groups of endpoints in a locality that miss matched
+ for i := range misMatched {
+ loadAssignment.Endpoints[i].LbEndpoints = nil
+ }
+ break
+ }
+ }
+}
+
+// set locality loadbalancing priority
+func applyLocalityFailover(
+ proxy *model.Proxy,
+ loadAssignment *apiv2.ClusterLoadAssignment,
+ failover []*meshconfig.LocalityLoadBalancerSetting_Failover) {
+ // key is priority, value is the index of the LocalityLbEndpoints in ClusterLoadAssignment
+ priorityMap := map[int][]int{}
+
+ // 1. calculate the LocalityLbEndpoints.Priority compared with proxy locality
+ for i, localityEndpoint := range loadAssignment.Endpoints {
+ priority := util.LbPriority(&proxy.Locality, localityEndpoint.Locality)
+ // region not match, apply failover settings
+ if priority == 3 {
+ for _, failoverSetting := range failover {
+ if failoverSetting.From == proxy.Locality.Region {
+ if localityEndpoint.Locality.Region != failoverSetting.To {
+ priority = 4
+ }
+ break
+ }
+ }
+ }
+ loadAssignment.Endpoints[i].Priority = uint32(priority)
+ priorityMap[priority] = append(priorityMap[priority], i)
+ }
+
+ // since Priorities should range from 0 (highest) to N (lowest) without skipping.
+ // 2. adjust the priorities in order
+ // 2.1 sort all priorities in increasing order.
+ priorities := []int{}
+ for priority := range priorityMap {
+ priorities = append(priorities, priority)
+ }
+ sort.Ints(priorities)
+ // 2.2 adjust LocalityLbEndpoints priority
+ // if the index and value of priorities array is not equal.
+ for i, priority := range priorities {
+ if i != priority {
+ // the LocalityLbEndpoints index in ClusterLoadAssignment.Endpoints
+ for index := range priorityMap[priority] {
+ loadAssignment.Endpoints[index].Priority = uint32(i)
+ }
+ }
+ }
+
}
func applyUpstreamTLSSettings(env *model.Environment, cluster *apiv2.Cluster, tls *networking.TLSSettings) {
diff --git a/pilot/pkg/networking/core/v1alpha3/cluster_test.go b/pilot/pkg/networking/core/v1alpha3/cluster_test.go
index 2c3b5b252d69..f2aee8c50875 100644
--- a/pilot/pkg/networking/core/v1alpha3/cluster_test.go
+++ b/pilot/pkg/networking/core/v1alpha3/cluster_test.go
@@ -20,6 +20,8 @@ import (
"time"
apiv2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
+ envoycore "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
+ "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"
"github.com/gogo/protobuf/proto"
"github.com/gogo/protobuf/types"
. "github.com/onsi/gomega"
@@ -30,6 +32,7 @@ import (
core "istio.io/istio/pilot/pkg/networking/core/v1alpha3"
"istio.io/istio/pilot/pkg/networking/core/v1alpha3/fakes"
"istio.io/istio/pilot/pkg/networking/plugin"
+ "istio.io/istio/pilot/pkg/networking/util"
)
type ConfigType int
@@ -381,3 +384,273 @@ func buildTestClustersWithTCPKeepalive(configType ConfigType) ([]*apiv2.Cluster,
},
})
}
+
+func TestApplyLocalitySetting(t *testing.T) {
+ g := NewGomegaWithT(t)
+
+ proxy := &model.Proxy{
+ ClusterID: "some-cluster-id",
+ Type: model.SidecarProxy,
+ IPAddresses: []string{"6.6.6.6"},
+ DNSDomain: "com",
+ Metadata: make(map[string]string),
+ Locality: model.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ SubZone: "subzone1",
+ },
+ }
+
+ env := buildEnvForClustersWithDistribute()
+ cluster := buildFakeCluster()
+ core.ApplyLocalityLBSetting(proxy, cluster, env.PushContext)
+
+ for _, localityEndpoint := range cluster.LoadAssignment.Endpoints {
+ if util.LocalityMatch(localityEndpoint.Locality, "region1/zone1/subzone1") {
+ g.Expect(localityEndpoint.LoadBalancingWeight.GetValue()).To(Equal(uint32(90)))
+ continue
+ }
+ if util.LocalityMatch(localityEndpoint.Locality, "region1/zone1") {
+ g.Expect(localityEndpoint.LoadBalancingWeight.GetValue()).To(Equal(uint32(5)))
+ continue
+ }
+ g.Expect(localityEndpoint.LbEndpoints).To(BeNil())
+ }
+
+ env = buildEnvForClustersWithFailover()
+ core.ApplyLocalityLBSetting(proxy, cluster, env.PushContext)
+ for _, localityEndpoint := range cluster.LoadAssignment.Endpoints {
+ if localityEndpoint.Locality.Region == proxy.Locality.Region {
+ if localityEndpoint.Locality.Zone == proxy.Locality.Zone {
+ if localityEndpoint.Locality.SubZone == proxy.Locality.SubZone {
+ g.Expect(localityEndpoint.Priority).To(Equal(uint32(0)))
+ continue
+ }
+ g.Expect(localityEndpoint.Priority).To(Equal(uint32(1)))
+ continue
+ }
+ g.Expect(localityEndpoint.Priority).To(Equal(uint32(2)))
+ continue
+ }
+ if localityEndpoint.Locality.Region == "region2" {
+ g.Expect(localityEndpoint.Priority).To(Equal(uint32(3)))
+ } else {
+ g.Expect(localityEndpoint.Priority).To(Equal(uint32(4)))
+ }
+ }
+}
+
+func buildEnvForClustersWithDistribute() *model.Environment {
+ serviceDiscovery := &fakes.ServiceDiscovery{}
+
+ serviceDiscovery.ServicesReturns([]*model.Service{
+ {
+ Hostname: "test.example.org",
+ Address: "1.1.1.1",
+ ClusterVIPs: make(map[string]string),
+ Ports: model.PortList{
+ &model.Port{
+ Name: "default",
+ Port: 8080,
+ Protocol: model.ProtocolHTTP,
+ },
+ },
+ },
+ }, nil)
+
+ meshConfig := &meshconfig.MeshConfig{
+ ConnectTimeout: &types.Duration{
+ Seconds: 10,
+ Nanos: 1,
+ },
+ LocalityLbSetting: &meshconfig.LocalityLoadBalancerSetting{
+ Distribute: []*meshconfig.LocalityLoadBalancerSetting_Distribute{
+ {
+ From: "region1/zone1/subzone1",
+ To: map[string]uint32{
+ "region1/zone1/subzone1": 90,
+ "region1/zone1/subzone2": 5,
+ "region1/zone1/subzone3": 5,
+ },
+ },
+ },
+ },
+ }
+
+ configStore := &fakes.IstioConfigStore{}
+
+ env := &model.Environment{
+ ServiceDiscovery: serviceDiscovery,
+ ServiceAccounts: &fakes.ServiceAccounts{},
+ IstioConfigStore: configStore,
+ Mesh: meshConfig,
+ MixerSAN: []string{},
+ }
+
+ env.PushContext = model.NewPushContext()
+ env.PushContext.InitContext(env)
+ env.PushContext.SetDestinationRules([]model.Config{
+ {ConfigMeta: model.ConfigMeta{
+ Type: model.DestinationRule.Type,
+ Version: model.DestinationRule.Version,
+ Name: "acme",
+ },
+ Spec: &networking.DestinationRule{
+ Host: "test.example.org",
+ TrafficPolicy: &networking.TrafficPolicy{
+ OutlierDetection: &networking.OutlierDetection{
+ ConsecutiveErrors: 5,
+ },
+ },
+ },
+ }})
+
+ return env
+}
+
+func buildEnvForClustersWithFailover() *model.Environment {
+ serviceDiscovery := &fakes.ServiceDiscovery{}
+
+ serviceDiscovery.ServicesReturns([]*model.Service{
+ {
+ Hostname: "test.example.org",
+ Address: "1.1.1.1",
+ ClusterVIPs: make(map[string]string),
+ Ports: model.PortList{
+ &model.Port{
+ Name: "default",
+ Port: 8080,
+ Protocol: model.ProtocolHTTP,
+ },
+ },
+ },
+ }, nil)
+
+ meshConfig := &meshconfig.MeshConfig{
+ ConnectTimeout: &types.Duration{
+ Seconds: 10,
+ Nanos: 1,
+ },
+ LocalityLbSetting: &meshconfig.LocalityLoadBalancerSetting{
+ Failover: []*meshconfig.LocalityLoadBalancerSetting_Failover{
+ {
+ From: "region1",
+ To: "region2",
+ },
+ },
+ },
+ }
+
+ configStore := &fakes.IstioConfigStore{}
+
+ env := &model.Environment{
+ ServiceDiscovery: serviceDiscovery,
+ ServiceAccounts: &fakes.ServiceAccounts{},
+ IstioConfigStore: configStore,
+ Mesh: meshConfig,
+ MixerSAN: []string{},
+ }
+
+ env.PushContext = model.NewPushContext()
+ env.PushContext.InitContext(env)
+ env.PushContext.SetDestinationRules([]model.Config{
+ {ConfigMeta: model.ConfigMeta{
+ Type: model.DestinationRule.Type,
+ Version: model.DestinationRule.Version,
+ Name: "acme",
+ },
+ Spec: &networking.DestinationRule{
+ Host: "test.example.org",
+ TrafficPolicy: &networking.TrafficPolicy{
+ OutlierDetection: &networking.OutlierDetection{
+ ConsecutiveErrors: 5,
+ },
+ },
+ },
+ }})
+
+ return env
+}
+
+func buildFakeCluster() *apiv2.Cluster {
+ return &apiv2.Cluster{
+ Name: "outbound|8080||test.example.org",
+ LoadAssignment: &apiv2.ClusterLoadAssignment{
+ ClusterName: "outbound|8080||test.example.org",
+ Endpoints: []endpoint.LocalityLbEndpoints{
+ {
+ Locality: &envoycore.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ SubZone: "subzone1",
+ },
+ LbEndpoints: []endpoint.LbEndpoint{},
+ LoadBalancingWeight: &types.UInt32Value{
+ Value: 1,
+ },
+ Priority: 0,
+ },
+ {
+ Locality: &envoycore.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ SubZone: "subzone2",
+ },
+ LbEndpoints: []endpoint.LbEndpoint{},
+ LoadBalancingWeight: &types.UInt32Value{
+ Value: 1,
+ },
+ Priority: 0,
+ },
+ {
+ Locality: &envoycore.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ SubZone: "subzone3",
+ },
+ LbEndpoints: []endpoint.LbEndpoint{},
+ LoadBalancingWeight: &types.UInt32Value{
+ Value: 1,
+ },
+ Priority: 0,
+ },
+ {
+ Locality: &envoycore.Locality{
+ Region: "region1",
+ Zone: "zone2",
+ SubZone: "",
+ },
+ LbEndpoints: []endpoint.LbEndpoint{},
+ LoadBalancingWeight: &types.UInt32Value{
+ Value: 1,
+ },
+ Priority: 0,
+ },
+ {
+ Locality: &envoycore.Locality{
+ Region: "region2",
+ Zone: "",
+ SubZone: "",
+ },
+ LbEndpoints: []endpoint.LbEndpoint{},
+ LoadBalancingWeight: &types.UInt32Value{
+ Value: 1,
+ },
+ Priority: 0,
+ },
+ {
+ Locality: &envoycore.Locality{
+ Region: "region3",
+ Zone: "",
+ SubZone: "",
+ },
+ LbEndpoints: []endpoint.LbEndpoint{},
+ LoadBalancingWeight: &types.UInt32Value{
+ Value: 1,
+ },
+ Priority: 0,
+ },
+ },
+ },
+ }
+}
diff --git a/pilot/pkg/networking/core/v1alpha3/fakes/fake_service_discovery.go b/pilot/pkg/networking/core/v1alpha3/fakes/fake_service_discovery.go
index c3175799542e..4715471632ce 100644
--- a/pilot/pkg/networking/core/v1alpha3/fakes/fake_service_discovery.go
+++ b/pilot/pkg/networking/core/v1alpha3/fakes/fake_service_discovery.go
@@ -346,6 +346,12 @@ func (fake *ServiceDiscovery) GetProxyServiceInstances(arg1 *model.Proxy) ([]*mo
return fake.getProxyServiceInstancesReturns.result1, fake.getProxyServiceInstancesReturns.result2
}
+// GetProxyLocality returns the locality where the proxy runs.
+func (fake *ServiceDiscovery) GetProxyLocality(node *model.Proxy) string {
+ // not implemented
+ return ""
+}
+
func (fake *ServiceDiscovery) GetProxyServiceInstancesCallCount() int {
fake.getProxyServiceInstancesMutex.RLock()
defer fake.getProxyServiceInstancesMutex.RUnlock()
diff --git a/pilot/pkg/networking/util/util.go b/pilot/pkg/networking/util/util.go
index 4790c089e97c..c54895b41626 100644
--- a/pilot/pkg/networking/util/util.go
+++ b/pilot/pkg/networking/util/util.go
@@ -259,22 +259,77 @@ func ConvertLocality(locality string) *core.Locality {
return nil
}
+ region, zone, subzone := SplitLocality(locality)
+ return &core.Locality{
+ Region: region,
+ Zone: zone,
+ SubZone: subzone,
+ }
+}
+
+func LocalityMatch(proxyLocality model.LocalityInterface, ruleLocality string) bool {
+ ruleRegion, ruleZone, ruleSubzone := SplitLocality(ruleLocality)
+ regionMatch := ruleRegion == "*" || proxyLocality.GetRegion() == ruleRegion
+ zoneMatch := ruleZone == "*" || ruleZone == "" || proxyLocality.GetZone() == ruleZone
+ subzoneMatch := ruleSubzone == "*" || ruleSubzone == "" || proxyLocality.GetSubZone() == ruleSubzone
+
+ if regionMatch && zoneMatch && subzoneMatch {
+ return true
+ }
+ return false
+}
+
+func SplitLocality(locality string) (region, zone, subzone string) {
items := strings.Split(locality, "/")
switch len(items) {
case 1:
- return &core.Locality{
- Region: items[0],
- }
+ return items[0], "", ""
case 2:
- return &core.Locality{
- Region: items[0],
- Zone: items[1],
- }
+ return items[0], items[1], ""
default:
- return &core.Locality{
- Region: items[0],
- Zone: items[1],
- SubZone: items[2],
+ return items[0], items[1], items[2]
+ }
+}
+
+func LbPriority(proxyLocality, endpointsLocality model.LocalityInterface) int {
+ if proxyLocality.GetRegion() == endpointsLocality.GetRegion() {
+ if proxyLocality.GetZone() == endpointsLocality.GetZone() {
+ if proxyLocality.GetSubZone() == endpointsLocality.GetSubZone() {
+ return 0
+ }
+ return 1
+ }
+ return 2
+ }
+ return 3
+}
+
+// return a shallow copy cluster
+func CloneCluster(cluster *xdsapi.Cluster) *xdsapi.Cluster {
+ if cluster == nil {
+ return nil
+ }
+
+ out := *cluster
+ loadAssignment := *cluster.LoadAssignment
+ out.LoadAssignment = &loadAssignment
+ clonedLocEps := CloneLocalityLbEndpoints(loadAssignment.Endpoints)
+ out.LoadAssignment.Endpoints = clonedLocEps
+
+ return &out
+}
+
+// return a shallow copy LocalityLbEndpoints
+func CloneLocalityLbEndpoints(endpoints []endpoint.LocalityLbEndpoints) []endpoint.LocalityLbEndpoints {
+ out := make([]endpoint.LocalityLbEndpoints, 0, len(endpoints))
+ for _, ep := range endpoints {
+ clone := ep
+ if ep.LoadBalancingWeight != nil {
+ clone.LoadBalancingWeight = &types.UInt32Value{
+ Value: ep.GetLoadBalancingWeight().GetValue(),
+ }
}
+ out = append(out, clone)
}
+ return out
}
diff --git a/pilot/pkg/networking/util/util_test.go b/pilot/pkg/networking/util/util_test.go
index 98563ef201a2..10228d5533cf 100644
--- a/pilot/pkg/networking/util/util_test.go
+++ b/pilot/pkg/networking/util/util_test.go
@@ -18,7 +18,9 @@ import (
"reflect"
"testing"
+ v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
"github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
+ "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"
"github.com/gogo/protobuf/types"
meshconfig "istio.io/api/mesh/v1alpha1"
@@ -271,3 +273,153 @@ func TestConvertLocality(t *testing.T) {
})
}
}
+
+func TestLocalityMatch(t *testing.T) {
+ tests := []struct {
+ name string
+ locality *core.Locality
+ rule string
+ match bool
+ }{
+ {
+ name: "wildcard matching",
+ locality: &core.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ SubZone: "subzone1",
+ },
+ rule: "*",
+ match: true,
+ },
+ {
+ name: "wildcard matching",
+ locality: &core.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ SubZone: "subzone1",
+ },
+ rule: "region1/*",
+ match: true,
+ },
+ {
+ name: "wildcard matching",
+ locality: &core.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ SubZone: "subzone1",
+ },
+ rule: "region1/zone1/*",
+ match: true,
+ },
+ {
+ name: "wildcard not matching",
+ locality: &core.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ SubZone: "subzone1",
+ },
+ rule: "region1/zone2/*",
+ match: false,
+ },
+ {
+ name: "region matching",
+ locality: &core.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ SubZone: "subzone1",
+ },
+ rule: "region1",
+ match: true,
+ },
+ {
+ name: "region and zone matching",
+ locality: &core.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ SubZone: "subzone1",
+ },
+ rule: "region1/zone1",
+ match: true,
+ },
+ {
+ name: "zubzone wildcard matching",
+ locality: &core.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ },
+ rule: "region1/zone1",
+ match: true,
+ },
+ {
+ name: "subzone mismatching",
+ locality: &core.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ },
+ rule: "region1/zone1/subzone2",
+ match: false,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ match := LocalityMatch(tt.locality, tt.rule)
+ if match != tt.match {
+ t.Errorf("Expected matching result %v, but got %v", tt.match, match)
+ }
+ })
+ }
+}
+
+func TestCloneCluster(t *testing.T) {
+ cluster := buildFakeCluster()
+ clone := CloneCluster(cluster)
+ cluster.LoadAssignment.Endpoints[0].LoadBalancingWeight.Value = 10
+ cluster.LoadAssignment.Endpoints[0].Priority = 8
+ cluster.LoadAssignment.Endpoints[0].LbEndpoints = nil
+
+ if clone.LoadAssignment.Endpoints[0].LoadBalancingWeight.GetValue() == 10 {
+ t.Errorf("LoadBalancingWeight mutated")
+ }
+ if clone.LoadAssignment.Endpoints[0].Priority == 8 {
+ t.Errorf("Priority mutated")
+ }
+ if clone.LoadAssignment.Endpoints[0].LbEndpoints == nil {
+ t.Errorf("LbEndpoints mutated")
+ }
+}
+
+func buildFakeCluster() *v2.Cluster {
+ return &v2.Cluster{
+ Name: "outbound|8080||test.example.org",
+ LoadAssignment: &v2.ClusterLoadAssignment{
+ ClusterName: "outbound|8080||test.example.org",
+ Endpoints: []endpoint.LocalityLbEndpoints{
+ {
+ Locality: &core.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ SubZone: "subzone1",
+ },
+ LbEndpoints: []endpoint.LbEndpoint{},
+ LoadBalancingWeight: &types.UInt32Value{
+ Value: 1,
+ },
+ Priority: 0,
+ },
+ {
+ Locality: &core.Locality{
+ Region: "region1",
+ Zone: "zone1",
+ SubZone: "subzone2",
+ },
+ LbEndpoints: []endpoint.LbEndpoint{},
+ LoadBalancingWeight: &types.UInt32Value{
+ Value: 1,
+ },
+ Priority: 0,
+ },
+ },
+ },
+ }
+}
diff --git a/pilot/pkg/proxy/envoy/v2/ads.go b/pilot/pkg/proxy/envoy/v2/ads.go
index 66ccd4510f45..bb64100f68ad 100644
--- a/pilot/pkg/proxy/envoy/v2/ads.go
+++ b/pilot/pkg/proxy/envoy/v2/ads.go
@@ -35,6 +35,7 @@ import (
"google.golang.org/grpc/status"
"istio.io/istio/pilot/pkg/model"
+ "istio.io/istio/pilot/pkg/networking/util"
istiolog "istio.io/istio/pkg/log"
)
@@ -620,7 +621,18 @@ func (s *DiscoveryServer) initConnectionNode(discReq *xdsapi.DiscoveryRequest, c
}
// Update the config namespace associated with this proxy
nt.ConfigNamespace = model.GetProxyConfigNamespace(nt)
-
+ locality := model.GetProxyLocality(discReq.Node)
+ if locality == nil {
+ locality := s.Env.GetProxyLocality(nt)
+ region, zone, subzone := util.SplitLocality(locality)
+ nt.Locality = model.Locality{
+ Region: region,
+ Zone: zone,
+ SubZone: subzone,
+ }
+ } else {
+ nt.Locality = *locality
+ }
con.mu.Lock()
con.modelNode = nt
if con.ConID == "" {
@@ -754,9 +766,12 @@ func (s *DiscoveryServer) AdsPushAll(version string, push *model.PushContext,
// instead of once per endpoint.
edsClusterMutex.Lock()
// Create a temp map to avoid locking the add/remove
- cMap := make(map[string]*EdsCluster, len(edsClusters))
+ cMap := make(map[string]map[model.Locality]*EdsCluster, len(edsClusters))
for k, v := range edsClusters {
- cMap[k] = v
+ cMap[k] = map[model.Locality]*EdsCluster{}
+ for locality, edsCluster := range v {
+ cMap[k][locality] = edsCluster
+ }
}
edsClusterMutex.Unlock()
diff --git a/pilot/pkg/proxy/envoy/v2/ads_test.go b/pilot/pkg/proxy/envoy/v2/ads_test.go
index db854b9c729c..574016e5cf3f 100644
--- a/pilot/pkg/proxy/envoy/v2/ads_test.go
+++ b/pilot/pkg/proxy/envoy/v2/ads_test.go
@@ -55,7 +55,7 @@ func TestAdsReconnectWithNonce(t *testing.T) {
}
defer cancel()
- err = sendEDSReqReconnect([]string{"service3.default.svc.cluster.local|http"}, edsstr, res)
+ err = sendEDSReqReconnect([]string{"outbound|1080||service3.default.svc.cluster.local"}, edsstr, res)
if err != nil {
t.Fatal(err)
}
diff --git a/pilot/pkg/proxy/envoy/v2/debug.go b/pilot/pkg/proxy/envoy/v2/debug.go
index 510cb6c07cfe..328066116a35 100644
--- a/pilot/pkg/proxy/envoy/v2/debug.go
+++ b/pilot/pkg/proxy/envoy/v2/debug.go
@@ -494,15 +494,17 @@ func (s *DiscoveryServer) edsz(w http.ResponseWriter, req *http.Request) {
if len(edsClusters) > 0 {
fmt.Fprintln(w, "[")
for _, eds := range edsClusters {
- if comma {
- fmt.Fprint(w, ",\n")
- } else {
- comma = true
- }
- jsonm := &jsonpb.Marshaler{Indent: " "}
- dbgString, _ := jsonm.MarshalToString(eds.LoadAssignment)
- if _, err := w.Write([]byte(dbgString)); err != nil {
- return
+ for _, eds := range eds {
+ if comma {
+ fmt.Fprint(w, ",\n")
+ } else {
+ comma = true
+ }
+ jsonm := &jsonpb.Marshaler{Indent: " "}
+ dbgString, _ := jsonm.MarshalToString(eds.LoadAssignment)
+ if _, err := w.Write([]byte(dbgString)); err != nil {
+ return
+ }
}
}
fmt.Fprintln(w, "]")
diff --git a/pilot/pkg/proxy/envoy/v2/eds.go b/pilot/pkg/proxy/envoy/v2/eds.go
index cd10f7f2e540..af5af4bb0b0e 100644
--- a/pilot/pkg/proxy/envoy/v2/eds.go
+++ b/pilot/pkg/proxy/envoy/v2/eds.go
@@ -28,6 +28,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"istio.io/istio/pilot/pkg/model"
+ networking_core "istio.io/istio/pilot/pkg/networking/core/v1alpha3"
"istio.io/istio/pilot/pkg/networking/util"
"istio.io/istio/pilot/pkg/serviceregistry/aggregate"
)
@@ -57,7 +58,7 @@ import (
var (
edsClusterMutex sync.RWMutex
- edsClusters = map[string]*EdsCluster{}
+ edsClusters = map[string]map[model.Locality]*EdsCluster{}
// Tracks connections, increment on each new connection.
connectionNumber = int64(0)
@@ -175,8 +176,7 @@ func endpointMetadata(UID string, network string) *core.Metadata {
// a cluster of same name but with different set of endpoints. See the
// explanation below for more details
func (s *DiscoveryServer) updateClusterInc(push *model.PushContext, clusterName string,
- edsCluster *EdsCluster) error {
-
+ edsClusters map[model.Locality]*EdsCluster) error {
var hostname model.Hostname
var port int
var subsetName string
@@ -193,17 +193,17 @@ func (s *DiscoveryServer) updateClusterInc(push *model.PushContext, clusterName
portMap, f := push.ServicePort2Name[string(hostname)]
if !f {
- return s.updateCluster(push, clusterName, edsCluster)
+ return s.updateCluster(push, clusterName, edsClusters)
}
svcPort, f := portMap.GetByPort(port)
if !f {
- return s.updateCluster(push, clusterName, edsCluster)
+ return s.updateCluster(push, clusterName, edsClusters)
}
// The service was never updated - do the full update
se, f := s.EndpointShardsByService[string(hostname)]
if !f {
- return s.updateCluster(push, clusterName, edsCluster)
+ return s.updateCluster(push, clusterName, edsClusters)
}
cnt := 0
@@ -254,20 +254,35 @@ func (s *DiscoveryServer) updateClusterInc(push *model.PushContext, clusterName
}
edsInstances.With(prometheus.Labels{"cluster": clusterName}).Set(float64(cnt))
- // There is a chance multiple goroutines will update the cluster at the same time.
- // This could be prevented by a lock - but because the update may be slow, it may be
- // better to accept the extra computations.
- // We still lock the access to the LoadAssignments.
- edsCluster.mutex.Lock()
- defer edsCluster.mutex.Unlock()
-
- edsCluster.LoadAssignment = &xdsapi.ClusterLoadAssignment{
- ClusterName: clusterName,
- Endpoints: locEps,
- }
- if len(locEps) > 0 && edsCluster.NonEmptyTime.IsZero() {
- edsCluster.NonEmptyTime = time.Now()
+ for locality, edsCluster := range edsClusters {
+ // shallow copy locEps LocalityLbEndpoints,
+ // because below may mutate its LoadBalancingWeight or Priority
+ clonedLocEps := util.CloneLocalityLbEndpoints(locEps)
+
+ // There is a chance multiple goroutines will update the cluster at the same time.
+ // This could be prevented by a lock - but because the update may be slow, it may be
+ // better to accept the extra computations.
+ // We still lock the access to the LoadAssignments.
+ edsCluster.mutex.Lock()
+ defer edsCluster.mutex.Unlock()
+
+ edsCluster.LoadAssignment = &xdsapi.ClusterLoadAssignment{
+ ClusterName: clusterName,
+ Endpoints: clonedLocEps,
+ }
+ if len(clonedLocEps) > 0 && edsCluster.NonEmptyTime.IsZero() {
+ edsCluster.NonEmptyTime = time.Now()
+ }
+ dummyCluster := &xdsapi.Cluster{
+ Name: clusterName,
+ LoadAssignment: edsCluster.LoadAssignment,
+ }
+ dummyNode := &model.Proxy{
+ Locality: locality,
+ }
+ networking_core.ApplyLocalityLBSetting(dummyNode, dummyCluster, push)
}
+
return nil
}
@@ -351,7 +366,7 @@ func (s *DiscoveryServer) updateServiceShards(push *model.PushContext) error {
// updateCluster is called from the event (or global cache invalidation) to update
// the endpoints for the cluster.
-func (s *DiscoveryServer) updateCluster(push *model.PushContext, clusterName string, edsCluster *EdsCluster) error {
+func (s *DiscoveryServer) updateCluster(push *model.PushContext, clusterName string, edsClusters map[model.Locality]*EdsCluster) error {
// TODO: should we lock this as well ? Once we move to event-based it may not matter.
var locEps []endpoint.LocalityLbEndpoints
direction, subsetName, hostname, port := model.ParseSubsetKey(clusterName)
@@ -378,22 +393,35 @@ func (s *DiscoveryServer) updateCluster(push *model.PushContext, clusterName str
Value: uint32(len(locEps[i].LbEndpoints)),
}
}
- // There is a chance multiple goroutines will update the cluster at the same time.
- // This could be prevented by a lock - but because the update may be slow, it may be
- // better to accept the extra computations.
- // We still lock the access to the LoadAssignments.
- edsCluster.mutex.Lock()
- defer edsCluster.mutex.Unlock()
-
// Normalize LoadBalancingWeight in range [1, 128]
locEps = LoadBalancingWeightNormalize(locEps)
- edsCluster.LoadAssignment = &xdsapi.ClusterLoadAssignment{
- ClusterName: clusterName,
- Endpoints: locEps,
- }
- if len(locEps) > 0 && edsCluster.NonEmptyTime.IsZero() {
- edsCluster.NonEmptyTime = time.Now()
+ for locality, edsCluster := range edsClusters {
+ // shallow copy locEps LocalityLbEndpoints,
+ // because below may mutate its LoadBalancingWeight or Priority
+ clonedLocEps := util.CloneLocalityLbEndpoints(locEps)
+
+ // There is a chance multiple goroutines will update the cluster at the same time.
+ // This could be prevented by a lock - but because the update may be slow, it may be
+ // better to accept the extra computations.
+ // We still lock the access to the LoadAssignments.
+ edsCluster.mutex.Lock()
+ defer edsCluster.mutex.Unlock()
+ edsCluster.LoadAssignment = &xdsapi.ClusterLoadAssignment{
+ ClusterName: clusterName,
+ Endpoints: clonedLocEps,
+ }
+ if len(clonedLocEps) > 0 && edsCluster.NonEmptyTime.IsZero() {
+ edsCluster.NonEmptyTime = time.Now()
+ }
+ dummyCluster := &xdsapi.Cluster{
+ Name: clusterName,
+ LoadAssignment: edsCluster.LoadAssignment,
+ }
+ dummyNode := &model.Proxy{
+ Locality: locality,
+ }
+ networking_core.ApplyLocalityLBSetting(dummyNode, dummyCluster, push)
}
return nil
}
@@ -427,14 +455,17 @@ func (s *DiscoveryServer) edsIncremental(version string, push *model.PushContext
// instead of once per endpoint.
edsClusterMutex.Lock()
// Create a temp map to avoid locking the add/remove
- cMap := make(map[string]*EdsCluster, len(edsClusters))
+ cMap := make(map[string]map[model.Locality]*EdsCluster, len(edsClusters))
for k, v := range edsClusters {
_, _, hostname, _ := model.ParseSubsetKey(k)
if edsUpdates[string(hostname)] == nil {
// Cluster was not updated, skip recomputing.
continue
}
- cMap[k] = v
+ cMap[k] = make(map[model.Locality]*EdsCluster)
+ for locality, edsCluster := range v {
+ cMap[k][locality] = edsCluster
+ }
}
edsClusterMutex.Unlock()
@@ -599,17 +630,15 @@ func (s *DiscoveryServer) pushEds(push *model.PushContext, con *XdsConnection,
emptyClusters := 0
endpoints := 0
- empty := []string{}
for _, clusterName := range con.Clusters {
-
_, _, hostname, _ := model.ParseSubsetKey(clusterName)
if edsUpdatedServices != nil && edsUpdatedServices[string(hostname)] == nil {
// Cluster was not updated, skip recomputing.
continue
}
- c := s.getEdsCluster(clusterName)
+ c := s.getEdsCluster(con.modelNode, clusterName)
if c == nil {
totalXDSInternalErrors.Add(1)
adsLog.Errorf("cluster %s was nil skipping it.", clusterName)
@@ -618,7 +647,10 @@ func (s *DiscoveryServer) pushEds(push *model.PushContext, con *XdsConnection,
l := loadAssignment(c)
if l == nil { // fresh cluster
- if err := s.updateCluster(push, clusterName, c); err != nil {
+ edsClusters := map[model.Locality]*EdsCluster{
+ con.modelNode.Locality: c,
+ }
+ if err := s.updateCluster(push, clusterName, edsClusters); err != nil {
adsLog.Errorf("error returned from updateCluster for cluster name %s, skipping it.", clusterName)
totalXDSInternalErrors.Add(1)
continue
@@ -642,7 +674,6 @@ func (s *DiscoveryServer) pushEds(push *model.PushContext, con *XdsConnection,
endpoints += len(l.Endpoints)
if len(l.Endpoints) == 0 {
emptyClusters++
- empty = append(empty, clusterName)
}
loadAssignments = append(loadAssignments, l)
}
@@ -669,7 +700,7 @@ func (s *DiscoveryServer) pushEds(push *model.PushContext, con *XdsConnection,
// addEdsCon will track the eds connection with clusters, for optimized event-based push and debug
func (s *DiscoveryServer) addEdsCon(clusterName string, node string, connection *XdsConnection) {
- c := s.getOrAddEdsCluster(clusterName)
+ c := s.getOrAddEdsCluster(connection.modelNode, clusterName)
// TODO: left the code here so we can skip sending the already-sent clusters.
// See comments in ads - envoy keeps adding one cluster to the list (this seems new
// previous version sent all the clusters from CDS in bulk).
@@ -689,32 +720,49 @@ func (s *DiscoveryServer) addEdsCon(clusterName string, node string, connection
}
// getEdsCluster returns a cluster.
-func (s *DiscoveryServer) getEdsCluster(clusterName string) *EdsCluster {
+func (s *DiscoveryServer) getEdsCluster(proxy *model.Proxy, clusterName string) *EdsCluster {
// separate method only to have proper lock.
edsClusterMutex.RLock()
defer edsClusterMutex.RUnlock()
- return edsClusters[clusterName]
+ if _, ok := edsClusters[clusterName]; ok {
+ return edsClusters[clusterName][proxy.Locality]
+ }
+ return nil
}
-func (s *DiscoveryServer) getOrAddEdsCluster(clusterName string) *EdsCluster {
+func (s *DiscoveryServer) getOrAddEdsCluster(proxy *model.Proxy, clusterName string) *EdsCluster {
edsClusterMutex.Lock()
defer edsClusterMutex.Unlock()
c := edsClusters[clusterName]
if c == nil {
- c = &EdsCluster{discovery: s,
+ c := &EdsCluster{
+ discovery: s,
EdsClients: map[string]*XdsConnection{},
FirstUse: time.Now(),
}
- edsClusters[clusterName] = c
+ edsClusters[clusterName] = map[model.Locality]*EdsCluster{
+ proxy.Locality: c,
+ }
+ return c
+ }
+ if c != nil && c[proxy.Locality] == nil {
+ c := &EdsCluster{
+ discovery: s,
+ EdsClients: map[string]*XdsConnection{},
+ FirstUse: time.Now(),
+ }
+ edsClusters[clusterName][proxy.Locality] = c
+ return c
}
- return c
+
+ return edsClusters[clusterName][proxy.Locality]
}
// removeEdsCon is called when a gRPC stream is closed, for each cluster that was watched by the
// stream. As of 0.7 envoy watches a single cluster per gprc stream.
func (s *DiscoveryServer) removeEdsCon(clusterName string, node string, connection *XdsConnection) {
- c := s.getEdsCluster(clusterName)
+ c := s.getEdsCluster(connection.modelNode, clusterName)
if c == nil {
adsLog.Warnf("EDS: missing cluster %s", clusterName)
return
diff --git a/pilot/pkg/proxy/envoy/v2/mem.go b/pilot/pkg/proxy/envoy/v2/mem.go
index 71b71dec7364..97929f5ee0ca 100644
--- a/pilot/pkg/proxy/envoy/v2/mem.go
+++ b/pilot/pkg/proxy/envoy/v2/mem.go
@@ -320,6 +320,12 @@ func (sd *MemServiceDiscovery) GetProxyServiceInstances(node *model.Proxy) ([]*m
return out, sd.GetProxyServiceInstancesError
}
+// GetProxyLocality returns the locality where the proxy runs.
+func (sd *MemServiceDiscovery) GetProxyLocality(node *model.Proxy) string {
+ // not implemented
+ return ""
+}
+
// ManagementPorts implements discovery interface
func (sd *MemServiceDiscovery) ManagementPorts(addr string) model.PortList {
sd.mutex.Lock()
diff --git a/pilot/pkg/serviceregistry/aggregate/controller.go b/pilot/pkg/serviceregistry/aggregate/controller.go
index 43fc276215d1..1159f25e3859 100644
--- a/pilot/pkg/serviceregistry/aggregate/controller.go
+++ b/pilot/pkg/serviceregistry/aggregate/controller.go
@@ -243,6 +243,17 @@ func (c *Controller) GetProxyServiceInstances(node *model.Proxy) ([]*model.Servi
return out, errs
}
+// GetProxyLocality returns the locality where the proxy runs.
+func (c *Controller) GetProxyLocality(proxy *model.Proxy) string {
+ for _, r := range c.GetRegistries() {
+ locality := r.GetProxyLocality(proxy)
+ if len(locality) > 0 {
+ return locality
+ }
+ }
+ return ""
+}
+
// Run starts all the controllers
func (c *Controller) Run(stop <-chan struct{}) {
diff --git a/pilot/pkg/serviceregistry/consul/controller.go b/pilot/pkg/serviceregistry/consul/controller.go
index c8f7443c1b9a..6a83d7e86072 100644
--- a/pilot/pkg/serviceregistry/consul/controller.go
+++ b/pilot/pkg/serviceregistry/consul/controller.go
@@ -179,6 +179,12 @@ func (c *Controller) GetProxyServiceInstances(node *model.Proxy) ([]*model.Servi
return out, nil
}
+// GetProxyLocality returns the locality where the proxy runs.
+func (c *Controller) GetProxyLocality(node *model.Proxy) string {
+ // not implemented
+ return ""
+}
+
// Run all controllers until a signal is received
func (c *Controller) Run(stop <-chan struct{}) {
c.monitor.Start(stop)
diff --git a/pilot/pkg/serviceregistry/external/servicediscovery.go b/pilot/pkg/serviceregistry/external/servicediscovery.go
index e5c9b805c054..d126276d095c 100644
--- a/pilot/pkg/serviceregistry/external/servicediscovery.go
+++ b/pilot/pkg/serviceregistry/external/servicediscovery.go
@@ -238,6 +238,12 @@ func (d *ServiceEntryStore) GetProxyServiceInstances(node *model.Proxy) ([]*mode
return out, nil
}
+// GetProxyLocality returns the locality where the proxy runs.
+func (d *ServiceEntryStore) GetProxyLocality(node *model.Proxy) string {
+ // not supported
+ return ""
+}
+
// GetIstioServiceAccounts implements model.ServiceAccounts operation TODOg
func (d *ServiceEntryStore) GetIstioServiceAccounts(hostname model.Hostname, ports []int) []string {
//for service entries, there is no istio auth, no service accounts, etc. It is just a
diff --git a/pilot/pkg/serviceregistry/kube/controller.go b/pilot/pkg/serviceregistry/kube/controller.go
index 286896078e2e..49cc76c4e789 100644
--- a/pilot/pkg/serviceregistry/kube/controller.go
+++ b/pilot/pkg/serviceregistry/kube/controller.go
@@ -312,8 +312,8 @@ func (c *Controller) serviceByKey(name, namespace string) (*v1.Service, bool) {
return item.(*v1.Service), true
}
-// GetPodAZ retrieves the AZ for a pod.
-func (c *Controller) GetPodAZ(pod *v1.Pod) string {
+// GetPodLocality retrieves the locality for a pod.
+func (c *Controller) GetPodLocality(pod *v1.Pod) string {
// NodeName is set by the scheduler after the pod is created
// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#late-initialization
node, exists, err := c.nodes.informer.GetStore().GetByKey(pod.Spec.NodeName)
@@ -452,7 +452,7 @@ func (c *Controller) InstancesByPort(hostname model.Hostname, reqSvcPort int,
pod := c.pods.getPodByIP(ea.IP)
az, sa, uid := "", "", ""
if pod != nil {
- az = c.GetPodAZ(pod)
+ az = c.GetPodLocality(pod)
sa = kubeToIstioServiceAccount(pod.Spec.ServiceAccountName, pod.GetNamespace())
uid = fmt.Sprintf("kubernetes://%s.%s", pod.Name, pod.Namespace)
}
@@ -546,6 +546,17 @@ func (c *Controller) GetProxyServiceInstances(proxy *model.Proxy) ([]*model.Serv
return out, nil
}
+// GetProxyLocality returns the locality where the proxy runs.
+func (c *Controller) GetProxyLocality(proxy *model.Proxy) string {
+ proxyIP := proxy.IPAddresses[0]
+ locality := ""
+ pod := c.pods.getPodByIP(proxyIP)
+ if pod != nil {
+ locality = c.GetPodLocality(pod)
+ }
+ return locality
+}
+
func (c *Controller) getProxyServiceInstancesByEndpoint(endpoints v1.Endpoints, proxy *model.Proxy) []*model.ServiceInstance {
out := make([]*model.ServiceInstance, 0)
@@ -588,7 +599,7 @@ func getEndpoints(ip string, c *Controller, port v1.EndpointPort, svcPort *model
pod := c.pods.getPodByIP(ip)
az, sa := "", ""
if pod != nil {
- az = c.GetPodAZ(pod)
+ az = c.GetPodLocality(pod)
sa = kubeToIstioServiceAccount(pod.Spec.ServiceAccountName, pod.GetNamespace())
}
return &model.ServiceInstance{
diff --git a/pilot/pkg/serviceregistry/kube/controller_test.go b/pilot/pkg/serviceregistry/kube/controller_test.go
index c7eb3820a1d7..df55c4022189 100644
--- a/pilot/pkg/serviceregistry/kube/controller_test.go
+++ b/pilot/pkg/serviceregistry/kube/controller_test.go
@@ -383,7 +383,7 @@ func TestController_getPodAZ(t *testing.T) {
// Verify expected existing pod AZs
for pod, wantAZ := range c.wantAZ {
- az := controller.GetPodAZ(pod)
+ az := controller.GetPodLocality(pod)
if wantAZ != "" {
if !reflect.DeepEqual(az, wantAZ) {
t.Errorf("Wanted az: %s, got: %s", wantAZ, az)
diff --git a/pilot/pkg/serviceregistry/memory/discovery.go b/pilot/pkg/serviceregistry/memory/discovery.go
index 7cd80800f78b..aacf8a5b6933 100644
--- a/pilot/pkg/serviceregistry/memory/discovery.go
+++ b/pilot/pkg/serviceregistry/memory/discovery.go
@@ -241,6 +241,12 @@ func (sd *ServiceDiscovery) GetProxyServiceInstances(node *model.Proxy) ([]*mode
return out, sd.GetProxyServiceInstancesError
}
+// GetProxyLocality returns the locality where the proxy runs.
+func (sd *ServiceDiscovery) GetProxyLocality(node *model.Proxy) string {
+ // not implemented
+ return ""
+}
+
// ManagementPorts implements discovery interface
func (sd *ServiceDiscovery) ManagementPorts(addr string) model.PortList {
return model.PortList{{
diff --git a/vendor/istio.io/api/mesh/v1alpha1/config.pb.go b/vendor/istio.io/api/mesh/v1alpha1/config.pb.go
index 9113cf2515e2..f981795b62db 100644
--- a/vendor/istio.io/api/mesh/v1alpha1/config.pb.go
+++ b/vendor/istio.io/api/mesh/v1alpha1/config.pb.go
@@ -12,6 +12,7 @@
It has these top-level messages:
MeshConfig
ConfigSource
+ LocalityLoadBalancerSetting
Network
MeshNetworks
Tracing
@@ -242,6 +243,8 @@ type MeshConfig struct {
// rules, and other Istio configuration artifacts. Multiple data sources
// can be configured for a single control plane.
ConfigSources []*ConfigSource `protobuf:"bytes,22,rep,name=config_sources,json=configSources" json:"config_sources,omitempty"`
+ // Locality based load balancing distribution or failover settings.
+ LocalityLbSetting *LocalityLoadBalancerSetting `protobuf:"bytes,31,opt,name=locality_lb_setting,json=localityLbSetting" json:"locality_lb_setting,omitempty"`
// $hide_from_docs
// This flag is used by secret discovery service(SDS).
// If set to true(prerequisite: https://kubernetes.io/docs/concepts/storage/volumes/#projected), Istio will inject volumes mount
@@ -443,6 +446,13 @@ func (m *MeshConfig) GetConfigSources() []*ConfigSource {
return nil
}
+func (m *MeshConfig) GetLocalityLbSetting() *LocalityLoadBalancerSetting {
+ if m != nil {
+ return m.LocalityLbSetting
+ }
+ return nil
+}
+
func (m *MeshConfig) GetEnableSdsTokenMount() bool {
if m != nil {
return m.EnableSdsTokenMount
@@ -515,10 +525,141 @@ func (m *ConfigSource) GetTlsSettings() *istio_networking_v1alpha33.TLSSettings
return nil
}
+// The following example sets up locality weight for mesh wide service
+// Assume a service resides in "region1/zone1/*" and "region1/zone2/*",
+// and originating clusters also reside in "region1/zone1/*" and "region1/zone2/*".
+// This example specifies when clusters from "region1/zone1/*" accessing the service, 80% of the traffic
+// is shipped to "region1/zone1/*" ratings service endpoints, and the rest 20% to "region1/zone2/*".
+//
+// ```yaml
+// distribute:
+// - from: region1/zone1/*
+// to:
+// "region1/zone1/*": 80
+// "region1/zone2/*": 20
+// - from: region1/zone2/*
+// to:
+// "region1/zone1/*": 20
+// "region1/zone2/*": 80
+// ```
+//
+// The following example sets up locality failover policy for the ratings service
+// Assume a service resides in "region1" "region2" and "region3",
+// This example specifies when clusters from "region1/zone1" accessing the service,
+// if endpoints in "region1" becomes unhealthy, traffic will begin to trickle to "region2".
+//
+// ```yaml
+// failover:
+// - from: region1
+// to: region2
+// ```
+// Locality load balancing settings.
+type LocalityLoadBalancerSetting struct {
+ // Optional: only distribute or failover can be set.
+ // Explicitly specify loadbalancing weight across different zones and geographical locations.
+ // Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/load_balancing.html?highlight=load_balancing_weight#locality-weighted-load-balancing)
+ // If empty, the locality weight is set according to the endpoints number within it.
+ Distribute []*LocalityLoadBalancerSetting_Distribute `protobuf:"bytes,1,rep,name=distribute" json:"distribute,omitempty"`
+ // Optional: only failover or distribute can be set.
+ // Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
+ // Should be used together with OutlierDetection to detect unhealthy endpoints.
+ // Note: if no OutlierDetection specified, this will not take effect.
+ Failover []*LocalityLoadBalancerSetting_Failover `protobuf:"bytes,2,rep,name=failover" json:"failover,omitempty"`
+}
+
+func (m *LocalityLoadBalancerSetting) Reset() { *m = LocalityLoadBalancerSetting{} }
+func (m *LocalityLoadBalancerSetting) String() string { return proto.CompactTextString(m) }
+func (*LocalityLoadBalancerSetting) ProtoMessage() {}
+func (*LocalityLoadBalancerSetting) Descriptor() ([]byte, []int) {
+ return fileDescriptorConfig, []int{2}
+}
+
+func (m *LocalityLoadBalancerSetting) GetDistribute() []*LocalityLoadBalancerSetting_Distribute {
+ if m != nil {
+ return m.Distribute
+ }
+ return nil
+}
+
+func (m *LocalityLoadBalancerSetting) GetFailover() []*LocalityLoadBalancerSetting_Failover {
+ if m != nil {
+ return m.Failover
+ }
+ return nil
+}
+
+// Originating -> upstream cluster locality weight set, support wildcard matching '*'
+// '*' matches all localities
+// 'region1/*' matches all zones in region1
+type LocalityLoadBalancerSetting_Distribute struct {
+ // Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
+ From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
+ // Upstream locality to loadbalancing weight map. The sum of all weights should be == 100.
+ // Should assign load balancing weight for all localities, otherwise the traffic are not routed
+ // following the percentage of weight.
+ To map[string]uint32 `protobuf:"bytes,2,rep,name=to" json:"to,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
+}
+
+func (m *LocalityLoadBalancerSetting_Distribute) Reset() {
+ *m = LocalityLoadBalancerSetting_Distribute{}
+}
+func (m *LocalityLoadBalancerSetting_Distribute) String() string { return proto.CompactTextString(m) }
+func (*LocalityLoadBalancerSetting_Distribute) ProtoMessage() {}
+func (*LocalityLoadBalancerSetting_Distribute) Descriptor() ([]byte, []int) {
+ return fileDescriptorConfig, []int{2, 0}
+}
+
+func (m *LocalityLoadBalancerSetting_Distribute) GetFrom() string {
+ if m != nil {
+ return m.From
+ }
+ return ""
+}
+
+func (m *LocalityLoadBalancerSetting_Distribute) GetTo() map[string]uint32 {
+ if m != nil {
+ return m.To
+ }
+ return nil
+}
+
+// Specify the traffic failover policy.
+// As zone and sub_zone failover is supported by default, only region can be specified here.
+type LocalityLoadBalancerSetting_Failover struct {
+ // Originating region.
+ From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
+ // Destination region the traffic will fail over to when endpoints in local region becomes unhealthy.
+ To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
+}
+
+func (m *LocalityLoadBalancerSetting_Failover) Reset() { *m = LocalityLoadBalancerSetting_Failover{} }
+func (m *LocalityLoadBalancerSetting_Failover) String() string { return proto.CompactTextString(m) }
+func (*LocalityLoadBalancerSetting_Failover) ProtoMessage() {}
+func (*LocalityLoadBalancerSetting_Failover) Descriptor() ([]byte, []int) {
+ return fileDescriptorConfig, []int{2, 1}
+}
+
+func (m *LocalityLoadBalancerSetting_Failover) GetFrom() string {
+ if m != nil {
+ return m.From
+ }
+ return ""
+}
+
+func (m *LocalityLoadBalancerSetting_Failover) GetTo() string {
+ if m != nil {
+ return m.To
+ }
+ return ""
+}
+
func init() {
proto.RegisterType((*MeshConfig)(nil), "istio.mesh.v1alpha1.MeshConfig")
proto.RegisterType((*MeshConfig_OutboundTrafficPolicy)(nil), "istio.mesh.v1alpha1.MeshConfig.OutboundTrafficPolicy")
proto.RegisterType((*ConfigSource)(nil), "istio.mesh.v1alpha1.ConfigSource")
+ proto.RegisterType((*LocalityLoadBalancerSetting)(nil), "istio.mesh.v1alpha1.LocalityLoadBalancerSetting")
+ proto.RegisterType((*LocalityLoadBalancerSetting_Distribute)(nil), "istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Distribute")
+ proto.RegisterType((*LocalityLoadBalancerSetting_Failover)(nil), "istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Failover")
proto.RegisterEnum("istio.mesh.v1alpha1.MeshConfig_IngressControllerMode", MeshConfig_IngressControllerMode_name, MeshConfig_IngressControllerMode_value)
proto.RegisterEnum("istio.mesh.v1alpha1.MeshConfig_AuthPolicy", MeshConfig_AuthPolicy_name, MeshConfig_AuthPolicy_value)
proto.RegisterEnum("istio.mesh.v1alpha1.MeshConfig_AccessLogEncoding", MeshConfig_AccessLogEncoding_name, MeshConfig_AccessLogEncoding_value)
@@ -788,6 +929,18 @@ func (m *MeshConfig) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.LocalityLbSetting != nil {
+ dAtA[i] = 0xfa
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintConfig(dAtA, i, uint64(m.LocalityLbSetting.Size()))
+ n7, err := m.LocalityLbSetting.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
return i, nil
}
@@ -839,11 +992,123 @@ func (m *ConfigSource) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0x12
i++
i = encodeVarintConfig(dAtA, i, uint64(m.TlsSettings.Size()))
- n7, err := m.TlsSettings.MarshalTo(dAtA[i:])
+ n8, err := m.TlsSettings.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n7
+ i += n8
+ }
+ return i, nil
+}
+
+func (m *LocalityLoadBalancerSetting) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalityLoadBalancerSetting) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Distribute) > 0 {
+ for _, msg := range m.Distribute {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintConfig(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Failover) > 0 {
+ for _, msg := range m.Failover {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintConfig(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *LocalityLoadBalancerSetting_Distribute) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalityLoadBalancerSetting_Distribute) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.From) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintConfig(dAtA, i, uint64(len(m.From)))
+ i += copy(dAtA[i:], m.From)
+ }
+ if len(m.To) > 0 {
+ for k, _ := range m.To {
+ dAtA[i] = 0x12
+ i++
+ v := m.To[k]
+ mapSize := 1 + len(k) + sovConfig(uint64(len(k))) + 1 + sovConfig(uint64(v))
+ i = encodeVarintConfig(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintConfig(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintConfig(dAtA, i, uint64(v))
+ }
+ }
+ return i, nil
+}
+
+func (m *LocalityLoadBalancerSetting_Failover) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalityLoadBalancerSetting_Failover) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.From) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintConfig(dAtA, i, uint64(len(m.From)))
+ i += copy(dAtA[i:], m.From)
+ }
+ if len(m.To) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintConfig(dAtA, i, uint64(len(m.To)))
+ i += copy(dAtA[i:], m.To)
}
return i, nil
}
@@ -962,6 +1227,10 @@ func (m *MeshConfig) Size() (n int) {
if m.SidecarToTelemetrySessionAffinity {
n += 3
}
+ if m.LocalityLbSetting != nil {
+ l = m.LocalityLbSetting.Size()
+ n += 2 + l + sovConfig(uint64(l))
+ }
return n
}
@@ -988,6 +1257,56 @@ func (m *ConfigSource) Size() (n int) {
return n
}
+func (m *LocalityLoadBalancerSetting) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Distribute) > 0 {
+ for _, e := range m.Distribute {
+ l = e.Size()
+ n += 1 + l + sovConfig(uint64(l))
+ }
+ }
+ if len(m.Failover) > 0 {
+ for _, e := range m.Failover {
+ l = e.Size()
+ n += 1 + l + sovConfig(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *LocalityLoadBalancerSetting_Distribute) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.From)
+ if l > 0 {
+ n += 1 + l + sovConfig(uint64(l))
+ }
+ if len(m.To) > 0 {
+ for k, v := range m.To {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovConfig(uint64(len(k))) + 1 + sovConfig(uint64(v))
+ n += mapEntrySize + 1 + sovConfig(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *LocalityLoadBalancerSetting_Failover) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.From)
+ if l > 0 {
+ n += 1 + l + sovConfig(uint64(l))
+ }
+ l = len(m.To)
+ if l > 0 {
+ n += 1 + l + sovConfig(uint64(l))
+ }
+ return n
+}
+
func sovConfig(x uint64) (n int) {
for {
n++
@@ -1755,6 +2074,39 @@ func (m *MeshConfig) Unmarshal(dAtA []byte) error {
}
}
m.SidecarToTelemetrySessionAffinity = bool(v != 0)
+ case 31:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalityLbSetting", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthConfig
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LocalityLbSetting == nil {
+ m.LocalityLbSetting = &LocalityLoadBalancerSetting{}
+ }
+ if err := m.LocalityLbSetting.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConfig(dAtA[iNdEx:])
@@ -1957,6 +2309,412 @@ func (m *ConfigSource) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *LocalityLoadBalancerSetting) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LocalityLoadBalancerSetting: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LocalityLoadBalancerSetting: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Distribute", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthConfig
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Distribute = append(m.Distribute, &LocalityLoadBalancerSetting_Distribute{})
+ if err := m.Distribute[len(m.Distribute)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Failover", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthConfig
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Failover = append(m.Failover, &LocalityLoadBalancerSetting_Failover{})
+ if err := m.Failover[len(m.Failover)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipConfig(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthConfig
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LocalityLoadBalancerSetting_Distribute) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Distribute: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Distribute: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthConfig
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.From = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field To", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthConfig
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.To == nil {
+ m.To = make(map[string]uint32)
+ }
+ var mapkey string
+ var mapvalue uint32
+ for iNdEx < postIndex {
+ entryPreIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ if fieldNum == 1 {
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthConfig
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ } else if fieldNum == 2 {
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapvalue |= (uint32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ } else {
+ iNdEx = entryPreIndex
+ skippy, err := skipConfig(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthConfig
+ }
+ if (iNdEx + skippy) > postIndex {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+ m.To[mapkey] = mapvalue
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipConfig(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthConfig
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LocalityLoadBalancerSetting_Failover) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Failover: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Failover: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthConfig
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.From = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field To", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowConfig
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthConfig
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.To = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipConfig(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthConfig
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func skipConfig(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
@@ -2065,80 +2823,91 @@ var (
func init() { proto.RegisterFile("mesh/v1alpha1/config.proto", fileDescriptorConfig) }
var fileDescriptorConfig = []byte{
- // 1186 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdf, 0x6e, 0xdb, 0xb6,
- 0x17, 0x8e, 0x52, 0xb7, 0x49, 0xe9, 0x3f, 0x91, 0x99, 0xa6, 0x65, 0xd3, 0xdf, 0x2f, 0x73, 0x3d,
- 0xb4, 0x35, 0x82, 0xc1, 0x46, 0x13, 0x0c, 0xe8, 0x76, 0xe7, 0x3a, 0x4e, 0xeb, 0xd4, 0x89, 0x0d,
- 0x49, 0xe9, 0xd6, 0xdd, 0x10, 0x8a, 0x44, 0xdb, 0x5c, 0x64, 0x51, 0x10, 0xa9, 0xb6, 0x79, 0x8a,
- 0x3d, 0xc9, 0xde, 0x63, 0x97, 0x7b, 0x84, 0xa1, 0x4f, 0x32, 0xf0, 0x50, 0xaa, 0x9d, 0xd6, 0x58,
- 0x86, 0xdd, 0x99, 0xdf, 0xf9, 0xce, 0x39, 0xe4, 0x77, 0xfe, 0xc8, 0x68, 0x77, 0xce, 0xe4, 0xac,
- 0xf3, 0xfe, 0xb9, 0x1f, 0x25, 0x33, 0xff, 0x79, 0x27, 0x10, 0xf1, 0x84, 0x4f, 0xdb, 0x49, 0x2a,
- 0x94, 0xc0, 0xdb, 0x5c, 0x2a, 0x2e, 0xda, 0x9a, 0xd1, 0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, 0x96, 0xb3,
+ 0xf3, 0x17, 0xca, 0x69, 0x7b, 0xbc, 0x1b, 0xc9, 0x64, 0xea, 0x16, 0x24, 0x6f, 0x3c, 0x83, 0xa5,
+ 0x6c, 0x89, 0x6c, 0x58, 0x3c, 0xa7, 0xd3, 0x2c, 0xa5, 0xfa, 0x44, 0xb7, 0xe1, 0xc6, 0x05, 0x09,
+ 0x53, 0xaa, 0x9b, 0x55, 0x75, 0xcd, 0xe2, 0x65, 0xe1, 0xb9, 0xd5, 0x68, 0x43, 0x29, 0x2f, 0x62,
+ 0xee, 0x5e, 0x6b, 0xd9, 0x5e, 0x15, 0x52, 0x90, 0x7c, 0x77, 0xfd, 0xe7, 0x8f, 0x6b, 0xd6, 0x2f,
+ 0x1f, 0xd7, 0xac, 0x5f, 0x3f, 0xae, 0x59, 0xff, 0x6b, 0x98, 0xcd, 0x33, 0xbe, 0x49, 0x62, 0xb6,
+ 0xf9, 0xc9, 0xeb, 0xf7, 0xec, 0xa6, 0xfe, 0xf1, 0x6c, 0xff, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x31,
+ 0xb4, 0x42, 0x7f, 0x66, 0x0b, 0x00, 0x00,
}
diff --git a/vendor/istio.io/api/mesh/v1alpha1/config.proto b/vendor/istio.io/api/mesh/v1alpha1/config.proto
index 80e9590ffb10..ba2c909cc395 100644
--- a/vendor/istio.io/api/mesh/v1alpha1/config.proto
+++ b/vendor/istio.io/api/mesh/v1alpha1/config.proto
@@ -195,6 +195,9 @@ message MeshConfig {
// can be configured for a single control plane.
repeated ConfigSource config_sources = 22;
+ // Locality based load balancing distribution or failover settings.
+ LocalityLoadBalancerSetting locality_lb_setting = 31;
+
// $hide_from_docs
// This flag is used by secret discovery service(SDS).
// If set to true(prerequisite: https://kubernetes.io/docs/concepts/storage/volumes/#projected), Istio will inject volumes mount
@@ -218,7 +221,7 @@ message MeshConfig {
string trust_domain = 26;
// $hide_from_docs
- // Next available field number: 31
+ // Next available field number: 32
}
// ConfigSource describes information about a configuration store inside a
@@ -235,3 +238,70 @@ message ConfigSource {
// mode as ISTIO_MUTUAL.
istio.networking.v1alpha3.TLSSettings tls_settings = 2;
}
+
+
+// The following example sets up locality weight for mesh wide service
+// Assume a service resides in "region1/zone1/*" and "region1/zone2/*",
+// and originating clusters also reside in "region1/zone1/*" and "region1/zone2/*".
+// This example specifies when clusters from "region1/zone1/*" accessing the service, 80% of the traffic
+// is shipped to "region1/zone1/*" ratings service endpoints, and the rest 20% to "region1/zone2/*".
+//
+// ```yaml
+// distribute:
+// - from: region1/zone1/*
+// to:
+// "region1/zone1/*": 80
+// "region1/zone2/*": 20
+// - from: region1/zone2/*
+// to:
+// "region1/zone1/*": 20
+// "region1/zone2/*": 80
+// ```
+//
+// The following example sets up locality failover policy for the ratings service
+// Assume a service resides in "region1" "region2" and "region3",
+// This example specifies when clusters from "region1/zone1" accessing the service,
+// if endpoints in "region1" becomes unhealthy, traffic will begin to trickle to "region2".
+//
+// ```yaml
+// failover:
+// - from: region1
+// to: region2
+// ```
+// Locality load balancing settings.
+message LocalityLoadBalancerSetting{
+ // Originating -> upstream cluster locality weight set, support wildcard matching '*'
+ // '*' matches all localities
+ // 'region1/*' matches all zones in region1
+ message Distribute{
+ // Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
+ string from = 1;
+
+ // Upstream locality to loadbalancing weight map. The sum of all weights should be == 100.
+ // Should assign load balancing weight for all localities, otherwise the traffic are not routed
+ // following the percentage of weight.
+ map to = 2;
+ };
+
+ // Specify the traffic failover policy.
+ // As zone and sub_zone failover is supported by default, only region can be specified here.
+ message Failover{
+ // Originating region.
+ string from = 1;
+
+ // Destination region the traffic will fail over to when endpoints in local region becomes unhealthy.
+ string to = 2;
+ };
+
+ // Optional: only distribute or failover can be set.
+ // Explicitly specify loadbalancing weight across different zones and geographical locations.
+ // Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/load_balancing.html?highlight=load_balancing_weight#locality-weighted-load-balancing)
+ // If empty, the locality weight is set according to the endpoints number within it.
+ repeated Distribute distribute = 1;
+
+ // Optional: only failover or distribute can be set.
+ // Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
+ // Should be used together with OutlierDetection to detect unhealthy endpoints.
+ // Note: if no OutlierDetection specified, this will not take effect.
+ repeated Failover failover = 2;
+}
diff --git a/vendor/istio.io/api/mesh/v1alpha1/istio.mesh.v1alpha1.pb.html b/vendor/istio.io/api/mesh/v1alpha1/istio.mesh.v1alpha1.pb.html
index a581ca038b7e..b2d788735e79 100644
--- a/vendor/istio.io/api/mesh/v1alpha1/istio.mesh.v1alpha1.pb.html
+++ b/vendor/istio.io/api/mesh/v1alpha1/istio.mesh.v1alpha1.pb.html
@@ -4,7 +4,7 @@
generator: protoc-gen-docs
aliases:
- /docs/reference/config/service-mesh.html
-number_of_entries: 16
+number_of_entries: 19
---
AuthenticationPolicy
@@ -79,6 +79,140 @@ ConfigSource
uses Istio MTLS and shares the root CA with Pilot, specify the TLS
mode as ISTIOMUTUAL.
+
+
+
+
+
+LocalityLoadBalancerSetting
+
+The following example sets up locality weight for mesh wide service
+Assume a service resides in “region1/zone1/” and “region1/zone2/”,
+and originating clusters also reside in “region1/zone1/” and “region1/zone2/”.
+This example specifies when clusters from “region1/zone1/” accessing the service, 80% of the traffic
+is shipped to “region1/zone1/” ratings service endpoints, and the rest 20% to “region1/zone2/*”.
+
+ distribute:
+ - from: region1/zone1/*
+ to:
+ "region1/zone1/*": 80
+ "region1/zone2/*": 20
+ - from: region1/zone2/*
+ to:
+ "region1/zone1/*": 20
+ "region1/zone2/*": 80
+
+
+The following example sets up locality failover policy for the ratings service
+Assume a service resides in “region1” “region2” and “region3”,
+This example specifies when clusters from “region1/zone1” accessing the service,
+if endpoints in “region1” becomes unhealthy, traffic will begin to trickle to “region2”.
+
+ failover:
+ - from: region1
+ to: region2
+
+
+Locality load balancing settings.
+
+
+
+
+Field |
+Type |
+Description |
+
+
+
+
+distribute |
+LocalityLoadBalancerSetting.Distribute[] |
+
+ Optional: only distribute or failover can be set.
+Explicitly specify loadbalancing weight across different zones and geographical locations.
+Refer to Locality weighted load balancing
+If empty, the locality weight is set according to the endpoints number within it.
+
+ |
+
+
+failover |
+LocalityLoadBalancerSetting.Failover[] |
+
+ Optional: only failover or distribute can be set.
+Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
+Should be used together with OutlierDetection to detect unhealthy endpoints.
+Note: if no OutlierDetection specified, this will not take effect.
+
+ |
+
+
+
+
+LocalityLoadBalancerSetting.Distribute
+
+Originating -> upstream cluster locality weight set, support wildcard matching ‘’
+‘’ matches all localities
+‘region1/*’ matches all zones in region1
+
+
+
+
+Field |
+Type |
+Description |
+
+
+
+
+from |
+string |
+
+ Originating locality, ‘/’ separated, e.g. ‘region/zone/sub_zone’.
+
+ |
+
+
+to |
+map<string, uint32> |
+
+ Upstream locality to loadbalancing weight map. The sum of all weights should be == 100.
+Should assign load balancing weight for all localities, otherwise the traffic are not routed
+following the percentage of weight.
+
+ |
+
+
+
+
+LocalityLoadBalancerSetting.Failover
+
+Specify the traffic failover policy.
+As zone and sub_zone failover is supported by default, only region can be specified here.
+
+
+
+
+Field |
+Type |
+Description |
+
+
+
+
+from |
+string |
+
+ Originating region.
+
+ |
+
+
+to |
+string |
+
+ Destination region the traffic will fail over to when endpoints in local region becomes unhealthy.
+
|
@@ -304,6 +438,14 @@ MeshConfig
rules, and other Istio configuration artifacts. Multiple data sources
can be configured for a single control plane.
+
+
+
+localityLbSetting |
+LocalityLoadBalancerSetting |
+
+ Locality based load balancing distribution or failover settings.
+
|
diff --git a/vendor/istio.io/api/networking/v1alpha3/destination_rule.pb.go b/vendor/istio.io/api/networking/v1alpha3/destination_rule.pb.go
index 7788ca4ef0be..d857346f74a0 100644
--- a/vendor/istio.io/api/networking/v1alpha3/destination_rule.pb.go
+++ b/vendor/istio.io/api/networking/v1alpha3/destination_rule.pb.go
@@ -526,31 +526,6 @@ func (m *Subset) GetTrafficPolicy() *TrafficPolicy {
// ttl: 0s
// ```
//
-// The following example sets up locality weight for the ratings service
-// Assume ratings service resides in "region1/zone1/*" and "region1/zone2/*",
-// and originating clusters also reside in "region1/zone1/*" and "region1/zone2/*".
-// This example specifies when clusters from "region1/zone1/*" accessing ratings service, 80% of the traffic
-// is shipped to "region1/zone1/*" ratings service endpoints, and the rest 20% to "region1/zone2/*".
-//
-// ```yaml
-// apiVersion: networking.istio.io/v1alpha3
-// kind: DestinationRule
-// metadata:
-// name: bookinfo-ratings
-// spec:
-// host: ratings.prod.svc.cluster.local
-// trafficPolicy:
-// loadBalancer:
-// localityWeightSettings:
-// - from: region1/zone1/*
-// to:
-// "region1/zone1/*": 80
-// "region1/zone2/*": 20
-// - from: region1/zone2/*
-// to:
-// "region1/zone1/*": 20
-// "region1/zone2/*": 80
-// ```
type LoadBalancerSettings struct {
// Upstream load balancing policy.
//
@@ -558,11 +533,6 @@ type LoadBalancerSettings struct {
// *LoadBalancerSettings_Simple
// *LoadBalancerSettings_ConsistentHash
LbPolicy isLoadBalancerSettings_LbPolicy `protobuf_oneof:"lb_policy"`
- // Explicitly assign loadbalancing weight across different zones and geographical locations.
- // Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/load_balancing.html?highlight=load_balancing_weight#locality-weighted-load-balancing)
- // If empty, the locality weight is set according to the endpoints number within it.
- // If duplicated settings are present, then the first one will take effect.
- LocalityWeightSettings []*LoadBalancerSettings_LocalityWeightSetting `protobuf:"bytes,3,rep,name=locality_weight_settings,json=localityWeightSettings" json:"locality_weight_settings,omitempty"`
}
func (m *LoadBalancerSettings) Reset() { *m = LoadBalancerSettings{} }
@@ -609,13 +579,6 @@ func (m *LoadBalancerSettings) GetConsistentHash() *LoadBalancerSettings_Consist
return nil
}
-func (m *LoadBalancerSettings) GetLocalityWeightSettings() []*LoadBalancerSettings_LocalityWeightSetting {
- if m != nil {
- return m.LocalityWeightSettings
- }
- return nil
-}
-
// XXX_OneofFuncs is for the internal use of the proto package.
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{}) {
return _LoadBalancerSettings_OneofMarshaler, _LoadBalancerSettings_OneofUnmarshaler, _LoadBalancerSettings_OneofSizer, []interface{}{
@@ -904,43 +867,6 @@ func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetTtl() *time.Durati
return nil
}
-// Originating -> upstream cluster locality weight set, support wildcard matching '*'
-// '*' matches all localities
-// 'region1/*' matches all zones in region1
-type LoadBalancerSettings_LocalityWeightSetting struct {
- // Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
- From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
- // Upstream locality to loadbalancing weight map. The sum of all weights should be == 100.
- // Should assign loadbalancing weight for all localities, otherwise the traffic are not routed
- // following the percentage of weight.
- To map[string]uint32 `protobuf:"bytes,2,rep,name=to" json:"to,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
-}
-
-func (m *LoadBalancerSettings_LocalityWeightSetting) Reset() {
- *m = LoadBalancerSettings_LocalityWeightSetting{}
-}
-func (m *LoadBalancerSettings_LocalityWeightSetting) String() string {
- return proto.CompactTextString(m)
-}
-func (*LoadBalancerSettings_LocalityWeightSetting) ProtoMessage() {}
-func (*LoadBalancerSettings_LocalityWeightSetting) Descriptor() ([]byte, []int) {
- return fileDescriptorDestinationRule, []int{3, 1}
-}
-
-func (m *LoadBalancerSettings_LocalityWeightSetting) GetFrom() string {
- if m != nil {
- return m.From
- }
- return ""
-}
-
-func (m *LoadBalancerSettings_LocalityWeightSetting) GetTo() map[string]uint32 {
- if m != nil {
- return m.To
- }
- return nil
-}
-
// 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)
@@ -1362,7 +1288,6 @@ func init() {
proto.RegisterType((*LoadBalancerSettings)(nil), "istio.networking.v1alpha3.LoadBalancerSettings")
proto.RegisterType((*LoadBalancerSettings_ConsistentHashLB)(nil), "istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB")
proto.RegisterType((*LoadBalancerSettings_ConsistentHashLB_HTTPCookie)(nil), "istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie")
- proto.RegisterType((*LoadBalancerSettings_LocalityWeightSetting)(nil), "istio.networking.v1alpha3.LoadBalancerSettings.LocalityWeightSetting")
proto.RegisterType((*ConnectionPoolSettings)(nil), "istio.networking.v1alpha3.ConnectionPoolSettings")
proto.RegisterType((*ConnectionPoolSettings_TCPSettings)(nil), "istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings")
proto.RegisterType((*ConnectionPoolSettings_TCPSettings_TcpKeepalive)(nil), "istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive")
@@ -1634,18 +1559,6 @@ func (m *LoadBalancerSettings) MarshalTo(dAtA []byte) (int, error) {
}
i += nn12
}
- if len(m.LocalityWeightSettings) > 0 {
- for _, msg := range m.LocalityWeightSettings {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintDestinationRule(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
return i, nil
}
@@ -1774,46 +1687,6 @@ func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) MarshalTo(dAtA []byte
return i, nil
}
-func (m *LoadBalancerSettings_LocalityWeightSetting) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *LoadBalancerSettings_LocalityWeightSetting) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.From) > 0 {
- dAtA[i] = 0xa
- i++
- i = encodeVarintDestinationRule(dAtA, i, uint64(len(m.From)))
- i += copy(dAtA[i:], m.From)
- }
- if len(m.To) > 0 {
- for k, _ := range m.To {
- dAtA[i] = 0x12
- i++
- v := m.To[k]
- mapSize := 1 + len(k) + sovDestinationRule(uint64(len(k))) + 1 + sovDestinationRule(uint64(v))
- i = encodeVarintDestinationRule(dAtA, i, uint64(mapSize))
- dAtA[i] = 0xa
- i++
- i = encodeVarintDestinationRule(dAtA, i, uint64(len(k)))
- i += copy(dAtA[i:], k)
- dAtA[i] = 0x10
- i++
- i = encodeVarintDestinationRule(dAtA, i, uint64(v))
- }
- }
- return i, nil
-}
-
func (m *ConnectionPoolSettings) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -2205,12 +2078,6 @@ func (m *LoadBalancerSettings) Size() (n int) {
if m.LbPolicy != nil {
n += m.LbPolicy.Size()
}
- if len(m.LocalityWeightSettings) > 0 {
- for _, e := range m.LocalityWeightSettings {
- l = e.Size()
- n += 1 + l + sovDestinationRule(uint64(l))
- }
- }
return n
}
@@ -2281,24 +2148,6 @@ func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Size() (n int) {
return n
}
-func (m *LoadBalancerSettings_LocalityWeightSetting) Size() (n int) {
- var l int
- _ = l
- l = len(m.From)
- if l > 0 {
- n += 1 + l + sovDestinationRule(uint64(l))
- }
- if len(m.To) > 0 {
- for k, v := range m.To {
- _ = k
- _ = v
- mapEntrySize := 1 + len(k) + sovDestinationRule(uint64(len(k))) + 1 + sovDestinationRule(uint64(v))
- n += mapEntrySize + 1 + sovDestinationRule(uint64(mapEntrySize))
- }
- }
- return n
-}
-
func (m *ConnectionPoolSettings) Size() (n int) {
var l int
_ = l
@@ -3333,37 +3182,6 @@ func (m *LoadBalancerSettings) Unmarshal(dAtA []byte) error {
}
m.LbPolicy = &LoadBalancerSettings_ConsistentHash{v}
iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LocalityWeightSettings", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDestinationRule
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthDestinationRule
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.LocalityWeightSettings = append(m.LocalityWeightSettings, &LoadBalancerSettings_LocalityWeightSetting{})
- if err := m.LocalityWeightSettings[len(m.LocalityWeightSettings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipDestinationRule(dAtA[iNdEx:])
@@ -3677,192 +3495,6 @@ func (m *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Unmarshal(dAtA []byte
}
return nil
}
-func (m *LoadBalancerSettings_LocalityWeightSetting) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDestinationRule
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: LocalityWeightSetting: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: LocalityWeightSetting: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDestinationRule
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthDestinationRule
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.From = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field To", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDestinationRule
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthDestinationRule
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.To == nil {
- m.To = make(map[string]uint32)
- }
- var mapkey string
- var mapvalue uint32
- for iNdEx < postIndex {
- entryPreIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDestinationRule
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- if fieldNum == 1 {
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDestinationRule
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthDestinationRule
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- } else if fieldNum == 2 {
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDestinationRule
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- mapvalue |= (uint32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- } else {
- iNdEx = entryPreIndex
- skippy, err := skipDestinationRule(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthDestinationRule
- }
- if (iNdEx + skippy) > postIndex {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- m.To[mapkey] = mapvalue
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipDestinationRule(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthDestinationRule
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
func (m *ConnectionPoolSettings) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -4872,100 +4504,94 @@ func init() {
}
var fileDescriptorDestinationRule = []byte{
- // 1506 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0x1b, 0x37,
- 0x16, 0xb6, 0x7e, 0x58, 0xb6, 0x9f, 0x6c, 0x59, 0xe6, 0x7a, 0xb3, 0x8a, 0x16, 0x70, 0x1c, 0x61,
- 0xb1, 0xf1, 0x66, 0x37, 0xa3, 0xb5, 0x83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, 0x0b, 0x7e, 0xeb, 0x3a, 0x59, 0xa3, 0x80, 0x7b, 0x7f, 0x07, 0x00, 0x00,
+ 0xff, 0xff, 0x4e, 0xda, 0x16, 0xb0, 0x86, 0x0e, 0x00, 0x00,
}
diff --git a/vendor/istio.io/api/networking/v1alpha3/destination_rule.proto b/vendor/istio.io/api/networking/v1alpha3/destination_rule.proto
index 757bca7c73ff..6d54f7a7cc82 100644
--- a/vendor/istio.io/api/networking/v1alpha3/destination_rule.proto
+++ b/vendor/istio.io/api/networking/v1alpha3/destination_rule.proto
@@ -264,31 +264,6 @@ message Subset {
// ttl: 0s
// ```
//
-// The following example sets up locality weight for the ratings service
-// Assume ratings service resides in "region1/zone1/*" and "region1/zone2/*",
-// and originating clusters also reside in "region1/zone1/*" and "region1/zone2/*".
-// This example specifies when clusters from "region1/zone1/*" accessing ratings service, 80% of the traffic
-// is shipped to "region1/zone1/*" ratings service endpoints, and the rest 20% to "region1/zone2/*".
-//
-// ```yaml
-// apiVersion: networking.istio.io/v1alpha3
-// kind: DestinationRule
-// metadata:
-// name: bookinfo-ratings
-// spec:
-// host: ratings.prod.svc.cluster.local
-// trafficPolicy:
-// loadBalancer:
-// localityWeightSettings:
-// - from: region1/zone1/*
-// to:
-// "region1/zone1/*": 80
-// "region1/zone2/*": 20
-// - from: region1/zone2/*
-// to:
-// "region1/zone1/*": 20
-// "region1/zone2/*": 80
-// ```
message LoadBalancerSettings {
// Standard load balancing algorithms that require no tuning.
enum SimpleLB {
@@ -352,19 +327,6 @@ message LoadBalancerSettings {
uint64 minimum_ring_size = 4;
};
- // Originating -> upstream cluster locality weight set, support wildcard matching '*'
- // '*' matches all localities
- // 'region1/*' matches all zones in region1
- message LocalityWeightSetting{
- // Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
- string from = 1;
-
- // Upstream locality to loadbalancing weight map. The sum of all weights should be == 100.
- // Should assign loadbalancing weight for all localities, otherwise the traffic are not routed
- // following the percentage of weight.
- map to = 2;
- };
-
// (-- TODO: Enable Subset load balancing after moving to v2 API Also
// look into enabling Priotity based load balancing for spilling over
// from one priority pool to another. --)
@@ -374,12 +336,6 @@ message LoadBalancerSettings {
SimpleLB simple = 1;
ConsistentHashLB consistent_hash = 2;
}
-
- // Explicitly assign loadbalancing weight across different zones and geographical locations.
- // Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/load_balancing.html?highlight=load_balancing_weight#locality-weighted-load-balancing)
- // If empty, the locality weight is set according to the endpoints number within it.
- // If duplicated settings are present, then the first one will take effect.
- repeated LocalityWeightSetting locality_weight_settings = 3;
}
// Connection pool settings for an upstream host. The settings apply to
diff --git a/vendor/istio.io/api/networking/v1alpha3/istio.networking.v1alpha3.pb.html b/vendor/istio.io/api/networking/v1alpha3/istio.networking.v1alpha3.pb.html
index 18540c5d6d1c..12fa35db47ef 100644
--- a/vendor/istio.io/api/networking/v1alpha3/istio.networking.v1alpha3.pb.html
+++ b/vendor/istio.io/api/networking/v1alpha3/istio.networking.v1alpha3.pb.html
@@ -6,7 +6,7 @@
generator: protoc-gen-docs
aliases:
- /docs/reference/config/istio.routing.v1alpha1/
-number_of_entries: 62
+number_of_entries: 61
---
Configuration affecting traffic routing. Here are a few terms useful to define
in the context of traffic routing.
@@ -2417,31 +2417,6 @@ LoadBalancerSettings
ttl: 0s
-The following example sets up locality weight for the ratings service
-Assume ratings service resides in “region1/zone1/” and “region1/zone2/”,
-and originating clusters also reside in “region1/zone1/” and “region1/zone2/”.
-This example specifies when clusters from “region1/zone1/” accessing ratings service, 80% of the traffic
-is shipped to “region1/zone1/” ratings service endpoints, and the rest 20% to “region1/zone2/*”.
-
- apiVersion: networking.istio.io/v1alpha3
- kind: DestinationRule
- metadata:
- name: bookinfo-ratings
- spec:
- host: ratings.prod.svc.cluster.local
- trafficPolicy:
- loadBalancer:
- localityWeightSettings:
- - from: region1/zone1/*
- to:
- "region1/zone1/*": 80
- "region1/zone2/*": 20
- - from: region1/zone2/*
- to:
- "region1/zone1/*": 20
- "region1/zone2/*": 80
-
-
-
-LoadBalancerSettings.LocalityWeightSetting
-
-Originating -> upstream cluster locality weight set, support wildcard matching ‘’
-‘’ matches all localities
-‘region1/*’ matches all zones in region1
-
-
-
-
-Field |
-Type |
-Description |
-
-
-
-
-from |
-string |
-
- Originating locality, ‘/’ separated, e.g. ‘region/zone/sub_zone’.
-
- |
-
-
-to |
-map<string, uint32> |
-
- Upstream locality to loadbalancing weight map. The sum of all weights should be == 100.
-Should assign loadbalancing weight for all localities, otherwise the traffic are not routed
-following the percentage of weight.
-
|
diff --git a/vendor/istio.io/api/proto.lock b/vendor/istio.io/api/proto.lock
index 67af790a4d05..5ea961d95523 100644
--- a/vendor/istio.io/api/proto.lock
+++ b/vendor/istio.io/api/proto.lock
@@ -958,6 +958,11 @@
"type": "ConfigSource",
"is_repeated": true
},
+ {
+ "id": 31,
+ "name": "locality_lb_setting",
+ "type": "LocalityLoadBalancerSetting"
+ },
{
"id": 23,
"name": "enable_sds_token_mount",
@@ -1005,6 +1010,60 @@
"type": "istio.networking.v1alpha3.TLSSettings"
}
]
+ },
+ {
+ "name": "LocalityLoadBalancerSetting",
+ "fields": [
+ {
+ "id": 1,
+ "name": "distribute",
+ "type": "Distribute",
+ "is_repeated": true
+ },
+ {
+ "id": 2,
+ "name": "failover",
+ "type": "Failover",
+ "is_repeated": true
+ }
+ ],
+ "messages": [
+ {
+ "name": "Distribute",
+ "fields": [
+ {
+ "id": 1,
+ "name": "from",
+ "type": "string"
+ }
+ ],
+ "maps": [
+ {
+ "key_type": "string",
+ "field": {
+ "id": 2,
+ "name": "to",
+ "type": "uint32"
+ }
+ }
+ ]
+ },
+ {
+ "name": "Failover",
+ "fields": [
+ {
+ "id": 1,
+ "name": "from",
+ "type": "string"
+ },
+ {
+ "id": 2,
+ "name": "to",
+ "type": "string"
+ }
+ ]
+ }
+ ]
}
]
}
@@ -2701,12 +2760,6 @@
"id": 2,
"name": "consistent_hash",
"type": "ConsistentHashLB"
- },
- {
- "id": 3,
- "name": "locality_weight_settings",
- "type": "LocalityWeightSetting",
- "is_repeated": true
}
],
"messages": [
@@ -2756,26 +2809,6 @@
]
}
]
- },
- {
- "name": "LocalityWeightSetting",
- "fields": [
- {
- "id": 1,
- "name": "from",
- "type": "string"
- }
- ],
- "maps": [
- {
- "key_type": "string",
- "field": {
- "id": 2,
- "name": "to",
- "type": "uint32"
- }
- }
- ]
}
]
},
diff --git a/vendor/istio.io/api/python/istio_api/mesh/v1alpha1/config_pb2.py b/vendor/istio.io/api/python/istio_api/mesh/v1alpha1/config_pb2.py
index 1893c3beda18..54e8726de410 100644
--- a/vendor/istio.io/api/python/istio_api/mesh/v1alpha1/config_pb2.py
+++ b/vendor/istio.io/api/python/istio_api/mesh/v1alpha1/config_pb2.py
@@ -22,7 +22,7 @@
name='mesh/v1alpha1/config.proto',
package='istio.mesh.v1alpha1',
syntax='proto3',
- serialized_pb=_b('\n\x1amesh/v1alpha1/config.proto\x12\x13istio.mesh.v1alpha1\x1a\x1egoogle/protobuf/duration.proto\x1a\x19mesh/v1alpha1/proxy.proto\x1a*networking/v1alpha3/destination_rule.proto\"\x96\x0c\n\nMeshConfig\x12\x1a\n\x12mixer_check_server\x18\x01 \x01(\t\x12\x1b\n\x13mixer_report_server\x18\x02 \x01(\t\x12\x1d\n\x15\x64isable_policy_checks\x18\x03 \x01(\x08\x12\x1e\n\x16policy_check_fail_open\x18\x19 \x01(\x08\x12-\n%sidecar_to_telemetry_session_affinity\x18\x1e \x01(\x08\x12\x19\n\x11proxy_listen_port\x18\x04 \x01(\x05\x12\x17\n\x0fproxy_http_port\x18\x05 \x01(\x05\x12\x32\n\x0f\x63onnect_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x61\n\rtcp_keepalive\x18\x1c \x01(\x0b\x32J.istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive\x12\x15\n\ringress_class\x18\x07 \x01(\t\x12\x17\n\x0fingress_service\x18\x08 \x01(\t\x12V\n\x17ingress_controller_mode\x18\t \x01(\x0e\x32\x35.istio.mesh.v1alpha1.MeshConfig.IngressControllerMode\x12\x43\n\x0b\x61uth_policy\x18\n \x01(\x0e\x32*.istio.mesh.v1alpha1.MeshConfig.AuthPolicyB\x02\x18\x01\x12\x38\n\x11rds_refresh_delay\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationB\x02\x18\x01\x12\x16\n\x0e\x65nable_tracing\x18\x0c \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ss_log_file\x18\r \x01(\t\x12\x19\n\x11\x61\x63\x63\x65ss_log_format\x18\x18 \x01(\t\x12N\n\x13\x61\x63\x63\x65ss_log_encoding\x18\x1b \x01(\x0e\x32\x31.istio.mesh.v1alpha1.MeshConfig.AccessLogEncoding\x12\x38\n\x0e\x64\x65\x66\x61ult_config\x18\x0e \x01(\x0b\x32 .istio.mesh.v1alpha1.ProxyConfig\x12\x19\n\rmixer_address\x18\x10 \x01(\tB\x02\x18\x01\x12V\n\x17outbound_traffic_policy\x18\x11 \x01(\x0b\x32\x35.istio.mesh.v1alpha1.MeshConfig.OutboundTrafficPolicy\x12\'\n\x1f\x65nable_client_side_policy_check\x18\x13 \x01(\x08\x12\x14\n\x0csds_uds_path\x18\x14 \x01(\t\x12\x38\n\x11sds_refresh_delay\x18\x15 \x01(\x0b\x32\x19.google.protobuf.DurationB\x02\x18\x01\x12\x39\n\x0e\x63onfig_sources\x18\x16 \x03(\x0b\x32!.istio.mesh.v1alpha1.ConfigSource\x12\x1e\n\x16\x65nable_sds_token_mount\x18\x17 \x01(\x08\x12\x1a\n\x12sds_use_k8s_sa_jwt\x18\x1d \x01(\x08\x12\x14\n\x0ctrust_domain\x18\x1a \x01(\t\x1a\xa7\x01\n\x15OutboundTrafficPolicy\x12H\n\x04mode\x18\x01 \x01(\x0e\x32:.istio.mesh.v1alpha1.MeshConfig.OutboundTrafficPolicy.Mode\"D\n\x04Mode\x12\x11\n\rREGISTRY_ONLY\x10\x00\x12\r\n\tALLOW_ANY\x10\x01\"\x04\x08\x02\x10\x02*\x14VIRTUAL_SERVICE_ONLY\"9\n\x15IngressControllerMode\x12\x07\n\x03OFF\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06STRICT\x10\x02\"&\n\nAuthPolicy\x12\x08\n\x04NONE\x10\x00\x12\x0e\n\nMUTUAL_TLS\x10\x01\"\'\n\x11\x41\x63\x63\x65ssLogEncoding\x12\x08\n\x04TEXT\x10\x00\x12\x08\n\x04JSON\x10\x01J\x04\x08\x0f\x10\x10J\x04\x08\x12\x10\x13\"]\n\x0c\x43onfigSource\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12<\n\x0ctls_settings\x18\x02 \x01(\x0b\x32&.istio.networking.v1alpha3.TLSSettingsB\x1cZ\x1aistio.io/api/mesh/v1alpha1b\x06proto3')
+ serialized_pb=_b('\n\x1amesh/v1alpha1/config.proto\x12\x13istio.mesh.v1alpha1\x1a\x1egoogle/protobuf/duration.proto\x1a\x19mesh/v1alpha1/proxy.proto\x1a*networking/v1alpha3/destination_rule.proto\"\xe5\x0c\n\nMeshConfig\x12\x1a\n\x12mixer_check_server\x18\x01 \x01(\t\x12\x1b\n\x13mixer_report_server\x18\x02 \x01(\t\x12\x1d\n\x15\x64isable_policy_checks\x18\x03 \x01(\x08\x12\x1e\n\x16policy_check_fail_open\x18\x19 \x01(\x08\x12-\n%sidecar_to_telemetry_session_affinity\x18\x1e \x01(\x08\x12\x19\n\x11proxy_listen_port\x18\x04 \x01(\x05\x12\x17\n\x0fproxy_http_port\x18\x05 \x01(\x05\x12\x32\n\x0f\x63onnect_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x61\n\rtcp_keepalive\x18\x1c \x01(\x0b\x32J.istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive\x12\x15\n\ringress_class\x18\x07 \x01(\t\x12\x17\n\x0fingress_service\x18\x08 \x01(\t\x12V\n\x17ingress_controller_mode\x18\t \x01(\x0e\x32\x35.istio.mesh.v1alpha1.MeshConfig.IngressControllerMode\x12\x43\n\x0b\x61uth_policy\x18\n \x01(\x0e\x32*.istio.mesh.v1alpha1.MeshConfig.AuthPolicyB\x02\x18\x01\x12\x38\n\x11rds_refresh_delay\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationB\x02\x18\x01\x12\x16\n\x0e\x65nable_tracing\x18\x0c \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ss_log_file\x18\r \x01(\t\x12\x19\n\x11\x61\x63\x63\x65ss_log_format\x18\x18 \x01(\t\x12N\n\x13\x61\x63\x63\x65ss_log_encoding\x18\x1b \x01(\x0e\x32\x31.istio.mesh.v1alpha1.MeshConfig.AccessLogEncoding\x12\x38\n\x0e\x64\x65\x66\x61ult_config\x18\x0e \x01(\x0b\x32 .istio.mesh.v1alpha1.ProxyConfig\x12\x19\n\rmixer_address\x18\x10 \x01(\tB\x02\x18\x01\x12V\n\x17outbound_traffic_policy\x18\x11 \x01(\x0b\x32\x35.istio.mesh.v1alpha1.MeshConfig.OutboundTrafficPolicy\x12\'\n\x1f\x65nable_client_side_policy_check\x18\x13 \x01(\x08\x12\x14\n\x0csds_uds_path\x18\x14 \x01(\t\x12\x38\n\x11sds_refresh_delay\x18\x15 \x01(\x0b\x32\x19.google.protobuf.DurationB\x02\x18\x01\x12\x39\n\x0e\x63onfig_sources\x18\x16 \x03(\x0b\x32!.istio.mesh.v1alpha1.ConfigSource\x12M\n\x13locality_lb_setting\x18\x1f \x01(\x0b\x32\x30.istio.mesh.v1alpha1.LocalityLoadBalancerSetting\x12\x1e\n\x16\x65nable_sds_token_mount\x18\x17 \x01(\x08\x12\x1a\n\x12sds_use_k8s_sa_jwt\x18\x1d \x01(\x08\x12\x14\n\x0ctrust_domain\x18\x1a \x01(\t\x1a\xa7\x01\n\x15OutboundTrafficPolicy\x12H\n\x04mode\x18\x01 \x01(\x0e\x32:.istio.mesh.v1alpha1.MeshConfig.OutboundTrafficPolicy.Mode\"D\n\x04Mode\x12\x11\n\rREGISTRY_ONLY\x10\x00\x12\r\n\tALLOW_ANY\x10\x01\"\x04\x08\x02\x10\x02*\x14VIRTUAL_SERVICE_ONLY\"9\n\x15IngressControllerMode\x12\x07\n\x03OFF\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06STRICT\x10\x02\"&\n\nAuthPolicy\x12\x08\n\x04NONE\x10\x00\x12\x0e\n\nMUTUAL_TLS\x10\x01\"\'\n\x11\x41\x63\x63\x65ssLogEncoding\x12\x08\n\x04TEXT\x10\x00\x12\x08\n\x04JSON\x10\x01J\x04\x08\x0f\x10\x10J\x04\x08\x12\x10\x13\"]\n\x0c\x43onfigSource\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12<\n\x0ctls_settings\x18\x02 \x01(\x0b\x32&.istio.networking.v1alpha3.TLSSettings\"\xfa\x02\n\x1bLocalityLoadBalancerSetting\x12O\n\ndistribute\x18\x01 \x03(\x0b\x32;.istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Distribute\x12K\n\x08\x66\x61ilover\x18\x02 \x03(\x0b\x32\x39.istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Failover\x1a\x96\x01\n\nDistribute\x12\x0c\n\x04\x66rom\x18\x01 \x01(\t\x12O\n\x02to\x18\x02 \x03(\x0b\x32\x43.istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Distribute.ToEntry\x1a)\n\x07ToEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\x1a$\n\x08\x46\x61ilover\x12\x0c\n\x04\x66rom\x18\x01 \x01(\t\x12\n\n\x02to\x18\x02 \x01(\tB\x1cZ\x1aistio.io/api/mesh/v1alpha1b\x06proto3')
,
dependencies=[google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,mesh_dot_v1alpha1_dot_proxy__pb2.DESCRIPTOR,networking_dot_v1alpha3_dot_destination__rule__pb2.DESCRIPTOR,])
@@ -45,8 +45,8 @@
],
containing_type=None,
options=None,
- serialized_start=1493,
- serialized_end=1561,
+ serialized_start=1572,
+ serialized_end=1640,
)
_sym_db.RegisterEnumDescriptor(_MESHCONFIG_OUTBOUNDTRAFFICPOLICY_MODE)
@@ -71,8 +71,8 @@
],
containing_type=None,
options=None,
- serialized_start=1563,
- serialized_end=1620,
+ serialized_start=1642,
+ serialized_end=1699,
)
_sym_db.RegisterEnumDescriptor(_MESHCONFIG_INGRESSCONTROLLERMODE)
@@ -93,8 +93,8 @@
],
containing_type=None,
options=None,
- serialized_start=1622,
- serialized_end=1660,
+ serialized_start=1701,
+ serialized_end=1739,
)
_sym_db.RegisterEnumDescriptor(_MESHCONFIG_AUTHPOLICY)
@@ -115,8 +115,8 @@
],
containing_type=None,
options=None,
- serialized_start=1662,
- serialized_end=1701,
+ serialized_start=1741,
+ serialized_end=1780,
)
_sym_db.RegisterEnumDescriptor(_MESHCONFIG_ACCESSLOGENCODING)
@@ -148,8 +148,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=1394,
- serialized_end=1561,
+ serialized_start=1473,
+ serialized_end=1640,
)
_MESHCONFIG = _descriptor.Descriptor(
@@ -335,21 +335,28 @@
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
- name='enable_sds_token_mount', full_name='istio.mesh.v1alpha1.MeshConfig.enable_sds_token_mount', index=25,
+ name='locality_lb_setting', full_name='istio.mesh.v1alpha1.MeshConfig.locality_lb_setting', index=25,
+ number=31, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None, file=DESCRIPTOR),
+ _descriptor.FieldDescriptor(
+ name='enable_sds_token_mount', full_name='istio.mesh.v1alpha1.MeshConfig.enable_sds_token_mount', index=26,
number=23, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
- name='sds_use_k8s_sa_jwt', full_name='istio.mesh.v1alpha1.MeshConfig.sds_use_k8s_sa_jwt', index=26,
+ name='sds_use_k8s_sa_jwt', full_name='istio.mesh.v1alpha1.MeshConfig.sds_use_k8s_sa_jwt', index=27,
number=29, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
- name='trust_domain', full_name='istio.mesh.v1alpha1.MeshConfig.trust_domain', index=27,
+ name='trust_domain', full_name='istio.mesh.v1alpha1.MeshConfig.trust_domain', index=28,
number=26, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
@@ -371,7 +378,7 @@
oneofs=[
],
serialized_start=155,
- serialized_end=1713,
+ serialized_end=1792,
)
@@ -408,8 +415,157 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=1715,
- serialized_end=1808,
+ serialized_start=1794,
+ serialized_end=1887,
+)
+
+
+_LOCALITYLOADBALANCERSETTING_DISTRIBUTE_TOENTRY = _descriptor.Descriptor(
+ name='ToEntry',
+ full_name='istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Distribute.ToEntry',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='key', full_name='istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Distribute.ToEntry.key', index=0,
+ number=1, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=_b("").decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None, file=DESCRIPTOR),
+ _descriptor.FieldDescriptor(
+ name='value', full_name='istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Distribute.ToEntry.value', index=1,
+ number=2, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None, file=DESCRIPTOR),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')),
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=2189,
+ serialized_end=2230,
+)
+
+_LOCALITYLOADBALANCERSETTING_DISTRIBUTE = _descriptor.Descriptor(
+ name='Distribute',
+ full_name='istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Distribute',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='from', full_name='istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Distribute.from', index=0,
+ number=1, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=_b("").decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None, file=DESCRIPTOR),
+ _descriptor.FieldDescriptor(
+ name='to', full_name='istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Distribute.to', index=1,
+ number=2, type=11, cpp_type=10, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None, file=DESCRIPTOR),
+ ],
+ extensions=[
+ ],
+ nested_types=[_LOCALITYLOADBALANCERSETTING_DISTRIBUTE_TOENTRY, ],
+ enum_types=[
+ ],
+ options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=2080,
+ serialized_end=2230,
+)
+
+_LOCALITYLOADBALANCERSETTING_FAILOVER = _descriptor.Descriptor(
+ name='Failover',
+ full_name='istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Failover',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='from', full_name='istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Failover.from', index=0,
+ number=1, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=_b("").decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None, file=DESCRIPTOR),
+ _descriptor.FieldDescriptor(
+ name='to', full_name='istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Failover.to', index=1,
+ number=2, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=_b("").decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None, file=DESCRIPTOR),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=2232,
+ serialized_end=2268,
+)
+
+_LOCALITYLOADBALANCERSETTING = _descriptor.Descriptor(
+ name='LocalityLoadBalancerSetting',
+ full_name='istio.mesh.v1alpha1.LocalityLoadBalancerSetting',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='distribute', full_name='istio.mesh.v1alpha1.LocalityLoadBalancerSetting.distribute', index=0,
+ number=1, type=11, cpp_type=10, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None, file=DESCRIPTOR),
+ _descriptor.FieldDescriptor(
+ name='failover', full_name='istio.mesh.v1alpha1.LocalityLoadBalancerSetting.failover', index=1,
+ number=2, type=11, cpp_type=10, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None, file=DESCRIPTOR),
+ ],
+ extensions=[
+ ],
+ nested_types=[_LOCALITYLOADBALANCERSETTING_DISTRIBUTE, _LOCALITYLOADBALANCERSETTING_FAILOVER, ],
+ enum_types=[
+ ],
+ options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=1890,
+ serialized_end=2268,
)
_MESHCONFIG_OUTBOUNDTRAFFICPOLICY.fields_by_name['mode'].enum_type = _MESHCONFIG_OUTBOUNDTRAFFICPOLICY_MODE
@@ -425,12 +581,20 @@
_MESHCONFIG.fields_by_name['outbound_traffic_policy'].message_type = _MESHCONFIG_OUTBOUNDTRAFFICPOLICY
_MESHCONFIG.fields_by_name['sds_refresh_delay'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
_MESHCONFIG.fields_by_name['config_sources'].message_type = _CONFIGSOURCE
+_MESHCONFIG.fields_by_name['locality_lb_setting'].message_type = _LOCALITYLOADBALANCERSETTING
_MESHCONFIG_INGRESSCONTROLLERMODE.containing_type = _MESHCONFIG
_MESHCONFIG_AUTHPOLICY.containing_type = _MESHCONFIG
_MESHCONFIG_ACCESSLOGENCODING.containing_type = _MESHCONFIG
_CONFIGSOURCE.fields_by_name['tls_settings'].message_type = networking_dot_v1alpha3_dot_destination__rule__pb2._TLSSETTINGS
+_LOCALITYLOADBALANCERSETTING_DISTRIBUTE_TOENTRY.containing_type = _LOCALITYLOADBALANCERSETTING_DISTRIBUTE
+_LOCALITYLOADBALANCERSETTING_DISTRIBUTE.fields_by_name['to'].message_type = _LOCALITYLOADBALANCERSETTING_DISTRIBUTE_TOENTRY
+_LOCALITYLOADBALANCERSETTING_DISTRIBUTE.containing_type = _LOCALITYLOADBALANCERSETTING
+_LOCALITYLOADBALANCERSETTING_FAILOVER.containing_type = _LOCALITYLOADBALANCERSETTING
+_LOCALITYLOADBALANCERSETTING.fields_by_name['distribute'].message_type = _LOCALITYLOADBALANCERSETTING_DISTRIBUTE
+_LOCALITYLOADBALANCERSETTING.fields_by_name['failover'].message_type = _LOCALITYLOADBALANCERSETTING_FAILOVER
DESCRIPTOR.message_types_by_name['MeshConfig'] = _MESHCONFIG
DESCRIPTOR.message_types_by_name['ConfigSource'] = _CONFIGSOURCE
+DESCRIPTOR.message_types_by_name['LocalityLoadBalancerSetting'] = _LOCALITYLOADBALANCERSETTING
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
MeshConfig = _reflection.GeneratedProtocolMessageType('MeshConfig', (_message.Message,), dict(
@@ -455,6 +619,37 @@
))
_sym_db.RegisterMessage(ConfigSource)
+LocalityLoadBalancerSetting = _reflection.GeneratedProtocolMessageType('LocalityLoadBalancerSetting', (_message.Message,), dict(
+
+ Distribute = _reflection.GeneratedProtocolMessageType('Distribute', (_message.Message,), dict(
+
+ ToEntry = _reflection.GeneratedProtocolMessageType('ToEntry', (_message.Message,), dict(
+ DESCRIPTOR = _LOCALITYLOADBALANCERSETTING_DISTRIBUTE_TOENTRY,
+ __module__ = 'mesh.v1alpha1.config_pb2'
+ # @@protoc_insertion_point(class_scope:istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Distribute.ToEntry)
+ ))
+ ,
+ DESCRIPTOR = _LOCALITYLOADBALANCERSETTING_DISTRIBUTE,
+ __module__ = 'mesh.v1alpha1.config_pb2'
+ # @@protoc_insertion_point(class_scope:istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Distribute)
+ ))
+ ,
+
+ Failover = _reflection.GeneratedProtocolMessageType('Failover', (_message.Message,), dict(
+ DESCRIPTOR = _LOCALITYLOADBALANCERSETTING_FAILOVER,
+ __module__ = 'mesh.v1alpha1.config_pb2'
+ # @@protoc_insertion_point(class_scope:istio.mesh.v1alpha1.LocalityLoadBalancerSetting.Failover)
+ ))
+ ,
+ DESCRIPTOR = _LOCALITYLOADBALANCERSETTING,
+ __module__ = 'mesh.v1alpha1.config_pb2'
+ # @@protoc_insertion_point(class_scope:istio.mesh.v1alpha1.LocalityLoadBalancerSetting)
+ ))
+_sym_db.RegisterMessage(LocalityLoadBalancerSetting)
+_sym_db.RegisterMessage(LocalityLoadBalancerSetting.Distribute)
+_sym_db.RegisterMessage(LocalityLoadBalancerSetting.Distribute.ToEntry)
+_sym_db.RegisterMessage(LocalityLoadBalancerSetting.Failover)
+
DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\032istio.io/api/mesh/v1alpha1'))
@@ -466,4 +661,6 @@
_MESHCONFIG.fields_by_name['mixer_address']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_MESHCONFIG.fields_by_name['sds_refresh_delay'].has_options = True
_MESHCONFIG.fields_by_name['sds_refresh_delay']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
+_LOCALITYLOADBALANCERSETTING_DISTRIBUTE_TOENTRY.has_options = True
+_LOCALITYLOADBALANCERSETTING_DISTRIBUTE_TOENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001'))
# @@protoc_insertion_point(module_scope)
diff --git a/vendor/istio.io/api/python/istio_api/networking/v1alpha3/destination_rule_pb2.py b/vendor/istio.io/api/python/istio_api/networking/v1alpha3/destination_rule_pb2.py
index 461d8fcdfb91..3a54fdf1f0b0 100644
--- a/vendor/istio.io/api/python/istio_api/networking/v1alpha3/destination_rule_pb2.py
+++ b/vendor/istio.io/api/python/istio_api/networking/v1alpha3/destination_rule_pb2.py
@@ -23,7 +23,7 @@
name='networking/v1alpha3/destination_rule.proto',
package='istio.networking.v1alpha3',
syntax='proto3',
- serialized_pb=_b('\n*networking/v1alpha3/destination_rule.proto\x12\x19istio.networking.v1alpha3\x1a\x1egoogle/protobuf/duration.proto\x1a)networking/v1alpha3/virtual_service.proto\x1a!networking/v1alpha3/sidecar.proto\x1a\x14gogoproto/gogo.proto\"\xd3\x01\n\x0f\x44\x65stinationRule\x12\x0c\n\x04host\x18\x01 \x01(\t\x12@\n\x0etraffic_policy\x18\x02 \x01(\x0b\x32(.istio.networking.v1alpha3.TrafficPolicy\x12\x32\n\x07subsets\x18\x03 \x03(\x0b\x32!.istio.networking.v1alpha3.Subset\x12<\n\x0c\x63onfig_scope\x18\x04 \x01(\x0e\x32&.istio.networking.v1alpha3.ConfigScope\"\xd7\x05\n\rTrafficPolicy\x12\x46\n\rload_balancer\x18\x01 \x01(\x0b\x32/.istio.networking.v1alpha3.LoadBalancerSettings\x12J\n\x0f\x63onnection_pool\x18\x02 \x01(\x0b\x32\x31.istio.networking.v1alpha3.ConnectionPoolSettings\x12\x46\n\x11outlier_detection\x18\x03 \x01(\x0b\x32+.istio.networking.v1alpha3.OutlierDetection\x12\x33\n\x03tls\x18\x04 \x01(\x0b\x32&.istio.networking.v1alpha3.TLSSettings\x12W\n\x13port_level_settings\x18\x05 \x03(\x0b\x32:.istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy\x1a\xdb\x02\n\x11PortTrafficPolicy\x12\x35\n\x04port\x18\x01 \x01(\x0b\x32\'.istio.networking.v1alpha3.PortSelector\x12\x46\n\rload_balancer\x18\x02 \x01(\x0b\x32/.istio.networking.v1alpha3.LoadBalancerSettings\x12J\n\x0f\x63onnection_pool\x18\x03 \x01(\x0b\x32\x31.istio.networking.v1alpha3.ConnectionPoolSettings\x12\x46\n\x11outlier_detection\x18\x04 \x01(\x0b\x32+.istio.networking.v1alpha3.OutlierDetection\x12\x33\n\x03tls\x18\x05 \x01(\x0b\x32&.istio.networking.v1alpha3.TLSSettings\"\xc6\x01\n\x06Subset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12=\n\x06labels\x18\x02 \x03(\x0b\x32-.istio.networking.v1alpha3.Subset.LabelsEntry\x12@\n\x0etraffic_policy\x18\x03 \x01(\x0b\x32(.istio.networking.v1alpha3.TrafficPolicy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xda\x06\n\x14LoadBalancerSettings\x12J\n\x06simple\x18\x01 \x01(\x0e\x32\x38.istio.networking.v1alpha3.LoadBalancerSettings.SimpleLBH\x00\x12[\n\x0f\x63onsistent_hash\x18\x02 \x01(\x0b\x32@.istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLBH\x00\x12g\n\x18locality_weight_settings\x18\x03 \x03(\x0b\x32\x45.istio.networking.v1alpha3.LoadBalancerSettings.LocalityWeightSetting\x1a\xaa\x02\n\x10\x43onsistentHashLB\x12\x1a\n\x10http_header_name\x18\x01 \x01(\tH\x00\x12\x62\n\x0bhttp_cookie\x18\x02 \x01(\x0b\x32K.istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookieH\x00\x12\x17\n\ruse_source_ip\x18\x03 \x01(\x08H\x00\x12\x19\n\x11minimum_ring_size\x18\x04 \x01(\x04\x1aV\n\nHTTPCookie\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12,\n\x03ttl\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x04\x98\xdf\x1f\x01\x42\n\n\x08hash_key\x1a\xab\x01\n\x15LocalityWeightSetting\x12\x0c\n\x04\x66rom\x18\x01 \x01(\t\x12Y\n\x02to\x18\x02 \x03(\x0b\x32M.istio.networking.v1alpha3.LoadBalancerSettings.LocalityWeightSetting.ToEntry\x1a)\n\x07ToEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"H\n\x08SimpleLB\x12\x0f\n\x0bROUND_ROBIN\x10\x00\x12\x0e\n\nLEAST_CONN\x10\x01\x12\n\n\x06RANDOM\x10\x02\x12\x0f\n\x0bPASSTHROUGH\x10\x03\x42\x0b\n\tlb_policy\"\xf3\x04\n\x16\x43onnectionPoolSettings\x12J\n\x03tcp\x18\x01 \x01(\x0b\x32=.istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings\x12L\n\x04http\x18\x02 \x01(\x0b\x32>.istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings\x1a\xb3\x02\n\x0bTCPSettings\x12\x17\n\x0fmax_connections\x18\x01 \x01(\x05\x12\x32\n\x0f\x63onnect_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x61\n\rtcp_keepalive\x18\x03 \x01(\x0b\x32J.istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive\x1at\n\x0cTcpKeepalive\x12\x0e\n\x06probes\x18\x01 \x01(\r\x12\'\n\x04time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x88\x01\n\x0cHTTPSettings\x12\"\n\x1ahttp1_max_pending_requests\x18\x01 \x01(\x05\x12\x1a\n\x12http2_max_requests\x18\x02 \x01(\x05\x12#\n\x1bmax_requests_per_connection\x18\x03 \x01(\x05\x12\x13\n\x0bmax_retries\x18\x04 \x01(\x05\"\xcc\x01\n\x10OutlierDetection\x12\x1a\n\x12\x63onsecutive_errors\x18\x01 \x01(\x05\x12+\n\x08interval\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12\x62\x61se_ejection_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14max_ejection_percent\x18\x04 \x01(\x05\x12\x1a\n\x12min_health_percent\x18\x05 \x01(\x05\"\xff\x01\n\x0bTLSSettings\x12<\n\x04mode\x18\x01 \x01(\x0e\x32..istio.networking.v1alpha3.TLSSettings.TLSmode\x12\x1a\n\x12\x63lient_certificate\x18\x02 \x01(\t\x12\x13\n\x0bprivate_key\x18\x03 \x01(\t\x12\x17\n\x0f\x63\x61_certificates\x18\x04 \x01(\t\x12\x19\n\x11subject_alt_names\x18\x05 \x03(\t\x12\x0b\n\x03sni\x18\x06 \x01(\t\"@\n\x07TLSmode\x12\x0b\n\x07\x44ISABLE\x10\x00\x12\n\n\x06SIMPLE\x10\x01\x12\n\n\x06MUTUAL\x10\x02\x12\x10\n\x0cISTIO_MUTUAL\x10\x03\x42\"Z istio.io/api/networking/v1alpha3b\x06proto3')
+ serialized_pb=_b('\n*networking/v1alpha3/destination_rule.proto\x12\x19istio.networking.v1alpha3\x1a\x1egoogle/protobuf/duration.proto\x1a)networking/v1alpha3/virtual_service.proto\x1a!networking/v1alpha3/sidecar.proto\x1a\x14gogoproto/gogo.proto\"\xd3\x01\n\x0f\x44\x65stinationRule\x12\x0c\n\x04host\x18\x01 \x01(\t\x12@\n\x0etraffic_policy\x18\x02 \x01(\x0b\x32(.istio.networking.v1alpha3.TrafficPolicy\x12\x32\n\x07subsets\x18\x03 \x03(\x0b\x32!.istio.networking.v1alpha3.Subset\x12<\n\x0c\x63onfig_scope\x18\x04 \x01(\x0e\x32&.istio.networking.v1alpha3.ConfigScope\"\xd7\x05\n\rTrafficPolicy\x12\x46\n\rload_balancer\x18\x01 \x01(\x0b\x32/.istio.networking.v1alpha3.LoadBalancerSettings\x12J\n\x0f\x63onnection_pool\x18\x02 \x01(\x0b\x32\x31.istio.networking.v1alpha3.ConnectionPoolSettings\x12\x46\n\x11outlier_detection\x18\x03 \x01(\x0b\x32+.istio.networking.v1alpha3.OutlierDetection\x12\x33\n\x03tls\x18\x04 \x01(\x0b\x32&.istio.networking.v1alpha3.TLSSettings\x12W\n\x13port_level_settings\x18\x05 \x03(\x0b\x32:.istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy\x1a\xdb\x02\n\x11PortTrafficPolicy\x12\x35\n\x04port\x18\x01 \x01(\x0b\x32\'.istio.networking.v1alpha3.PortSelector\x12\x46\n\rload_balancer\x18\x02 \x01(\x0b\x32/.istio.networking.v1alpha3.LoadBalancerSettings\x12J\n\x0f\x63onnection_pool\x18\x03 \x01(\x0b\x32\x31.istio.networking.v1alpha3.ConnectionPoolSettings\x12\x46\n\x11outlier_detection\x18\x04 \x01(\x0b\x32+.istio.networking.v1alpha3.OutlierDetection\x12\x33\n\x03tls\x18\x05 \x01(\x0b\x32&.istio.networking.v1alpha3.TLSSettings\"\xc6\x01\n\x06Subset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12=\n\x06labels\x18\x02 \x03(\x0b\x32-.istio.networking.v1alpha3.Subset.LabelsEntry\x12@\n\x0etraffic_policy\x18\x03 \x01(\x0b\x32(.istio.networking.v1alpha3.TrafficPolicy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc3\x04\n\x14LoadBalancerSettings\x12J\n\x06simple\x18\x01 \x01(\x0e\x32\x38.istio.networking.v1alpha3.LoadBalancerSettings.SimpleLBH\x00\x12[\n\x0f\x63onsistent_hash\x18\x02 \x01(\x0b\x32@.istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLBH\x00\x1a\xaa\x02\n\x10\x43onsistentHashLB\x12\x1a\n\x10http_header_name\x18\x01 \x01(\tH\x00\x12\x62\n\x0bhttp_cookie\x18\x02 \x01(\x0b\x32K.istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookieH\x00\x12\x17\n\ruse_source_ip\x18\x03 \x01(\x08H\x00\x12\x19\n\x11minimum_ring_size\x18\x04 \x01(\x04\x1aV\n\nHTTPCookie\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12,\n\x03ttl\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x04\x98\xdf\x1f\x01\x42\n\n\x08hash_key\"H\n\x08SimpleLB\x12\x0f\n\x0bROUND_ROBIN\x10\x00\x12\x0e\n\nLEAST_CONN\x10\x01\x12\n\n\x06RANDOM\x10\x02\x12\x0f\n\x0bPASSTHROUGH\x10\x03\x42\x0b\n\tlb_policy\"\xf3\x04\n\x16\x43onnectionPoolSettings\x12J\n\x03tcp\x18\x01 \x01(\x0b\x32=.istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings\x12L\n\x04http\x18\x02 \x01(\x0b\x32>.istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings\x1a\xb3\x02\n\x0bTCPSettings\x12\x17\n\x0fmax_connections\x18\x01 \x01(\x05\x12\x32\n\x0f\x63onnect_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x61\n\rtcp_keepalive\x18\x03 \x01(\x0b\x32J.istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive\x1at\n\x0cTcpKeepalive\x12\x0e\n\x06probes\x18\x01 \x01(\r\x12\'\n\x04time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x88\x01\n\x0cHTTPSettings\x12\"\n\x1ahttp1_max_pending_requests\x18\x01 \x01(\x05\x12\x1a\n\x12http2_max_requests\x18\x02 \x01(\x05\x12#\n\x1bmax_requests_per_connection\x18\x03 \x01(\x05\x12\x13\n\x0bmax_retries\x18\x04 \x01(\x05\"\xcc\x01\n\x10OutlierDetection\x12\x1a\n\x12\x63onsecutive_errors\x18\x01 \x01(\x05\x12+\n\x08interval\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12\x62\x61se_ejection_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1c\n\x14max_ejection_percent\x18\x04 \x01(\x05\x12\x1a\n\x12min_health_percent\x18\x05 \x01(\x05\"\xff\x01\n\x0bTLSSettings\x12<\n\x04mode\x18\x01 \x01(\x0e\x32..istio.networking.v1alpha3.TLSSettings.TLSmode\x12\x1a\n\x12\x63lient_certificate\x18\x02 \x01(\t\x12\x13\n\x0bprivate_key\x18\x03 \x01(\t\x12\x17\n\x0f\x63\x61_certificates\x18\x04 \x01(\t\x12\x19\n\x11subject_alt_names\x18\x05 \x03(\t\x12\x0b\n\x03sni\x18\x06 \x01(\t\"@\n\x07TLSmode\x12\x0b\n\x07\x44ISABLE\x10\x00\x12\n\n\x06SIMPLE\x10\x01\x12\n\n\x06MUTUAL\x10\x02\x12\x10\n\x0cISTIO_MUTUAL\x10\x03\x42\"Z istio.io/api/networking/v1alpha3b\x06proto3')
,
dependencies=[google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,networking_dot_v1alpha3_dot_virtual__service__pb2.DESCRIPTOR,networking_dot_v1alpha3_dot_sidecar__pb2.DESCRIPTOR,gogoproto_dot_gogo__pb2.DESCRIPTOR,])
@@ -54,8 +54,8 @@
],
containing_type=None,
options=None,
- serialized_start=2124,
- serialized_end=2196,
+ serialized_start=1845,
+ serialized_end=1917,
)
_sym_db.RegisterEnumDescriptor(_LOADBALANCERSETTINGS_SIMPLELB)
@@ -84,8 +84,8 @@
],
containing_type=None,
options=None,
- serialized_start=3240,
- serialized_end=3304,
+ serialized_start=2961,
+ serialized_end=3025,
)
_sym_db.RegisterEnumDescriptor(_TLSSETTINGS_TLSMODE)
@@ -381,8 +381,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=1850,
- serialized_end=1936,
+ serialized_start=1745,
+ serialized_end=1831,
)
_LOADBALANCERSETTINGS_CONSISTENTHASHLB = _descriptor.Descriptor(
@@ -435,82 +435,8 @@
name='hash_key', full_name='istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.hash_key',
index=0, containing_type=None, fields=[]),
],
- serialized_start=1650,
- serialized_end=1948,
-)
-
-_LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING_TOENTRY = _descriptor.Descriptor(
- name='ToEntry',
- full_name='istio.networking.v1alpha3.LoadBalancerSettings.LocalityWeightSetting.ToEntry',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='key', full_name='istio.networking.v1alpha3.LoadBalancerSettings.LocalityWeightSetting.ToEntry.key', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='value', full_name='istio.networking.v1alpha3.LoadBalancerSettings.LocalityWeightSetting.ToEntry.value', index=1,
- number=2, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')),
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2081,
- serialized_end=2122,
-)
-
-_LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING = _descriptor.Descriptor(
- name='LocalityWeightSetting',
- full_name='istio.networking.v1alpha3.LoadBalancerSettings.LocalityWeightSetting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='from', full_name='istio.networking.v1alpha3.LoadBalancerSettings.LocalityWeightSetting.from', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='to', full_name='istio.networking.v1alpha3.LoadBalancerSettings.LocalityWeightSetting.to', index=1,
- number=2, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[_LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING_TOENTRY, ],
- enum_types=[
- ],
- options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1951,
- serialized_end=2122,
+ serialized_start=1545,
+ serialized_end=1843,
)
_LOADBALANCERSETTINGS = _descriptor.Descriptor(
@@ -534,17 +460,10 @@
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='locality_weight_settings', full_name='istio.networking.v1alpha3.LoadBalancerSettings.locality_weight_settings', index=2,
- number=3, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None, file=DESCRIPTOR),
],
extensions=[
],
- nested_types=[_LOADBALANCERSETTINGS_CONSISTENTHASHLB, _LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING, ],
+ nested_types=[_LOADBALANCERSETTINGS_CONSISTENTHASHLB, ],
enum_types=[
_LOADBALANCERSETTINGS_SIMPLELB,
],
@@ -558,7 +477,7 @@
index=0, containing_type=None, fields=[]),
],
serialized_start=1351,
- serialized_end=2209,
+ serialized_end=1930,
)
@@ -602,8 +521,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=2584,
- serialized_end=2700,
+ serialized_start=2305,
+ serialized_end=2421,
)
_CONNECTIONPOOLSETTINGS_TCPSETTINGS = _descriptor.Descriptor(
@@ -646,8 +565,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=2393,
- serialized_end=2700,
+ serialized_start=2114,
+ serialized_end=2421,
)
_CONNECTIONPOOLSETTINGS_HTTPSETTINGS = _descriptor.Descriptor(
@@ -697,8 +616,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=2703,
- serialized_end=2839,
+ serialized_start=2424,
+ serialized_end=2560,
)
_CONNECTIONPOOLSETTINGS = _descriptor.Descriptor(
@@ -734,8 +653,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=2212,
- serialized_end=2839,
+ serialized_start=1933,
+ serialized_end=2560,
)
@@ -793,8 +712,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=2842,
- serialized_end=3046,
+ serialized_start=2563,
+ serialized_end=2767,
)
@@ -860,8 +779,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=3049,
- serialized_end=3304,
+ serialized_start=2770,
+ serialized_end=3025,
)
_DESTINATIONRULE.fields_by_name['traffic_policy'].message_type = _TRAFFICPOLICY
@@ -894,12 +813,8 @@
_LOADBALANCERSETTINGS_CONSISTENTHASHLB.oneofs_by_name['hash_key'].fields.append(
_LOADBALANCERSETTINGS_CONSISTENTHASHLB.fields_by_name['use_source_ip'])
_LOADBALANCERSETTINGS_CONSISTENTHASHLB.fields_by_name['use_source_ip'].containing_oneof = _LOADBALANCERSETTINGS_CONSISTENTHASHLB.oneofs_by_name['hash_key']
-_LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING_TOENTRY.containing_type = _LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING
-_LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING.fields_by_name['to'].message_type = _LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING_TOENTRY
-_LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING.containing_type = _LOADBALANCERSETTINGS
_LOADBALANCERSETTINGS.fields_by_name['simple'].enum_type = _LOADBALANCERSETTINGS_SIMPLELB
_LOADBALANCERSETTINGS.fields_by_name['consistent_hash'].message_type = _LOADBALANCERSETTINGS_CONSISTENTHASHLB
-_LOADBALANCERSETTINGS.fields_by_name['locality_weight_settings'].message_type = _LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING
_LOADBALANCERSETTINGS_SIMPLELB.containing_type = _LOADBALANCERSETTINGS
_LOADBALANCERSETTINGS.oneofs_by_name['lb_policy'].fields.append(
_LOADBALANCERSETTINGS.fields_by_name['simple'])
@@ -981,20 +896,6 @@
# @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB)
))
,
-
- LocalityWeightSetting = _reflection.GeneratedProtocolMessageType('LocalityWeightSetting', (_message.Message,), dict(
-
- ToEntry = _reflection.GeneratedProtocolMessageType('ToEntry', (_message.Message,), dict(
- DESCRIPTOR = _LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING_TOENTRY,
- __module__ = 'networking.v1alpha3.destination_rule_pb2'
- # @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.LoadBalancerSettings.LocalityWeightSetting.ToEntry)
- ))
- ,
- DESCRIPTOR = _LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING,
- __module__ = 'networking.v1alpha3.destination_rule_pb2'
- # @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.LoadBalancerSettings.LocalityWeightSetting)
- ))
- ,
DESCRIPTOR = _LOADBALANCERSETTINGS,
__module__ = 'networking.v1alpha3.destination_rule_pb2'
# @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.LoadBalancerSettings)
@@ -1002,8 +903,6 @@
_sym_db.RegisterMessage(LoadBalancerSettings)
_sym_db.RegisterMessage(LoadBalancerSettings.ConsistentHashLB)
_sym_db.RegisterMessage(LoadBalancerSettings.ConsistentHashLB.HTTPCookie)
-_sym_db.RegisterMessage(LoadBalancerSettings.LocalityWeightSetting)
-_sym_db.RegisterMessage(LoadBalancerSettings.LocalityWeightSetting.ToEntry)
ConnectionPoolSettings = _reflection.GeneratedProtocolMessageType('ConnectionPoolSettings', (_message.Message,), dict(
@@ -1057,6 +956,4 @@
_SUBSET_LABELSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001'))
_LOADBALANCERSETTINGS_CONSISTENTHASHLB_HTTPCOOKIE.fields_by_name['ttl'].has_options = True
_LOADBALANCERSETTINGS_CONSISTENTHASHLB_HTTPCOOKIE.fields_by_name['ttl']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\230\337\037\001'))
-_LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING_TOENTRY.has_options = True
-_LOADBALANCERSETTINGS_LOCALITYWEIGHTSETTING_TOENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001'))
# @@protoc_insertion_point(module_scope)