Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for getProxyServiceTargets (0.62 sec)

  1. pilot/pkg/serviceregistry/kube/controller/serviceimportcache_test.go

    		}
    
    		instances := ic.getProxyServiceTargets()
    		if len(instances) != 0 {
    			return fmt.Errorf("expected 0 service instance, found %d", len(instances))
    		}
    
    		return nil
    	}, serviceImportTimeout)
    }
    
    func (ic *serviceImportCacheImpl) getProxyServiceTargets() []model.ServiceTarget {
    	return ic.GetProxyServiceTargets(&model.Proxy{
    		Type:            model.SidecarProxy,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Aug 14 18:50:38 UTC 2023
    - 15.2K bytes
    - Viewed (0)
  2. pilot/pkg/serviceregistry/aggregate/controller_test.go

    func TestGetProxyServiceTargets(t *testing.T) {
    	aggregateCtl := buildMockController()
    
    	// Get Instances from mockAdapter1
    	instances := aggregateCtl.GetProxyServiceTargets(&model.Proxy{IPAddresses: []string{mock.HelloInstanceV0}})
    	if len(instances) != 6 {
    		t.Fatalf("Returned GetProxyServiceTargets' amount %d is not correct", len(instances))
    	}
    	for _, inst := range instances {
    		if inst.Service.Hostname != mock.HelloService.Hostname {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 06:28:11 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  3. pilot/pkg/serviceregistry/aggregate/controller.go

    	if r.Provider() != provider.Kubernetes || nodeClusterID == "" {
    		return false
    	}
    
    	return !r.Cluster().Equals(nodeClusterID)
    }
    
    // GetProxyServiceTargets lists service instances co-located with a given proxy
    func (c *Controller) GetProxyServiceTargets(node *model.Proxy) []model.ServiceTarget {
    	out := make([]model.ServiceTarget, 0)
    	nodeClusterID := nodeClusterID(node)
    	for _, r := range c.GetRegistries() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 06:28:11 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  4. pilot/pkg/serviceregistry/memory/discovery.go

    	sd.mutex.Lock()
    	defer sd.mutex.Unlock()
    	return sd.services[hostname]
    }
    
    // GetProxyServiceTargets returns service instances associated with a node, resulting in
    // 'in' services.
    func (sd *ServiceDiscovery) GetProxyServiceTargets(node *model.Proxy) []model.ServiceTarget {
    	sd.mutex.Lock()
    	defer sd.mutex.Unlock()
    	if sd.WantGetProxyServiceTargets != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 23:10:01 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  5. pilot/pkg/serviceregistry/kube/controller/controller_test.go

    	}
    	serviceInstances := controller.GetProxyServiceTargets(svcNode)
    
    	if len(serviceInstances) != 1 {
    		t.Fatalf("GetProxyServiceTargets() expected 1 instance, got %d", len(serviceInstances))
    	}
    
    	hostname := kube.ServiceHostname("svc1", "nsa", defaultFakeDomainSuffix)
    	if serviceInstances[0].Service.Hostname != hostname {
    		t.Fatalf("GetProxyServiceTargets() wrong service instance returned => hostname %q, want %q",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 85K bytes
    - Viewed (0)
  6. pilot/pkg/serviceregistry/kube/controller/endpointslice.go

    		})
    	}
    }
    
    // GetProxyServiceTargets returns service instances co-located with a given proxy
    // TODO: this code does not return k8s service instances when the proxy's IP is a workload entry
    // To tackle this, we need a ip2instance map like what we have in service entry.
    func (esc *endpointSliceController) GetProxyServiceTargets(proxy *model.Proxy) []model.ServiceTarget {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  7. pilot/pkg/serviceregistry/kube/controller/controller.go

    		}
    	}
    
    	return endpoints
    }
    
    // GetProxyServiceTargets returns service targets co-located with a given proxy
    // TODO: this code does not return k8s service instances when the proxy's IP is a workload entry
    // To tackle this, we need a ip2instance map like what we have in service entry.
    func (c *Controller) GetProxyServiceTargets(proxy *model.Proxy) []model.ServiceTarget {
    	if len(proxy.IPAddresses) > 0 {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 41.2K bytes
    - Viewed (0)
  8. pilot/pkg/serviceregistry/serviceentry/controller.go

    			endpoints[key] = append(endpoints[key], instance.Endpoint)
    		}
    
    	}
    	return endpoints
    }
    
    // GetProxyServiceTargets lists service targets co-located with a given proxy
    // NOTE: The service objects in these instances do not have the auto allocated IP set.
    func (s *Controller) GetProxyServiceTargets(node *model.Proxy) []model.ServiceTarget {
    	out := make([]model.ServiceTarget, 0)
    	s.mutex.RLock()
    	defer s.mutex.RUnlock()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 15:31:09 UTC 2024
    - 36.8K bytes
    - Viewed (0)
  9. pilot/pkg/networking/grpcgen/grpcgen_test.go

    func initRBACTests(sd *memory.ServiceDiscovery, store model.ConfigStore, svcname string, port int, mtls bool) {
    	ns := "test"
    	hn := svcname + "." + ns + ".svc.cluster.local"
    	// The 'memory' store GetProxyServiceTargets uses the IP address of the node and endpoints to
    	// identify the service. In k8s store, labels are matched instead.
    	// For server configs to work, the server XDS bootstrap must match the IP.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 09:04:02 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  10. pilot/pkg/model/service.go

    	// Services list declarations of all services in the system
    	Services() []*Service
    
    	// GetService retrieves a service by host name if it exists
    	GetService(hostname host.Name) *Service
    
    	// GetProxyServiceTargets returns the service targets that co-located with a given Proxy
    	//
    	// Co-located generally means running in the same network namespace and security context.
    	//
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 02:03:58 UTC 2024
    - 46.3K bytes
    - Viewed (0)
Back to top