- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for UpsertPodCacheWithNetns (0.21 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{
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Aug 14 19:36:19 UTC 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()
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/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, false) assert.NoError(t, err) assert.Equal(t, ztunnelServer.deletedPods.Load(), 1) assert.Equal(t, nlDeps.DelInpodMarkIPRuleCnt.Load(), 1)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Jul 25 16:13:38 UTC 2024 - 10.7K 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 realDependenciesHost() *dep.RealDependencies { return &dep.RealDependencies{ // We are in the host FS *and* the Host network HostFilesystemPodNetwork: false,
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Oct 21 16:48:55 UTC 2024 - 9.1K bytes - Viewed (0)