Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for getPodsByIP (0.34 sec)

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

    		}
    	}
    
    	// This pod exists, but should not be in the cache because it is in a
    	// namespace not watched by the controller.
    	assert.Equal(t, c.pods.getPodsByIP("128.0.0.4"), nil)
    
    	// This pod should not be in the cache because it never existed.
    	assert.Equal(t, c.pods.getPodsByIP("128.0.0.128"), nil)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 16 18:27:40 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  2. pilot/pkg/serviceregistry/kube/controller/pod.go

    	pc.RLock()
    	defer pc.RUnlock()
    	return pc.podsByIP[addr].UnsortedList()
    }
    
    // getPodByIp returns the pod or nil if pod not found or an error occurred
    func (pc *PodCache) getPodsByIP(addr string) []*v1.Pod {
    	keys := pc.getPodKeys(addr)
    	if keys == nil {
    		return nil
    	}
    	res := make([]*v1.Pod, 0, len(keys))
    	for _, key := range keys {
    		p := pc.getPodByKey(key)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  3. pilot/pkg/serviceregistry/kube/controller/endpointslice.go

    	// We will want to lookup a pod to find metadata like service account, labels, etc. But for hostNetwork, we just get a raw IP,
    	// and the IP may be shared by many pods. Best we can do is guess.
    	pods := c.pods.getPodsByIP(ip)
    	for _, p := range pods {
    		if p.Namespace == namespace {
    			// Might not be right, but best we can do.
    			return p
    		}
    	}
    	return nil
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 16.9K bytes
    - Viewed (0)
Back to top