- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for OpenNetns (0.08 sec)
-
cni/pkg/nodeagent/net.go
if netNs == "" { return s.getNetns(pod) } return s.openNetns(pod, netNs) } func (s *NetServer) openNetns(pod *corev1.Pod, netNs string) (Netns, error) { return s.currentPodSnapshot.UpsertPodCache(pod, netNs) } func (s *NetServer) getNetns(pod *corev1.Pod) (Netns, error) { openNetns := s.currentPodSnapshot.Get(string(pod.UID)) if openNetns != nil { return openNetns, nil }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Oct 21 16:48:55 UTC 2024 - 9.1K bytes - Viewed (0) -
cni/pkg/nodeagent/pod_cache.go
openNetns: openNetns, currentPodCache: map[string]WorkloadInfo{}, } } func (p *podNetnsCache) UpsertPodCache(pod *corev1.Pod, nspath string) (Netns, error) { newnetns, err := p.openNetns(nspath) if err != nil { return nil, err } wl := WorkloadInfo{ Workload: podToWorkload(pod), Netns: newnetns, } return p.UpsertPodCacheWithNetns(string(pod.UID), wl), nil }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri May 31 17:18:11 UTC 2024 - 4.3K bytes - Viewed (0) -
cni/pkg/nodeagent/pod_cache_test.go
} if !reflect.DeepEqual(netns1, netns2) { t.Fatalf("Expected the same Netns for the same uid, got %v and %v", netns1, netns2) } if counter.Load() != 2 { t.Fatalf("Expected openNetns to be called twice, got %d", counter.Load()) } } func TestUpsertPodCacheWithNewInode(t *testing.T) { counter.Store(0) p := newPodNetnsCache(openNsTestOverrideWithInodes(1, 2))
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Aug 14 19:36:19 UTC 2024 - 4.2K bytes - Viewed (0)