Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for ShardsForService (0.17 sec)

  1. pilot/pkg/model/endpointshards.go

    		for nsKey, v := range v {
    			out[svcKey][nsKey] = v.DeepCopy()
    		}
    	}
    	return out
    }
    
    // ShardsForService returns the shards and true if they are found, or returns nil, false.
    func (e *EndpointIndex) ShardsForService(serviceName, namespace string) (*EndpointShards, bool) {
    	e.mu.RLock()
    	defer e.mu.RUnlock()
    	byNs, ok := e.shardsBySvc[serviceName]
    	if !ok {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 04:34:37 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  2. pilot/pkg/serviceregistry/kube/controller/serviceexportcache_test.go

    	return GetEndpointsForPort(s, endpoints, 0)
    }
    
    func GetEndpointsForPort(s *model.Service, endpoints *model.EndpointIndex, port int) []*model.IstioEndpoint {
    	shards, ok := endpoints.ShardsForService(string(s.Hostname), s.Attributes.Namespace)
    	if !ok {
    		return nil
    	}
    	var pn string
    	for _, p := range s.Ports {
    		if p.Port == port {
    			pn = p.Name
    			break
    		}
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Aug 14 18:50:38 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  3. pilot/pkg/xds/eds_test.go

    			}
    
    			// Validate that keys in service still exist in EndpointIndex - this prevents full push.
    			if _, ok := s.Discovery.Env.EndpointIndex.ShardsForService("flipflop.com", ""); !ok {
    				t.Fatalf("Expected service key %s to be present in EndpointIndex. But missing %v", "flipflop.com", s.Discovery.Env.EndpointIndex.Shardz())
    			}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 02 20:58:47 UTC 2024
    - 39.6K bytes
    - Viewed (0)
  4. pilot/pkg/xds/endpoints/endpoint_builder.go

    	if b.IsDNSCluster() {
    		log.Infof("cluster %s in eds cluster, but its resolution now is updated to %v, skipping it.", b.clusterName, b.service.Resolution)
    		return nil
    	}
    
    	epShards, f := endpointIndex.ShardsForService(string(b.hostname), b.service.Attributes.Namespace)
    	if !f {
    		// Shouldn't happen here
    		log.Debugf("can not find the endpointShards for cluster %s", b.clusterName)
    		return nil
    	}
    	return epShards
    }
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 28 02:18:19 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  5. pilot/pkg/model/push_context.go

    		}
    
    		svcKey := s.Key()
    		if _, ok := ps.ServiceIndex.instancesByPort[svcKey]; !ok {
    			ps.ServiceIndex.instancesByPort[svcKey] = make(map[int][]*IstioEndpoint)
    		}
    		shards, ok := env.EndpointIndex.ShardsForService(string(s.Hostname), s.Attributes.Namespace)
    		if ok {
    			instancesByPort := shards.CopyEndpoints(portMap, ports)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 09:02:11 UTC 2024
    - 91.8K bytes
    - Viewed (0)
  6. pilot/pkg/serviceregistry/serviceregistry_test.go

    			}, retry.Timeout(time.Second*2))
    		})
    	}
    }
    
    func GetEndpointsForPort(s *model.Service, endpoints *model.EndpointIndex, port int) []*model.IstioEndpoint {
    	shards, ok := endpoints.ShardsForService(string(s.Hostname), s.Attributes.Namespace)
    	if !ok {
    		return nil
    	}
    	var pn string
    	for _, p := range s.Ports {
    		if p.Port == port {
    			pn = p.Name
    			break
    		}
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 51.2K bytes
    - Viewed (0)
  7. pilot/pkg/serviceregistry/serviceentry/controller_test.go

    		sd.workloadEntryHandler(config.Config{}, *wle2, model.EventDelete)
    	}
    }
    
    func GetEndpointsForPort(s *model.Service, endpoints *model.EndpointIndex, port int) []*model.IstioEndpoint {
    	shards, ok := endpoints.ShardsForService(string(s.Hostname), s.Attributes.Namespace)
    	if !ok {
    		return nil
    	}
    	var pn string
    	for _, p := range s.Ports {
    		if p.Port == port {
    			pn = p.Name
    			break
    		}
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 15:31:09 UTC 2024
    - 92.9K bytes
    - Viewed (0)
Back to top