diff --git a/Gopkg.lock b/Gopkg.lock index 2da3decdabbd..de8c8f047ce5 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -1625,7 +1625,7 @@ [[projects]] branch = "master" - digest = "1:93fde542bfd6fe0662df7fa8cf89460c3fb6d22488c0becaec2cb85681a5a555" + digest = "1:b390629410b2cf04b4efc484f24edd872b7ba73bd02b77a44321abb695263321" name = "istio.io/api" packages = [ "authentication/v1alpha1", @@ -1641,7 +1641,7 @@ "rbac/v1alpha1", ] pruneopts = "T" - revision = "a222b707a5b82f01a6082d88fc44b1892f33dd34" + revision = "d0444f6849c3e442b5b1e818b29bd2c9dec8ca27" [[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 460c8a2955bc..72e870c48d1a 100644 --- a/pilot/pkg/bootstrap/server.go +++ b/pilot/pkg/bootstrap/server.go @@ -413,6 +413,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 2f0fafa5a0b4..e7642d31a458 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 dfbd3fdae18f..7d3fab8c8d74 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 82a7e48e421b..8d660e823c17 100644 --- a/pilot/pkg/networking/util/util.go +++ b/pilot/pkg/networking/util/util.go @@ -256,22 +256,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 57aa7775a09b..3b7e27de0b79 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 64cc148a7e65..1fb8ebd7cca4 100644 --- a/pilot/pkg/proxy/envoy/v2/mem.go +++ b/pilot/pkg/proxy/envoy/v2/mem.go @@ -314,6 +314,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 e360628f7ed6..82918fd22864 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 b46863ab36ec..3a068d808e6b 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, 0x2e, 0x18, 0xbb, 0x7b, 0x53, 0x21, 0xa6, - 0x11, 0xeb, 0x00, 0xe5, 0x22, 0x9b, 0x74, 0xc2, 0x2c, 0xf5, 0x15, 0x17, 0xb1, 0x71, 0xda, 0x7d, - 0x78, 0x3d, 0x60, 0x92, 0x8a, 0x8f, 0x57, 0xb9, 0x69, 0x3f, 0x66, 0xea, 0x83, 0x48, 0x2f, 0x79, - 0x3c, 0x2d, 0x08, 0x87, 0x9d, 0x90, 0x49, 0xc5, 0x63, 0x88, 0x40, 0xd3, 0x2c, 0x62, 0x86, 0xdb, - 0xfc, 0xcd, 0x46, 0xe8, 0x94, 0xc9, 0x59, 0x0f, 0x2e, 0x84, 0xbf, 0x43, 0x78, 0xce, 0x3f, 0xb2, - 0x94, 0x06, 0x33, 0x16, 0x5c, 0x52, 0xc9, 0xd2, 0xf7, 0x2c, 0x25, 0x56, 0xc3, 0x6a, 0xdd, 0x75, - 0x6c, 0xb0, 0xf4, 0xb4, 0xc1, 0x05, 0x1c, 0xb7, 0xd1, 0xb6, 0x61, 0xa7, 0x2c, 0x11, 0xa9, 0x2a, - 0xe8, 0xeb, 0x40, 0xaf, 0x83, 0xc9, 0x01, 0x4b, 0xce, 0x3f, 0x40, 0x3b, 0x21, 0x97, 0xfe, 0x45, - 0xc4, 0x68, 0x22, 0x22, 0x1e, 0x5c, 0x99, 0x34, 0x92, 0xdc, 0x6a, 0x58, 0xad, 0x4d, 0x67, 0x3b, - 0x37, 0x8e, 0xc1, 0x06, 0x89, 0x24, 0xde, 0x47, 0x75, 0x78, 0x1b, 0x8d, 0xb8, 0x54, 0x2c, 0xa6, - 0x3a, 0x1c, 0x29, 0x35, 0xac, 0xd6, 0x6d, 0x67, 0x0b, 0x0c, 0x43, 0xc0, 0xc7, 0x22, 0x55, 0xf8, - 0x29, 0x32, 0x10, 0x9d, 0x29, 0x95, 0x18, 0xe6, 0x6d, 0x60, 0x56, 0x01, 0x7e, 0xad, 0x54, 0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 0x42, 0x77, 0x5c, 0xcf, 0x19, 0xf4, - 0x3c, 0x7b, 0xbd, 0xf9, 0x14, 0xa1, 0xc5, 0x2e, 0xc6, 0x9b, 0xa8, 0x74, 0x36, 0x3a, 0xeb, 0xdb, - 0x6b, 0xb8, 0x86, 0xd0, 0xe9, 0x39, 0x64, 0xf2, 0x86, 0xae, 0x6d, 0x35, 0x9f, 0xa1, 0xfa, 0x57, - 0x9d, 0xa2, 0xe9, 0x5e, 0xff, 0x67, 0xcf, 0x5e, 0xd3, 0xbf, 0x4e, 0xdc, 0xd1, 0x99, 0x6d, 0x9d, - 0x94, 0x36, 0xb7, 0x6c, 0xfb, 0xa4, 0xb4, 0x89, 0xed, 0xed, 0xa6, 0x44, 0x95, 0xe5, 0x89, 0xc3, - 0x04, 0x6d, 0x14, 0x1b, 0xcf, 0xfc, 0x0f, 0x28, 0x8e, 0x78, 0x80, 0x2a, 0x2a, 0xd2, 0x5f, 0x36, - 0xd3, 0x1a, 0xf0, 0xdd, 0x2f, 0x1f, 0x3c, 0xfd, 0x87, 0xfe, 0xf2, 0x86, 0x6e, 0xd1, 0x48, 0x4e, - 0x59, 0x45, 0xb2, 0x38, 0xbc, 0x6c, 0xfd, 0xf1, 0x69, 0xcf, 0xfa, 0xf3, 0xd3, 0x9e, 0xf5, 0xd7, - 0xa7, 0x3d, 0xeb, 0x97, 0x5d, 0x13, 0x81, 0x8b, 0x8e, 0x9f, 0xf0, 0xce, 0xb5, 0x3f, 0x3a, 0x17, - 0x77, 0x60, 0xc7, 0x1c, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x7a, 0x45, 0xbf, 0x51, 0x09, - 0x00, 0x00, + // 1367 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xef, 0x72, 0xd3, 0x48, + 0x12, 0x8f, 0x1c, 0x43, 0x4c, 0xfb, 0x4f, 0xe4, 0x09, 0x01, 0x61, 0xee, 0x82, 0xf1, 0x15, 0x90, + 0x4a, 0x5d, 0x39, 0x47, 0x52, 0x54, 0x01, 0xf7, 0x29, 0x71, 0x1c, 0x48, 0x70, 0xe2, 0x94, 0xac, + 0x70, 0xc7, 0xdd, 0x87, 0xd9, 0x89, 0x34, 0xb6, 0x67, 0x23, 0x6b, 0x54, 0x9a, 0x51, 0xc0, 0xef, + 0xb4, 0x5b, 0xb5, 0x8f, 0xb1, 0x1f, 0xf7, 0x11, 0xb6, 0x78, 0x83, 0x7d, 0x83, 0xad, 0x99, 0x91, + 0x12, 0x03, 0x2e, 0xb2, 0xec, 0x7e, 0xd3, 0xfc, 0xfa, 0xd7, 0xdd, 0xd3, 0xbf, 0xee, 0x19, 0x0d, + 0x34, 0x26, 0x54, 0x8c, 0x37, 0x2f, 0x9e, 0x92, 0x30, 0x1e, 0x93, 0xa7, 0x9b, 0x3e, 0x8f, 0x86, + 0x6c, 0xd4, 0x8e, 0x13, 0x2e, 0x39, 0x5a, 0x61, 0x42, 0x32, 0xde, 0x56, 0x8c, 0x76, 0xce, 0x68, + 0xac, 0x8d, 0x38, 0x1f, 0x85, 0x74, 0x53, 0x53, 0xce, 0xd2, 0xe1, 0x66, 0x90, 0x26, 0x44, 0x32, + 0x1e, 0x19, 0xa7, 0xc6, 0xbd, 0x4f, 0x03, 0xc6, 0x09, 0xff, 0x30, 0xcd, 0x4c, 0x1b, 0x11, 0x95, + 0xef, 0x79, 0x72, 0xce, 0xa2, 0x51, 0x4e, 0xd8, 0xde, 0x0c, 0xa8, 0x90, 0x2c, 0xd2, 0x11, 0x70, + 0x92, 0x86, 0xd4, 0x70, 0x5b, 0xbf, 0xd9, 0x00, 0x47, 0x54, 0x8c, 0x3b, 0x7a, 0x43, 0xe8, 0x9f, + 0x80, 0x26, 0xec, 0x03, 0x4d, 0xb0, 0x3f, 0xa6, 0xfe, 0x39, 0x16, 0x34, 0xb9, 0xa0, 0x89, 0x63, + 0x35, 0x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55, 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.

+ + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
distributeLocalityLoadBalancerSetting.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.

+ +
failoverLocalityLoadBalancerSetting.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

+ + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
fromstring +

Originating locality, ‘/’ separated, e.g. ‘region/zone/sub_zone’.

+ +
tomap<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.

+ + + + + + + + + + + + + + + + + + + @@ -304,6 +438,14 @@

MeshConfig

rules, and other Istio configuration artifacts. Multiple data sources can be configured for a single control plane.

+ + + + + + diff --git a/vendor/istio.io/api/mixer/v1/istio.mixer.v1.pb.html b/vendor/istio.io/api/mixer/v1/istio.mixer.v1.pb.html index 442d9ccaceef..43ed3b88a861 100644 --- a/vendor/istio.io/api/mixer/v1/istio.mixer.v1.pb.html +++ b/vendor/istio.io/api/mixer/v1/istio.mixer.v1.pb.html @@ -800,7 +800,7 @@

ReportResponse

RouteDirective

Expresses the routing manipulation actions to be performed on behalf of -Mixer in response to a successful precondition check.

+Mixer in response to a precondition check.

FieldTypeDescription
fromstring +

Originating region.

+ +
tostring +

Destination region the traffic will fail over to when endpoints in local region becomes unhealthy.

+
localityLbSettingLocalityLoadBalancerSetting +

Locality based load balancing distribution or failover settings.

+
diff --git a/vendor/istio.io/api/mixer/v1/mixer.pb.go b/vendor/istio.io/api/mixer/v1/mixer.pb.go index 0f6c334879a6..915e3b31e2ac 100644 --- a/vendor/istio.io/api/mixer/v1/mixer.pb.go +++ b/vendor/istio.io/api/mixer/v1/mixer.pb.go @@ -230,7 +230,7 @@ func (*HeaderOperation) ProtoMessage() {} func (*HeaderOperation) Descriptor() ([]byte, []int) { return fileDescriptorMixer, []int{3} } // Expresses the routing manipulation actions to be performed on behalf of -// Mixer in response to a successful precondition check. +// Mixer in response to a precondition check. type RouteDirective struct { // Operations on the request headers. RequestHeaderOperations []HeaderOperation `protobuf:"bytes,1,rep,name=request_header_operations,json=requestHeaderOperations" json:"request_header_operations"` diff --git a/vendor/istio.io/api/mixer/v1/mixer.proto b/vendor/istio.io/api/mixer/v1/mixer.proto index 8d95d91ed06b..461d3e2a351d 100644 --- a/vendor/istio.io/api/mixer/v1/mixer.proto +++ b/vendor/istio.io/api/mixer/v1/mixer.proto @@ -202,7 +202,7 @@ message HeaderOperation { } // Expresses the routing manipulation actions to be performed on behalf of -// Mixer in response to a successful precondition check. +// Mixer in response to a precondition check. message RouteDirective { // Operations on the request headers. repeated HeaderOperation request_header_operations = 1 [(gogoproto.nullable) = false]; 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, 0x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, 0x5e, 0x26, 0x3e, 0x2b, 0x4f, 0xf9, 0x37, 0xee, - 0x64, 0xb4, 0x02, 0x6e, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xbb, 0x7b, 0xfa, 0xcb, 0x0f, - 0x00, 0x00, + // 1418 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6e, 0x1b, 0xb7, + 0x16, 0xb6, 0x7e, 0x63, 0x1f, 0xd9, 0xb2, 0xcc, 0x6b, 0xe4, 0x2a, 0xba, 0x80, 0xe3, 0x08, 0x17, + 0x37, 0xbe, 0x69, 0x33, 0xaa, 0x1d, 0x14, 0x48, 0x13, 0xa4, 0x88, 0x65, 0x1b, 0x91, 0x1b, 0xd9, + 0x12, 0x28, 0x19, 0x28, 0xb2, 0x19, 0x50, 0x23, 0x5a, 0x62, 0x3c, 0x1a, 0x4e, 0x49, 0x8e, 0x6a, + 0xe7, 0x19, 0xba, 0x0e, 0xba, 0xed, 0xa6, 0xcf, 0x52, 0x74, 0xd5, 0x6d, 0xbb, 0x69, 0x91, 0x17, + 0xe8, 0xaa, 0x9b, 0x2e, 0x8a, 0x82, 0x1c, 0xea, 0xc7, 0x89, 0x23, 0xc7, 0x48, 0xb3, 0x23, 0x79, + 0xbe, 0xef, 0x90, 0x3c, 0xe7, 0x9b, 0x73, 0x38, 0x70, 0x27, 0xa0, 0xea, 0x6b, 0x2e, 0x4e, 0x58, + 0xd0, 0xab, 0x0c, 0x37, 0x89, 0x1f, 0xf6, 0xc9, 0xbd, 0x4a, 0x97, 0x4a, 0xc5, 0x02, 0xa2, 0x18, + 0x0f, 0x5c, 0x11, 0xf9, 0xd4, 0x09, 0x05, 0x57, 0x1c, 0xdd, 0x60, 0x52, 0x31, 0xee, 0x4c, 0x18, + 0xce, 0x88, 0x51, 0x5a, 0xeb, 0x71, 0xde, 0xf3, 0x69, 0xc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a8, 0xa8, 0xe8, 0x31, 0xda, 0x83, 0xac, 0x4f, 0x3a, 0xd4, + 0x97, 0xc5, 0xa4, 0x91, 0xc5, 0xdd, 0x4b, 0x4b, 0x80, 0x53, 0x37, 0xf8, 0xbd, 0x40, 0x89, 0x33, + 0x6c, 0xc9, 0x17, 0xd4, 0xa6, 0xd4, 0x7b, 0xd5, 0xa6, 0xd2, 0x67, 0x90, 0x9b, 0xda, 0x07, 0x15, + 0x20, 0x75, 0x42, 0xcf, 0xec, 0xc9, 0xf5, 0x10, 0xad, 0x42, 0x66, 0x48, 0xfc, 0x88, 0x1a, 0x55, + 0x2c, 0xe0, 0x78, 0xf2, 0x20, 0x79, 0x3f, 0x51, 0xfe, 0x3e, 0x03, 0xab, 0x17, 0x09, 0x01, 0x61, + 0xc8, 0x4a, 0x36, 0x08, 0xfd, 0x38, 0x02, 0xf9, 0xad, 0xfb, 0x57, 0x54, 0x92, 0xd3, 0x32, 0xec, + 0x7a, 0xb5, 0x36, 0x87, 0xad, 0x27, 0x74, 0x62, 0xe4, 0x24, 0x99, 0x54, 0x34, 0x50, 0x6e, 0x9f, + 0xc8, 0xbe, 0x95, 0xe9, 0xe3, 0xab, 0x3a, 0xdf, 0x19, 0xbb, 0xa9, 0x11, 0xd9, 0x37, 0x9b, 0xe4, + 0xbd, 0x73, 0x6b, 0xa5, 0x3f, 0x92, 0x50, 0x78, 0x1d, 0x86, 0xee, 0x40, 0xa1, 0xaf, 0x54, 0xe8, + 0xf6, 0x29, 0xe9, 0x52, 0xe1, 0x4e, 0x32, 0xac, 0x1d, 0x68, 0x4b, 0xcd, 0x18, 0x0e, 0x75, 0xb6, + 0x03, 0xc8, 0x19, 0xac, 0xc7, 0xf9, 0x09, 0xa3, 0xf6, 0xa4, 0x4f, 0xdf, 0xf7, 0xa4, 0x4e, 0xad, + 0xdd, 0x6e, 0xee, 0x18, 0x97, 0xb5, 0x39, 0x0c, 0x7a, 0x87, 0x78, 0x86, 0xfe, 0x0b, 0x4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xca, 0x95, 0xc9, 0x69, 0xef, 0x34, 0xa7, 0xca, 0x80, 0x17, 0x22, 0x0c, 0x69, + 0x9d, 0x17, 0x9b, 0xf2, 0xcf, 0xaf, 0xee, 0x51, 0x47, 0x7d, 0xec, 0xd2, 0xf8, 0x2a, 0xfd, 0x99, + 0x84, 0xdc, 0xd4, 0x46, 0xe8, 0x36, 0x2c, 0x0f, 0xc8, 0xa9, 0x3b, 0x29, 0x8a, 0xd2, 0x5c, 0x20, + 0x83, 0xf3, 0x03, 0x72, 0x3a, 0x71, 0x2b, 0x51, 0x75, 0x5c, 0x83, 0x5d, 0xc5, 0x06, 0x94, 0x47, + 0xca, 0x9e, 0xeb, 0xed, 0xa9, 0x19, 0xd7, 0xda, 0x76, 0x4c, 0x40, 0x1c, 0x96, 0x94, 0x17, 0xba, + 0x27, 0x94, 0x86, 0xc4, 0x67, 0x43, 0x6a, 0x93, 0xfb, 0xc5, 0x7b, 0xc5, 0xca, 0x69, 0x7b, 0xe1, + 0xd3, 0x91, 0x47, 0xbc, 0xa8, 0xa6, 0x66, 0xa5, 0x6f, 0x12, 0xb0, 0x38, 0x6d, 0x46, 0xd7, 0x21, + 0x1b, 0x0a, 0xde, 0xa1, 0xf1, 0x2d, 0x97, 0xb0, 0x9d, 0xa1, 0xbb, 0x90, 0xd6, 0xb7, 0xba, 0xfc, + 0x4a, 0x06, 0x86, 0x3e, 0x85, 0x79, 0x16, 0x28, 0x2a, 0x86, 0xe4, 0x72, 0x81, 0xe2, 0x31, 0xb4, + 0xf4, 0x73, 0x02, 0x16, 0xa7, 0x73, 0x82, 0x1e, 0x42, 0x49, 0x67, 0x65, 0xd3, 0xd5, 0x39, 0x08, + 0x69, 0xd0, 0xd5, 0x9f, 0x92, 0xa0, 0x5f, 0x45, 0x54, 0xaa, 0x51, 0x22, 0xfe, 0x6d, 0x10, 0x07, + 0xe4, 0xb4, 0x19, 0xdb, 0xb1, 0x35, 0xa3, 0x8f, 0x01, 0x69, 0xd3, 0x96, 0x21, 0x8f, 0x49, 0x49, + 0x43, 0x32, 0xe5, 0x65, 0xeb, 0x80, 0x9c, 0x8e, 0xd1, 0x8f, 0xe0, 0x3f, 0xd3, 0x38, 0x37, 0xa4, + 0x62, 0x2a, 0xeb, 0xe6, 0x16, 0x19, 0x5c, 0x1c, 0x4c, 0x18, 0x4d, 0x2a, 0x26, 0xc1, 0x47, 0x37, + 0x21, 0x17, 0xd3, 0x95, 0x60, 0x34, 0x7e, 0xd9, 0x64, 0x30, 0x18, 0xb8, 0x59, 0x29, 0x7f, 0x97, + 0x84, 0xc2, 0xeb, 0x4d, 0x11, 0xdd, 0x05, 0xa4, 0xcb, 0x21, 0xf5, 0x22, 0xc5, 0x86, 0xd4, 0xa5, + 0x42, 0x70, 0x31, 0xba, 0xd7, 0xca, 0x94, 0x65, 0xcf, 0x18, 0xce, 0x85, 0x35, 0xf9, 0xce, 0x61, + 0x45, 0x4f, 0x00, 0x75, 0x88, 0xa4, 0x2e, 0x7d, 0x6e, 0x5f, 0x08, 0x26, 0x95, 0x97, 0xe6, 0xa5, + 0xa0, 0x49, 0x7b, 0x96, 0xa3, 0x25, 0x8a, 0x3e, 0x81, 0x55, 0x7d, 0xc9, 0xb1, 0x9f, 0x90, 0x0a, + 0x8f, 0x06, 0xca, 0xde, 0x16, 0x0d, 0xc8, 0xe9, 0x08, 0xde, 0x8c, 0x2d, 0x3a, 0x07, 0x03, 0x16, + 0xe8, 0x3a, 0xee, 0xab, 0xfe, 0x18, 0x9f, 0x89, 0x73, 0x30, 0x60, 0x41, 0xcd, 0x18, 0x2c, 0xba, + 0xfc, 0xa3, 0xfe, 0xf8, 0x26, 0xcd, 0x1e, 0x55, 0x21, 0x3d, 0xe0, 0xdd, 0x51, 0x6b, 0x73, 0xde, + 0xed, 0x89, 0xa0, 0xc7, 0x9a, 0x85, 0x0d, 0xd7, 0x84, 0xd8, 0x67, 0xba, 0x91, 0x79, 0x54, 0x28, + 0x76, 0xcc, 0x3c, 0xa2, 0x46, 0x0d, 0x76, 0x25, 0xb6, 0xec, 0x4c, 0x0c, 0x3a, 0x8f, 0xa1, 0x60, + 0x43, 0xa2, 0xa8, 0xae, 0x92, 0x26, 0x48, 0x0b, 0x18, 0xec, 0xd2, 0x53, 0x7a, 0xa6, 0x0b, 0x82, + 0x47, 0xa6, 0x7d, 0xc5, 0xc9, 0x5e, 0xc0, 0x79, 0x8f, 0x4c, 0x39, 0x92, 0xba, 0x03, 0xc8, 0xa8, + 0xa3, 0xe3, 0xe1, 0x12, 0x5f, 0x99, 0x1e, 0x16, 0xbf, 0x53, 0x17, 0xf0, 0xb2, 0x35, 0x6c, 0xfb, + 0x4a, 0xb7, 0x30, 0xa9, 0x9f, 0x02, 0x32, 0x60, 0xc5, 0x6c, 0xfc, 0x14, 0x90, 0x01, 0x2b, 0x3f, + 0x86, 0x6b, 0xf6, 0x1e, 0x28, 0x07, 0xd7, 0x76, 0xf7, 0x5b, 0xdb, 0xd5, 0xfa, 0x5e, 0x61, 0x4e, + 0x57, 0xe2, 0xd6, 0xfe, 0x41, 0xb3, 0xbe, 0x17, 0x57, 0xe5, 0x83, 0xa3, 0xf6, 0xd1, 0x76, 0xbd, + 0x90, 0x44, 0x05, 0x58, 0xdc, 0x6f, 0xb5, 0xf7, 0x1b, 0xae, 0x5d, 0x49, 0x55, 0x9d, 0x1f, 0x5e, + 0xad, 0x25, 0x7e, 0x7a, 0xb5, 0x96, 0xf8, 0xed, 0xd5, 0x5a, 0xe2, 0xd9, 0x7a, 0x1c, 0x3b, 0xc6, + 0x2b, 0x24, 0x64, 0x95, 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
-
-
@@ -2461,17 +2436,6 @@

LoadBalancerSettings

- - - - - @@ -2571,42 +2535,6 @@

LoadBalancerSettings.C

- - -
consistentHash LoadBalancerSettings.ConsistentHashLB (oneof) -
localityWeightSettingsLoadBalancerSettings.LocalityWeightSetting[] -

Explicitly assign 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. -If duplicated settings are present, then the first one will take effect.

-

REQUIRED. Lifetime of the cookie.

-
-
-

LoadBalancerSettings.LocalityWeightSetting

-
-

Originating -> upstream cluster locality weight set, support wildcard matching ‘’ -‘’ matches all localities -‘region1/*’ matches all zones in region1

- - - - - - - - - - - - - - - - - - - diff --git a/vendor/istio.io/api/policy/v1beta1/cfg.pb.go b/vendor/istio.io/api/policy/v1beta1/cfg.pb.go index c20dc5f6604a..e4ff2d1b4e50 100644 --- a/vendor/istio.io/api/policy/v1beta1/cfg.pb.go +++ b/vendor/istio.io/api/policy/v1beta1/cfg.pb.go @@ -6,6 +6,7 @@ It is generated from these files: policy/v1beta1/cfg.proto + policy/v1beta1/http_response.proto policy/v1beta1/type.proto policy/v1beta1/value_type.proto @@ -24,6 +25,7 @@ Tls OAuth Mutual + DirectHttpResponse Value IPAddress Duration @@ -267,7 +269,7 @@ func (m *AttributeManifest_AttributeInfo) GetValueType() ValueType { // instance constructed using the 'RequestCountByService' instance. // // ```yaml -// - match: destination.service == "*" +// - match: match(destination.service.host, "*") // actions: // - handler: prometheus-handler // instances: @@ -282,17 +284,17 @@ type Rule struct { // // * an empty match evaluates to `true` // * `true`, a boolean literal; a rule with this match will always be executed - // * `destination.service == ratings*` selects any request targeting a service whose + // * `match(destination.service.host, "ratings.*)` selects any request targeting a service whose // name starts with "ratings" // * `attr1 == "20" && attr2 == "30"` logical AND, OR, and NOT are also available Match string `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` // Optional. The actions that will be executed when match evaluates to `true`. Actions []*Action `protobuf:"bytes,2,rep,name=actions" json:"actions,omitempty"` // Optional. Templatized operations on the request headers using values produced by the - // rule actions. + // rule actions. Require the check action result to be OK. RequestHeaderOperations []*Rule_HeaderOperationTemplate `protobuf:"bytes,3,rep,name=request_header_operations,json=requestHeaderOperations" json:"request_header_operations,omitempty"` // Optional. Templatized operations on the response headers using values produced by the - // rule actions. + // rule actions. Require the check action result to be OK. ResponseHeaderOperations []*Rule_HeaderOperationTemplate `protobuf:"bytes,4,rep,name=response_header_operations,json=responseHeaderOperations" json:"response_header_operations,omitempty"` // $hide_from_docs // Optional. Provides the ability to add a sampling configuration for Mixer rules. This sampling @@ -458,7 +460,7 @@ func (m *Action) GetName() string { // params: // value: 1 // dimensions: -// source: source.service +// source: source.name // destination_ip: destination.ip // ``` type Instance struct { diff --git a/vendor/istio.io/api/policy/v1beta1/cfg.proto b/vendor/istio.io/api/policy/v1beta1/cfg.proto index aba475269228..e346755bea7a 100644 --- a/vendor/istio.io/api/policy/v1beta1/cfg.proto +++ b/vendor/istio.io/api/policy/v1beta1/cfg.proto @@ -104,7 +104,7 @@ message AttributeManifest { // instance constructed using the 'RequestCountByService' instance. // // ```yaml -// - match: destination.service == "*" +// - match: match(destination.service.host, "*") // actions: // - handler: prometheus-handler // instances: @@ -119,7 +119,7 @@ message Rule { // // * an empty match evaluates to `true` // * `true`, a boolean literal; a rule with this match will always be executed - // * `destination.service == ratings*` selects any request targeting a service whose + // * `match(destination.service.host, "ratings.*)` selects any request targeting a service whose // name starts with "ratings" // * `attr1 == "20" && attr2 == "30"` logical AND, OR, and NOT are also available string match = 1; @@ -167,11 +167,11 @@ message Rule { } // Optional. Templatized operations on the request headers using values produced by the - // rule actions. + // rule actions. Require the check action result to be OK. repeated HeaderOperationTemplate request_header_operations = 3; // Optional. Templatized operations on the response headers using values produced by the - // rule actions. + // rule actions. Require the check action result to be OK. repeated HeaderOperationTemplate response_header_operations = 4; // $hide_from_docs @@ -225,7 +225,7 @@ message Action { // params: // value: 1 // dimensions: -// source: source.service +// source: source.name // destination_ip: destination.ip // ``` message Instance { diff --git a/vendor/istio.io/api/policy/v1beta1/http_response.pb.go b/vendor/istio.io/api/policy/v1beta1/http_response.pb.go new file mode 100644 index 000000000000..ec3d55e25f7d --- /dev/null +++ b/vendor/istio.io/api/policy/v1beta1/http_response.pb.go @@ -0,0 +1,833 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: policy/v1beta1/http_response.proto + +package v1beta1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// HTTP response codes. +// For more details: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml +type HttpStatusCode int32 + +const ( + // Empty - This code not part of the HTTP status code specification, but it is needed for proto + // `enum` type. + Empty HttpStatusCode = 0 + Continue HttpStatusCode = 100 + OK HttpStatusCode = 200 + Created HttpStatusCode = 201 + Accepted HttpStatusCode = 202 + NonAuthoritativeInformation HttpStatusCode = 203 + NoContent HttpStatusCode = 204 + ResetContent HttpStatusCode = 205 + PartialContent HttpStatusCode = 206 + MultiStatus HttpStatusCode = 207 + AlreadyReported HttpStatusCode = 208 + IMUsed HttpStatusCode = 226 + MultipleChoices HttpStatusCode = 300 + MovedPermanently HttpStatusCode = 301 + Found HttpStatusCode = 302 + SeeOther HttpStatusCode = 303 + NotModified HttpStatusCode = 304 + UseProxy HttpStatusCode = 305 + TemporaryRedirect HttpStatusCode = 307 + PermanentRedirect HttpStatusCode = 308 + BadRequest HttpStatusCode = 400 + Unauthorized HttpStatusCode = 401 + PaymentRequired HttpStatusCode = 402 + Forbidden HttpStatusCode = 403 + NotFound HttpStatusCode = 404 + MethodNotAllowed HttpStatusCode = 405 + NotAcceptable HttpStatusCode = 406 + ProxyAuthenticationRequired HttpStatusCode = 407 + RequestTimeout HttpStatusCode = 408 + Conflict HttpStatusCode = 409 + Gone HttpStatusCode = 410 + LengthRequired HttpStatusCode = 411 + PreconditionFailed HttpStatusCode = 412 + PayloadTooLarge HttpStatusCode = 413 + URITooLong HttpStatusCode = 414 + UnsupportedMediaType HttpStatusCode = 415 + RangeNotSatisfiable HttpStatusCode = 416 + ExpectationFailed HttpStatusCode = 417 + MisdirectedRequest HttpStatusCode = 421 + UnprocessableEntity HttpStatusCode = 422 + Locked HttpStatusCode = 423 + FailedDependency HttpStatusCode = 424 + UpgradeRequired HttpStatusCode = 426 + PreconditionRequired HttpStatusCode = 428 + TooManyRequests HttpStatusCode = 429 + RequestHeaderFieldsTooLarge HttpStatusCode = 431 + InternalServerError HttpStatusCode = 500 + NotImplemented HttpStatusCode = 501 + BadGateway HttpStatusCode = 502 + ServiceUnavailable HttpStatusCode = 503 + GatewayTimeout HttpStatusCode = 504 + HTTPVersionNotSupported HttpStatusCode = 505 + VariantAlsoNegotiates HttpStatusCode = 506 + InsufficientStorage HttpStatusCode = 507 + LoopDetected HttpStatusCode = 508 + NotExtended HttpStatusCode = 510 + NetworkAuthenticationRequired HttpStatusCode = 511 +) + +var HttpStatusCode_name = map[int32]string{ + 0: "Empty", + 100: "Continue", + 200: "OK", + 201: "Created", + 202: "Accepted", + 203: "NonAuthoritativeInformation", + 204: "NoContent", + 205: "ResetContent", + 206: "PartialContent", + 207: "MultiStatus", + 208: "AlreadyReported", + 226: "IMUsed", + 300: "MultipleChoices", + 301: "MovedPermanently", + 302: "Found", + 303: "SeeOther", + 304: "NotModified", + 305: "UseProxy", + 307: "TemporaryRedirect", + 308: "PermanentRedirect", + 400: "BadRequest", + 401: "Unauthorized", + 402: "PaymentRequired", + 403: "Forbidden", + 404: "NotFound", + 405: "MethodNotAllowed", + 406: "NotAcceptable", + 407: "ProxyAuthenticationRequired", + 408: "RequestTimeout", + 409: "Conflict", + 410: "Gone", + 411: "LengthRequired", + 412: "PreconditionFailed", + 413: "PayloadTooLarge", + 414: "URITooLong", + 415: "UnsupportedMediaType", + 416: "RangeNotSatisfiable", + 417: "ExpectationFailed", + 421: "MisdirectedRequest", + 422: "UnprocessableEntity", + 423: "Locked", + 424: "FailedDependency", + 426: "UpgradeRequired", + 428: "PreconditionRequired", + 429: "TooManyRequests", + 431: "RequestHeaderFieldsTooLarge", + 500: "InternalServerError", + 501: "NotImplemented", + 502: "BadGateway", + 503: "ServiceUnavailable", + 504: "GatewayTimeout", + 505: "HTTPVersionNotSupported", + 506: "VariantAlsoNegotiates", + 507: "InsufficientStorage", + 508: "LoopDetected", + 510: "NotExtended", + 511: "NetworkAuthenticationRequired", +} +var HttpStatusCode_value = map[string]int32{ + "Empty": 0, + "Continue": 100, + "OK": 200, + "Created": 201, + "Accepted": 202, + "NonAuthoritativeInformation": 203, + "NoContent": 204, + "ResetContent": 205, + "PartialContent": 206, + "MultiStatus": 207, + "AlreadyReported": 208, + "IMUsed": 226, + "MultipleChoices": 300, + "MovedPermanently": 301, + "Found": 302, + "SeeOther": 303, + "NotModified": 304, + "UseProxy": 305, + "TemporaryRedirect": 307, + "PermanentRedirect": 308, + "BadRequest": 400, + "Unauthorized": 401, + "PaymentRequired": 402, + "Forbidden": 403, + "NotFound": 404, + "MethodNotAllowed": 405, + "NotAcceptable": 406, + "ProxyAuthenticationRequired": 407, + "RequestTimeout": 408, + "Conflict": 409, + "Gone": 410, + "LengthRequired": 411, + "PreconditionFailed": 412, + "PayloadTooLarge": 413, + "URITooLong": 414, + "UnsupportedMediaType": 415, + "RangeNotSatisfiable": 416, + "ExpectationFailed": 417, + "MisdirectedRequest": 421, + "UnprocessableEntity": 422, + "Locked": 423, + "FailedDependency": 424, + "UpgradeRequired": 426, + "PreconditionRequired": 428, + "TooManyRequests": 429, + "RequestHeaderFieldsTooLarge": 431, + "InternalServerError": 500, + "NotImplemented": 501, + "BadGateway": 502, + "ServiceUnavailable": 503, + "GatewayTimeout": 504, + "HTTPVersionNotSupported": 505, + "VariantAlsoNegotiates": 506, + "InsufficientStorage": 507, + "LoopDetected": 508, + "NotExtended": 510, + "NetworkAuthenticationRequired": 511, +} + +func (HttpStatusCode) EnumDescriptor() ([]byte, []int) { return fileDescriptorHttpResponse, []int{0} } + +// Direct HTTP response for a client-facing error message which can be attached +// to an RPC error. +type DirectHttpResponse struct { + // Optional HTTP status code. If not set, RPC error code is used. + Code HttpStatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=istio.policy.v1beta1.HttpStatusCode" json:"code,omitempty"` + // HTTP response body. + Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` + // Optional HTTP response headers. + Headers map[string]string `protobuf:"bytes,3,rep,name=headers" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *DirectHttpResponse) Reset() { *m = DirectHttpResponse{} } +func (*DirectHttpResponse) ProtoMessage() {} +func (*DirectHttpResponse) Descriptor() ([]byte, []int) { return fileDescriptorHttpResponse, []int{0} } + +func (m *DirectHttpResponse) GetCode() HttpStatusCode { + if m != nil { + return m.Code + } + return Empty +} + +func (m *DirectHttpResponse) GetBody() string { + if m != nil { + return m.Body + } + return "" +} + +func (m *DirectHttpResponse) GetHeaders() map[string]string { + if m != nil { + return m.Headers + } + return nil +} + +func init() { + proto.RegisterType((*DirectHttpResponse)(nil), "istio.policy.v1beta1.DirectHttpResponse") + proto.RegisterEnum("istio.policy.v1beta1.HttpStatusCode", HttpStatusCode_name, HttpStatusCode_value) +} +func (x HttpStatusCode) String() string { + s, ok := HttpStatusCode_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *DirectHttpResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DirectHttpResponse) + if !ok { + that2, ok := that.(DirectHttpResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Code != that1.Code { + return false + } + if this.Body != that1.Body { + return false + } + if len(this.Headers) != len(that1.Headers) { + return false + } + for i := range this.Headers { + if this.Headers[i] != that1.Headers[i] { + return false + } + } + return true +} +func (this *DirectHttpResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&v1beta1.DirectHttpResponse{") + s = append(s, "Code: "+fmt.Sprintf("%#v", this.Code)+",\n") + s = append(s, "Body: "+fmt.Sprintf("%#v", this.Body)+",\n") + keysForHeaders := make([]string, 0, len(this.Headers)) + for k, _ := range this.Headers { + keysForHeaders = append(keysForHeaders, k) + } + sortkeys.Strings(keysForHeaders) + mapStringForHeaders := "map[string]string{" + for _, k := range keysForHeaders { + mapStringForHeaders += fmt.Sprintf("%#v: %#v,", k, this.Headers[k]) + } + mapStringForHeaders += "}" + if this.Headers != nil { + s = append(s, "Headers: "+mapStringForHeaders+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringHttpResponse(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *DirectHttpResponse) 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 *DirectHttpResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Code != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintHttpResponse(dAtA, i, uint64(m.Code)) + } + if len(m.Body) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintHttpResponse(dAtA, i, uint64(len(m.Body))) + i += copy(dAtA[i:], m.Body) + } + if len(m.Headers) > 0 { + for k, _ := range m.Headers { + dAtA[i] = 0x1a + i++ + v := m.Headers[k] + mapSize := 1 + len(k) + sovHttpResponse(uint64(len(k))) + 1 + len(v) + sovHttpResponse(uint64(len(v))) + i = encodeVarintHttpResponse(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintHttpResponse(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintHttpResponse(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func encodeVarintHttpResponse(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *DirectHttpResponse) Size() (n int) { + var l int + _ = l + if m.Code != 0 { + n += 1 + sovHttpResponse(uint64(m.Code)) + } + l = len(m.Body) + if l > 0 { + n += 1 + l + sovHttpResponse(uint64(l)) + } + if len(m.Headers) > 0 { + for k, v := range m.Headers { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovHttpResponse(uint64(len(k))) + 1 + len(v) + sovHttpResponse(uint64(len(v))) + n += mapEntrySize + 1 + sovHttpResponse(uint64(mapEntrySize)) + } + } + return n +} + +func sovHttpResponse(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozHttpResponse(x uint64) (n int) { + return sovHttpResponse(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *DirectHttpResponse) String() string { + if this == nil { + return "nil" + } + keysForHeaders := make([]string, 0, len(this.Headers)) + for k, _ := range this.Headers { + keysForHeaders = append(keysForHeaders, k) + } + sortkeys.Strings(keysForHeaders) + mapStringForHeaders := "map[string]string{" + for _, k := range keysForHeaders { + mapStringForHeaders += fmt.Sprintf("%v: %v,", k, this.Headers[k]) + } + mapStringForHeaders += "}" + s := strings.Join([]string{`&DirectHttpResponse{`, + `Code:` + fmt.Sprintf("%v", this.Code) + `,`, + `Body:` + fmt.Sprintf("%v", this.Body) + `,`, + `Headers:` + mapStringForHeaders + `,`, + `}`, + }, "") + return s +} +func valueToStringHttpResponse(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *DirectHttpResponse) 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 ErrIntOverflowHttpResponse + } + 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: DirectHttpResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DirectHttpResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= (HttpStatusCode(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpResponse + } + 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 ErrInvalidLengthHttpResponse + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Body = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHttpResponse + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Headers == nil { + m.Headers = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpResponse + } + 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 ErrIntOverflowHttpResponse + } + 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 ErrInvalidLengthHttpResponse + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthHttpResponse + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipHttpResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHttpResponse + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Headers[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipHttpResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHttpResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipHttpResponse(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthHttpResponse + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipHttpResponse(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthHttpResponse = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowHttpResponse = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("policy/v1beta1/http_response.proto", fileDescriptorHttpResponse) } + +var fileDescriptorHttpResponse = []byte{ + // 1032 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0x4b, 0x8f, 0x1b, 0x45, + 0x10, 0xde, 0x71, 0xe7, 0xb5, 0x9d, 0xcd, 0xa6, 0xd3, 0xd9, 0x90, 0x25, 0x01, 0x6b, 0x15, 0x71, + 0x88, 0x38, 0x78, 0x95, 0x20, 0xa4, 0x28, 0xb7, 0xcd, 0xc6, 0x9b, 0x58, 0xac, 0x1d, 0xcb, 0x6b, + 0xe7, 0xc0, 0x05, 0xf5, 0x4e, 0x97, 0xed, 0x56, 0xc6, 0x5d, 0x93, 0x9e, 0xb2, 0x93, 0xe1, 0xc4, + 0x4f, 0x08, 0xef, 0xf7, 0xeb, 0x00, 0x44, 0x28, 0x21, 0x20, 0xb8, 0xf0, 0x0f, 0xc2, 0x3b, 0x47, + 0x8e, 0xc4, 0x5c, 0xb8, 0x91, 0x03, 0x6f, 0x10, 0xa0, 0x6e, 0x3f, 0xb4, 0x11, 0xe1, 0x36, 0x5d, + 0x53, 0x5f, 0xd5, 0x57, 0xdf, 0x57, 0x33, 0xcd, 0x8f, 0xa4, 0x98, 0x98, 0x38, 0x5f, 0x1e, 0x1c, + 0xdb, 0x04, 0x52, 0xc7, 0x96, 0xbb, 0x44, 0xe9, 0x13, 0x0e, 0xb2, 0x14, 0x6d, 0x06, 0xa5, 0xd4, + 0x21, 0xa1, 0x5c, 0x30, 0x19, 0x19, 0x2c,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e2, 0x87, 0x6b, 0x68, 0x57, + 0xfa, 0xd4, 0x45, 0x67, 0x48, 0x91, 0x19, 0x40, 0xc5, 0xb6, 0xd1, 0xf5, 0x14, 0x19, 0xb4, 0xe2, + 0x8b, 0x48, 0xce, 0xf3, 0xd9, 0x1a, 0xfa, 0xba, 0x60, 0x49, 0x7c, 0x19, 0xc9, 0x7d, 0x7c, 0xae, + 0x01, 0x19, 0xd0, 0x24, 0xf4, 0x55, 0x24, 0xf7, 0xf3, 0xf9, 0xba, 0x72, 0x64, 0x54, 0x32, 0x09, + 0x7e, 0x1d, 0x49, 0xc1, 0x77, 0x57, 0xfb, 0x09, 0x99, 0x11, 0x57, 0xf1, 0x4d, 0x24, 0x17, 0xf8, + 0xde, 0x95, 0xc4, 0x81, 0xd2, 0x79, 0x03, 0x52, 0x74, 0x9e, 0xc1, 0xad, 0x48, 0xee, 0xe6, 0x3b, + 0x2a, 0xd5, 0x56, 0x06, 0x5a, 0x0c, 0x43, 0x4a, 0x00, 0xa5, 0x09, 0xac, 0x76, 0xd1, 0xc4, 0x90, + 0x89, 0x6b, 0x05, 0x79, 0x80, 0x8b, 0x2a, 0x0e, 0x40, 0xd7, 0xc1, 0xf5, 0x94, 0x05, 0x4b, 0x49, + 0x2e, 0xae, 0x17, 0x24, 0xe7, 0xdb, 0xd7, 0xb0, 0x6f, 0xb5, 0xf8, 0xa0, 0xe0, 0xc7, 0xda, 0x00, + 0x38, 0x47, 0x5d, 0x70, 0xe2, 0x46, 0xc1, 0x37, 0xaf, 0x21, 0x55, 0x51, 0x9b, 0xb6, 0x01, 0x2d, + 0x3e, 0x0c, 0x09, 0xad, 0x0c, 0xea, 0x0e, 0x2f, 0xe7, 0xe2, 0xa3, 0x82, 0xbc, 0x8f, 0xef, 0x6b, + 0x42, 0x2f, 0x45, 0xa7, 0x5c, 0xde, 0x00, 0x1d, 0xcc, 0x13, 0x1f, 0x87, 0xf8, 0xb4, 0xcb, 0x34, + 0xfe, 0x49, 0x41, 0x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, + 0x7f, 0x63, 0xf2, 0x01, 0x7e, 0xf0, 0x6c, 0xb3, 0x59, 0x3f, 0x0f, 0x2e, 0x33, 0x68, 0xbd, 0xca, + 0x13, 0x1b, 0xc4, 0xef, 0x4c, 0x1e, 0xe2, 0x07, 0xce, 0x2b, 0x67, 0x94, 0xa5, 0x95, 0x24, 0xc3, + 0x1a, 0x74, 0x90, 0x8c, 0x22, 0xc8, 0xc4, 0x1f, 0x63, 0x9e, 0x59, 0xbf, 0xdd, 0x36, 0xb1, 0x01, + 0x4b, 0x1b, 0x84, 0x4e, 0x75, 0x40, 0xfc, 0x19, 0xf6, 0x7c, 0x1d, 0x31, 0x3d, 0x0d, 0x14, 0x2c, + 0x10, 0x7f, 0xb1, 0xf1, 0xc7, 0x55, 0xbe, 0x4c, 0x5e, 0x51, 0x2d, 0xfe, 0x66, 0xf2, 0x08, 0x7f, + 0xb0, 0x06, 0x74, 0x09, 0xdd, 0x85, 0xff, 0xd9, 0xcd, 0x7f, 0xd8, 0xa9, 0xca, 0xad, 0xdb, 0xc5, + 0x99, 0x6f, 0x6f, 0x17, 0x67, 0xee, 0xdc, 0x2e, 0x46, 0x4f, 0x0d, 0x8b, 0xd1, 0xd5, 0x61, 0x31, + 0xba, 0x39, 0x2c, 0x46, 0xb7, 0x86, 0xc5, 0xe8, 0xbb, 0x61, 0x31, 0xfa, 0x61, 0x58, 0x9c, 0xb9, + 0x33, 0x2c, 0x46, 0x57, 0xbe, 0x2f, 0xce, 0x3c, 0x7e, 0x78, 0xf4, 0x93, 0x35, 0xb8, 0xac, 0x52, + 0xb3, 0x7c, 0xf7, 0x15, 0xb1, 0xb9, 0x23, 0xdc, 0x0a, 0x8f, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, + 0xd9, 0x97, 0x1d, 0x7f, 0x3b, 0x06, 0x00, 0x00, +} diff --git a/vendor/istio.io/api/policy/v1beta1/http_response.proto b/vendor/istio.io/api/policy/v1beta1/http_response.proto new file mode 100644 index 000000000000..5da35120a820 --- /dev/null +++ b/vendor/istio.io/api/policy/v1beta1/http_response.proto @@ -0,0 +1,101 @@ +// 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. + +syntax = "proto3"; + +package istio.policy.v1beta1; + +option go_package="istio.io/api/policy/v1beta1"; + +// Direct HTTP response for a client-facing error message which can be attached +// to an RPC error. +message DirectHttpResponse { + // Optional HTTP status code. If not set, RPC error code is used. + HttpStatusCode code = 1; + + // HTTP response body. + string body = 2; + + // Optional HTTP response headers. + map headers = 3; +} + +// HTTP response codes. +// For more details: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml +enum HttpStatusCode { + // Empty - This code not part of the HTTP status code specification, but it is needed for proto + // `enum` type. + Empty = 0; + + Continue = 100; + + OK = 200; + Created = 201; + Accepted = 202; + NonAuthoritativeInformation = 203; + NoContent = 204; + ResetContent = 205; + PartialContent = 206; + MultiStatus = 207; + AlreadyReported = 208; + IMUsed = 226; + + MultipleChoices = 300; + MovedPermanently = 301; + Found = 302; + SeeOther = 303; + NotModified = 304; + UseProxy = 305; + TemporaryRedirect = 307; + PermanentRedirect = 308; + + BadRequest = 400; + Unauthorized = 401; + PaymentRequired = 402; + Forbidden = 403; + NotFound = 404; + MethodNotAllowed = 405; + NotAcceptable = 406; + ProxyAuthenticationRequired = 407; + RequestTimeout = 408; + Conflict = 409; + Gone = 410; + LengthRequired = 411; + PreconditionFailed = 412; + PayloadTooLarge = 413; + URITooLong = 414; + UnsupportedMediaType = 415; + RangeNotSatisfiable = 416; + ExpectationFailed = 417; + MisdirectedRequest = 421; + UnprocessableEntity = 422; + Locked = 423; + FailedDependency = 424; + UpgradeRequired = 426; + PreconditionRequired = 428; + TooManyRequests = 429; + RequestHeaderFieldsTooLarge = 431; + + InternalServerError = 500; + NotImplemented = 501; + BadGateway = 502; + ServiceUnavailable = 503; + GatewayTimeout = 504; + HTTPVersionNotSupported = 505; + VariantAlsoNegotiates = 506; + InsufficientStorage = 507; + LoopDetected = 508; + NotExtended = 510; + NetworkAuthenticationRequired = 511; +} diff --git a/vendor/istio.io/api/policy/v1beta1/istio.policy.v1beta1.pb.html b/vendor/istio.io/api/policy/v1beta1/istio.policy.v1beta1.pb.html index 39c716a87e90..8f0e37473fa3 100644 --- a/vendor/istio.io/api/policy/v1beta1/istio.policy.v1beta1.pb.html +++ b/vendor/istio.io/api/policy/v1beta1/istio.policy.v1beta1.pb.html @@ -4,7 +4,7 @@ location: https://istio.io/docs/reference/config/policy-and-telemetry/istio.policy.v1beta1.html layout: protoc-gen-docs generator: protoc-gen-docs -number_of_entries: 23 +number_of_entries: 25 ---

Describes the rules used to configure Mixer’s policy and telemetry features.

@@ -288,6 +288,47 @@

DNSName

+ + +
FieldTypeDescription
fromstring -

Originating locality, ‘/’ separated, e.g. ‘region/zone/sub_zone’.

- -
tomap<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.

-

DNSName encoded as string.

+
+
+

DirectHttpResponse

+
+

Direct HTTP response for a client-facing error message which can be attached +to an RPC error.

+ + + + + + + + + + + + + + + + + + + + + + + + @@ -493,6 +534,310 @@

Handler

Optional. Information on how to connect to the out-of-process adapter. This is used if the adapter is not compiled into Mixer binary and is running as a separate process.

+ + + +
FieldTypeDescription
codeHttpStatusCode +

Optional HTTP status code. If not set, RPC error code is used.

+ +
bodystring +

HTTP response body.

+ +
headersmap<string, string> +

Optional HTTP response headers.

+
+
+

HttpStatusCode

+
+

HTTP response codes. +For more details: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -544,7 +889,7 @@

Instance

params: value: 1 dimensions: - source: source.service + source: source.name destination_ip: destination.ip @@ -731,7 +1076,7 @@

Rule

The following example instructs Mixer to invoke ‘prometheus-handler’ handler for all services and pass it the instance constructed using the ‘RequestCountByService’ instance.

-
- match: destination.service == "*"
+
- match: match(destination.service.host, "*")
   actions:
   - handler: prometheus-handler
     instances:
@@ -760,7 +1105,7 @@ 

Rule

  • an empty match evaluates to true
  • true, a boolean literal; a rule with this match will always be executed
  • -
  • destination.service == ratings* selects any request targeting a service whose +
  • match(destination.service.host, "ratings.*) selects any request targeting a service whose name starts with “ratings”
  • attr1 == "20" && attr2 == "30" logical AND, OR, and NOT are also available
@@ -780,7 +1125,7 @@

Rule

@@ -789,7 +1134,7 @@

Rule

diff --git a/vendor/istio.io/api/proto.lock b/vendor/istio.io/api/proto.lock index 67af790a4d05..0f0232352c34 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" - } - } - ] } ] }, @@ -4629,6 +4662,273 @@ ] } }, + { + "protopath": "policy:/:v1beta1:/:http_response.proto", + "def": { + "enums": [ + { + "name": "HttpStatusCode", + "enum_fields": [ + { + "name": "Empty", + "integer": 0 + }, + { + "name": "Continue", + "integer": 100 + }, + { + "name": "OK", + "integer": 200 + }, + { + "name": "Created", + "integer": 201 + }, + { + "name": "Accepted", + "integer": 202 + }, + { + "name": "NonAuthoritativeInformation", + "integer": 203 + }, + { + "name": "NoContent", + "integer": 204 + }, + { + "name": "ResetContent", + "integer": 205 + }, + { + "name": "PartialContent", + "integer": 206 + }, + { + "name": "MultiStatus", + "integer": 207 + }, + { + "name": "AlreadyReported", + "integer": 208 + }, + { + "name": "IMUsed", + "integer": 226 + }, + { + "name": "MultipleChoices", + "integer": 300 + }, + { + "name": "MovedPermanently", + "integer": 301 + }, + { + "name": "Found", + "integer": 302 + }, + { + "name": "SeeOther", + "integer": 303 + }, + { + "name": "NotModified", + "integer": 304 + }, + { + "name": "UseProxy", + "integer": 305 + }, + { + "name": "TemporaryRedirect", + "integer": 307 + }, + { + "name": "PermanentRedirect", + "integer": 308 + }, + { + "name": "BadRequest", + "integer": 400 + }, + { + "name": "Unauthorized", + "integer": 401 + }, + { + "name": "PaymentRequired", + "integer": 402 + }, + { + "name": "Forbidden", + "integer": 403 + }, + { + "name": "NotFound", + "integer": 404 + }, + { + "name": "MethodNotAllowed", + "integer": 405 + }, + { + "name": "NotAcceptable", + "integer": 406 + }, + { + "name": "ProxyAuthenticationRequired", + "integer": 407 + }, + { + "name": "RequestTimeout", + "integer": 408 + }, + { + "name": "Conflict", + "integer": 409 + }, + { + "name": "Gone", + "integer": 410 + }, + { + "name": "LengthRequired", + "integer": 411 + }, + { + "name": "PreconditionFailed", + "integer": 412 + }, + { + "name": "PayloadTooLarge", + "integer": 413 + }, + { + "name": "URITooLong", + "integer": 414 + }, + { + "name": "UnsupportedMediaType", + "integer": 415 + }, + { + "name": "RangeNotSatisfiable", + "integer": 416 + }, + { + "name": "ExpectationFailed", + "integer": 417 + }, + { + "name": "MisdirectedRequest", + "integer": 421 + }, + { + "name": "UnprocessableEntity", + "integer": 422 + }, + { + "name": "Locked", + "integer": 423 + }, + { + "name": "FailedDependency", + "integer": 424 + }, + { + "name": "UpgradeRequired", + "integer": 426 + }, + { + "name": "PreconditionRequired", + "integer": 428 + }, + { + "name": "TooManyRequests", + "integer": 429 + }, + { + "name": "RequestHeaderFieldsTooLarge", + "integer": 431 + }, + { + "name": "InternalServerError", + "integer": 500 + }, + { + "name": "NotImplemented", + "integer": 501 + }, + { + "name": "BadGateway", + "integer": 502 + }, + { + "name": "ServiceUnavailable", + "integer": 503 + }, + { + "name": "GatewayTimeout", + "integer": 504 + }, + { + "name": "HTTPVersionNotSupported", + "integer": 505 + }, + { + "name": "VariantAlsoNegotiates", + "integer": 506 + }, + { + "name": "InsufficientStorage", + "integer": 507 + }, + { + "name": "LoopDetected", + "integer": 508 + }, + { + "name": "NotExtended", + "integer": 510 + }, + { + "name": "NetworkAuthenticationRequired", + "integer": 511 + } + ] + } + ], + "messages": [ + { + "name": "DirectHttpResponse", + "fields": [ + { + "id": 1, + "name": "code", + "type": "HttpStatusCode" + }, + { + "id": 2, + "name": "body", + "type": "string" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 3, + "name": "headers", + "type": "string" + } + } + ] + } + ] + } + }, { "protopath": "policy:/:v1beta1:/:type.proto", "def": { diff --git a/vendor/istio.io/api/prototool.yaml b/vendor/istio.io/api/prototool.yaml index ebf22bd55bb6..2ef3f7402192 100644 --- a/vendor/istio.io/api/prototool.yaml +++ b/vendor/istio.io/api/prototool.yaml @@ -13,6 +13,7 @@ lint: - id: ENUM_FIELD_NAMES_UPPER_SNAKE_CASE files: - networking/v1alpha3/gateway.proto + - policy/v1beta1/http_response.proto - id: REQUEST_RESPONSE_TYPES_UNIQUE files: - mcp/v1alpha1/mcp.proto 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) diff --git a/vendor/istio.io/api/python/istio_api/policy/v1beta1/http_response_pb2.py b/vendor/istio.io/api/python/istio_api/policy/v1beta1/http_response_pb2.py new file mode 100644 index 000000000000..7a788c48625a --- /dev/null +++ b/vendor/istio.io/api/python/istio_api/policy/v1beta1/http_response_pb2.py @@ -0,0 +1,437 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: policy/v1beta1/http_response.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='policy/v1beta1/http_response.proto', + package='istio.policy.v1beta1', + syntax='proto3', + serialized_pb=_b('\n\"policy/v1beta1/http_response.proto\x12\x14istio.policy.v1beta1\"\xce\x01\n\x12\x44irectHttpResponse\x12\x32\n\x04\x63ode\x18\x01 \x01(\x0e\x32$.istio.policy.v1beta1.HttpStatusCode\x12\x0c\n\x04\x62ody\x18\x02 \x01(\t\x12\x46\n\x07headers\x18\x03 \x03(\x0b\x32\x35.istio.policy.v1beta1.DirectHttpResponse.HeadersEntry\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01*\xb9\t\n\x0eHttpStatusCode\x12\t\n\x05\x45mpty\x10\x00\x12\x0c\n\x08\x43ontinue\x10\x64\x12\x07\n\x02OK\x10\xc8\x01\x12\x0c\n\x07\x43reated\x10\xc9\x01\x12\r\n\x08\x41\x63\x63\x65pted\x10\xca\x01\x12 \n\x1bNonAuthoritativeInformation\x10\xcb\x01\x12\x0e\n\tNoContent\x10\xcc\x01\x12\x11\n\x0cResetContent\x10\xcd\x01\x12\x13\n\x0ePartialContent\x10\xce\x01\x12\x10\n\x0bMultiStatus\x10\xcf\x01\x12\x14\n\x0f\x41lreadyReported\x10\xd0\x01\x12\x0b\n\x06IMUsed\x10\xe2\x01\x12\x14\n\x0fMultipleChoices\x10\xac\x02\x12\x15\n\x10MovedPermanently\x10\xad\x02\x12\n\n\x05\x46ound\x10\xae\x02\x12\r\n\x08SeeOther\x10\xaf\x02\x12\x10\n\x0bNotModified\x10\xb0\x02\x12\r\n\x08UseProxy\x10\xb1\x02\x12\x16\n\x11TemporaryRedirect\x10\xb3\x02\x12\x16\n\x11PermanentRedirect\x10\xb4\x02\x12\x0f\n\nBadRequest\x10\x90\x03\x12\x11\n\x0cUnauthorized\x10\x91\x03\x12\x14\n\x0fPaymentRequired\x10\x92\x03\x12\x0e\n\tForbidden\x10\x93\x03\x12\r\n\x08NotFound\x10\x94\x03\x12\x15\n\x10MethodNotAllowed\x10\x95\x03\x12\x12\n\rNotAcceptable\x10\x96\x03\x12 \n\x1bProxyAuthenticationRequired\x10\x97\x03\x12\x13\n\x0eRequestTimeout\x10\x98\x03\x12\r\n\x08\x43onflict\x10\x99\x03\x12\t\n\x04Gone\x10\x9a\x03\x12\x13\n\x0eLengthRequired\x10\x9b\x03\x12\x17\n\x12PreconditionFailed\x10\x9c\x03\x12\x14\n\x0fPayloadTooLarge\x10\x9d\x03\x12\x0f\n\nURITooLong\x10\x9e\x03\x12\x19\n\x14UnsupportedMediaType\x10\x9f\x03\x12\x18\n\x13RangeNotSatisfiable\x10\xa0\x03\x12\x16\n\x11\x45xpectationFailed\x10\xa1\x03\x12\x17\n\x12MisdirectedRequest\x10\xa5\x03\x12\x18\n\x13UnprocessableEntity\x10\xa6\x03\x12\x0b\n\x06Locked\x10\xa7\x03\x12\x15\n\x10\x46\x61iledDependency\x10\xa8\x03\x12\x14\n\x0fUpgradeRequired\x10\xaa\x03\x12\x19\n\x14PreconditionRequired\x10\xac\x03\x12\x14\n\x0fTooManyRequests\x10\xad\x03\x12 \n\x1bRequestHeaderFieldsTooLarge\x10\xaf\x03\x12\x18\n\x13InternalServerError\x10\xf4\x03\x12\x13\n\x0eNotImplemented\x10\xf5\x03\x12\x0f\n\nBadGateway\x10\xf6\x03\x12\x17\n\x12ServiceUnavailable\x10\xf7\x03\x12\x13\n\x0eGatewayTimeout\x10\xf8\x03\x12\x1c\n\x17HTTPVersionNotSupported\x10\xf9\x03\x12\x1a\n\x15VariantAlsoNegotiates\x10\xfa\x03\x12\x18\n\x13InsufficientStorage\x10\xfb\x03\x12\x11\n\x0cLoopDetected\x10\xfc\x03\x12\x10\n\x0bNotExtended\x10\xfe\x03\x12\"\n\x1dNetworkAuthenticationRequired\x10\xff\x03\x42\x1dZ\x1bistio.io/api/policy/v1beta1b\x06proto3') +) + +_HTTPSTATUSCODE = _descriptor.EnumDescriptor( + name='HttpStatusCode', + full_name='istio.policy.v1beta1.HttpStatusCode', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='Empty', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Continue', index=1, number=100, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='OK', index=2, number=200, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Created', index=3, number=201, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Accepted', index=4, number=202, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NonAuthoritativeInformation', index=5, number=203, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NoContent', index=6, number=204, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ResetContent', index=7, number=205, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PartialContent', index=8, number=206, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MultiStatus', index=9, number=207, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='AlreadyReported', index=10, number=208, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='IMUsed', index=11, number=226, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MultipleChoices', index=12, number=300, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MovedPermanently', index=13, number=301, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Found', index=14, number=302, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='SeeOther', index=15, number=303, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NotModified', index=16, number=304, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UseProxy', index=17, number=305, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='TemporaryRedirect', index=18, number=307, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PermanentRedirect', index=19, number=308, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BadRequest', index=20, number=400, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Unauthorized', index=21, number=401, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PaymentRequired', index=22, number=402, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Forbidden', index=23, number=403, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NotFound', index=24, number=404, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MethodNotAllowed', index=25, number=405, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NotAcceptable', index=26, number=406, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ProxyAuthenticationRequired', index=27, number=407, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='RequestTimeout', index=28, number=408, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Conflict', index=29, number=409, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Gone', index=30, number=410, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='LengthRequired', index=31, number=411, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PreconditionFailed', index=32, number=412, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PayloadTooLarge', index=33, number=413, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='URITooLong', index=34, number=414, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UnsupportedMediaType', index=35, number=415, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='RangeNotSatisfiable', index=36, number=416, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ExpectationFailed', index=37, number=417, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MisdirectedRequest', index=38, number=421, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UnprocessableEntity', index=39, number=422, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Locked', index=40, number=423, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='FailedDependency', index=41, number=424, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UpgradeRequired', index=42, number=426, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PreconditionRequired', index=43, number=428, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='TooManyRequests', index=44, number=429, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='RequestHeaderFieldsTooLarge', index=45, number=431, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='InternalServerError', index=46, number=500, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NotImplemented', index=47, number=501, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BadGateway', index=48, number=502, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ServiceUnavailable', index=49, number=503, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='GatewayTimeout', index=50, number=504, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='HTTPVersionNotSupported', index=51, number=505, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='VariantAlsoNegotiates', index=52, number=506, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='InsufficientStorage', index=53, number=507, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='LoopDetected', index=54, number=508, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NotExtended', index=55, number=510, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NetworkAuthenticationRequired', index=56, number=511, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=270, + serialized_end=1479, +) +_sym_db.RegisterEnumDescriptor(_HTTPSTATUSCODE) + +HttpStatusCode = enum_type_wrapper.EnumTypeWrapper(_HTTPSTATUSCODE) +Empty = 0 +Continue = 100 +OK = 200 +Created = 201 +Accepted = 202 +NonAuthoritativeInformation = 203 +NoContent = 204 +ResetContent = 205 +PartialContent = 206 +MultiStatus = 207 +AlreadyReported = 208 +IMUsed = 226 +MultipleChoices = 300 +MovedPermanently = 301 +Found = 302 +SeeOther = 303 +NotModified = 304 +UseProxy = 305 +TemporaryRedirect = 307 +PermanentRedirect = 308 +BadRequest = 400 +Unauthorized = 401 +PaymentRequired = 402 +Forbidden = 403 +NotFound = 404 +MethodNotAllowed = 405 +NotAcceptable = 406 +ProxyAuthenticationRequired = 407 +RequestTimeout = 408 +Conflict = 409 +Gone = 410 +LengthRequired = 411 +PreconditionFailed = 412 +PayloadTooLarge = 413 +URITooLong = 414 +UnsupportedMediaType = 415 +RangeNotSatisfiable = 416 +ExpectationFailed = 417 +MisdirectedRequest = 421 +UnprocessableEntity = 422 +Locked = 423 +FailedDependency = 424 +UpgradeRequired = 426 +PreconditionRequired = 428 +TooManyRequests = 429 +RequestHeaderFieldsTooLarge = 431 +InternalServerError = 500 +NotImplemented = 501 +BadGateway = 502 +ServiceUnavailable = 503 +GatewayTimeout = 504 +HTTPVersionNotSupported = 505 +VariantAlsoNegotiates = 506 +InsufficientStorage = 507 +LoopDetected = 508 +NotExtended = 510 +NetworkAuthenticationRequired = 511 + + + +_DIRECTHTTPRESPONSE_HEADERSENTRY = _descriptor.Descriptor( + name='HeadersEntry', + full_name='istio.policy.v1beta1.DirectHttpResponse.HeadersEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='istio.policy.v1beta1.DirectHttpResponse.HeadersEntry.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.policy.v1beta1.DirectHttpResponse.HeadersEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + 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=221, + serialized_end=267, +) + +_DIRECTHTTPRESPONSE = _descriptor.Descriptor( + name='DirectHttpResponse', + full_name='istio.policy.v1beta1.DirectHttpResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='code', full_name='istio.policy.v1beta1.DirectHttpResponse.code', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='body', full_name='istio.policy.v1beta1.DirectHttpResponse.body', 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), + _descriptor.FieldDescriptor( + name='headers', full_name='istio.policy.v1beta1.DirectHttpResponse.headers', 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=[_DIRECTHTTPRESPONSE_HEADERSENTRY, ], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=61, + serialized_end=267, +) + +_DIRECTHTTPRESPONSE_HEADERSENTRY.containing_type = _DIRECTHTTPRESPONSE +_DIRECTHTTPRESPONSE.fields_by_name['code'].enum_type = _HTTPSTATUSCODE +_DIRECTHTTPRESPONSE.fields_by_name['headers'].message_type = _DIRECTHTTPRESPONSE_HEADERSENTRY +DESCRIPTOR.message_types_by_name['DirectHttpResponse'] = _DIRECTHTTPRESPONSE +DESCRIPTOR.enum_types_by_name['HttpStatusCode'] = _HTTPSTATUSCODE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +DirectHttpResponse = _reflection.GeneratedProtocolMessageType('DirectHttpResponse', (_message.Message,), dict( + + HeadersEntry = _reflection.GeneratedProtocolMessageType('HeadersEntry', (_message.Message,), dict( + DESCRIPTOR = _DIRECTHTTPRESPONSE_HEADERSENTRY, + __module__ = 'policy.v1beta1.http_response_pb2' + # @@protoc_insertion_point(class_scope:istio.policy.v1beta1.DirectHttpResponse.HeadersEntry) + )) + , + DESCRIPTOR = _DIRECTHTTPRESPONSE, + __module__ = 'policy.v1beta1.http_response_pb2' + # @@protoc_insertion_point(class_scope:istio.policy.v1beta1.DirectHttpResponse) + )) +_sym_db.RegisterMessage(DirectHttpResponse) +_sym_db.RegisterMessage(DirectHttpResponse.HeadersEntry) + + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\033istio.io/api/policy/v1beta1')) +_DIRECTHTTPRESPONSE_HEADERSENTRY.has_options = True +_DIRECTHTTPRESPONSE_HEADERSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) +# @@protoc_insertion_point(module_scope)
NameDescription
Empty +

Empty - This code not part of the HTTP status code specification, but it is needed for proto +enum type.

+ +
Continue +
OK +
Created +
Accepted +
NonAuthoritativeInformation +
NoContent +
ResetContent +
PartialContent +
MultiStatus +
AlreadyReported +
IMUsed +
MultipleChoices +
MovedPermanently +
Found +
SeeOther +
NotModified +
UseProxy +
TemporaryRedirect +
PermanentRedirect +
BadRequest +
Unauthorized +
PaymentRequired +
Forbidden +
NotFound +
MethodNotAllowed +
NotAcceptable +
ProxyAuthenticationRequired +
RequestTimeout +
Conflict +
Gone +
LengthRequired +
PreconditionFailed +
PayloadTooLarge +
URITooLong +
UnsupportedMediaType +
RangeNotSatisfiable +
ExpectationFailed +
MisdirectedRequest +
UnprocessableEntity +
Locked +
FailedDependency +
UpgradeRequired +
PreconditionRequired +
TooManyRequests +
RequestHeaderFieldsTooLarge +
InternalServerError +
NotImplemented +
BadGateway +
ServiceUnavailable +
GatewayTimeout +
HTTPVersionNotSupported +
VariantAlsoNegotiates +
InsufficientStorage +
LoopDetected +
NotExtended +
NetworkAuthenticationRequired
Rule.HeaderOperationTemplate[]

Optional. Templatized operations on the request headers using values produced by the -rule actions.

+rule actions. Require the check action result to be OK.

Rule.HeaderOperationTemplate[]

Optional. Templatized operations on the response headers using values produced by the -rule actions.

+rule actions. Require the check action result to be OK.