- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for UpsertPodCacheWithNetns (0.37 sec)
-
cni/pkg/nodeagent/pod_cache_test.go
pod := &corev1.Pod{ObjectMeta: metav1.ObjectMeta{UID: "testUID"}} ns := newFakeNsInode(inc(), 1) wl := WorkloadInfo{ Workload: podToWorkload(pod), Netns: ns, } netns1 := p.UpsertPodCacheWithNetns(string(pod.UID), wl) if !reflect.DeepEqual(netns1, ns) { t.Fatalf("Expected the same Netns for the same uid, got %v and %v", netns1, ns) } ns2 := newFakeNsInode(inc(), 1) wl2 := WorkloadInfo{
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 4.2K bytes - Viewed (0) -
cni/pkg/nodeagent/pod_cache.go
} wl := WorkloadInfo{ Workload: podToWorkload(pod), Netns: newnetns, } return p.UpsertPodCacheWithNetns(string(pod.UID), wl), nil } // Update the cache with the given Netns. If there is already a Netns for the given uid, we return it, and close the one provided. func (p *podNetnsCache) UpsertPodCacheWithNetns(uid string, workload WorkloadInfo) Netns { // lock current snapshot pod map p.mu.Lock() defer p.mu.Unlock()
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 4.5K bytes - Viewed (0) -
cni/pkg/nodeagent/net_test.go
fakens := newFakeNs(123) closed := fakens.closed workload := WorkloadInfo{ Workload: podToWorkload(pod), Netns: fakens, } fixture.podNsMap.UpsertPodCacheWithNetns(string(pod.UID), workload) err := netServer.RemovePodFromMesh(ctx, pod) assert.NoError(t, err) assert.Equal(t, ztunnelServer.deletedPods.Load(), 1) assert.Equal(t, nlDeps.DelInpodMarkIPRuleCnt.Load(), 1)
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Tue Apr 30 22:24:38 GMT 2024 - 16.4K bytes - Viewed (0) -
cni/pkg/nodeagent/net.go
res, err := s.podNs.FindNetnsForPods(pods) if err != nil { return err } for uid, wl := range res { s.currentPodSnapshot.UpsertPodCacheWithNetns(uid, wl) } return nil } func realDependencies() *dep.RealDependencies { return &dep.RealDependencies{
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Tue Apr 30 22:24:38 GMT 2024 - 12.2K bytes - Viewed (1)