- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for UID (0.17 sec)
-
cni/pkg/nodeagent/pod_cache.go
} 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() if existing := p.currentPodCache[uid]; existing.Netns != nil {
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.go
func (s *NetServer) buildZtunnelSnapshot(ambientPodUIDs map[types.UID]*corev1.Pod) error { // first add all the pods as empty: for uid := range ambientPodUIDs { s.currentPodSnapshot.Ensure(string(uid)) } // populate full pod snapshot from cgroups return s.scanProcForPodsAndCache(ambientPodUIDs) } func (s *NetServer) scanProcForPodsAndCache(pods map[types.UID]*corev1.Pod) error {
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) -
cni/pkg/nodeagent/podcgroupns_test.go
n := NewPodNetnsProcFinder(fakeFs()) pod := &corev1.Pod{ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", UID: types.UID("863b91d4-4b68-4efa-917f-4b560e3e86aa"), }} podUIDNetns, err := n.FindNetnsForPods(map[types.UID]*corev1.Pod{ pod.UID: pod, }) if err != nil { panic(err) } defer podUIDNetns.Close() if len(podUIDNetns) == 0 { t.Fatal("expected to find pod netns")
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 4.6K bytes - Viewed (0) -
cni/pkg/nodeagent/server_test.go
"istio.io/istio/pkg/test/util/assert" ) func TestMeshDataplaneAddsAnnotationOnAdd(t *testing.T) { pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", UID: types.UID("test"), }, } fakeCtx := context.Background() fakeClientSet := fake.NewSimpleClientset(pod) podIP := netip.MustParseAddr("99.9.9.1") podIPs := []netip.Addr{podIP} server := &fakeServer{}
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 7.8K bytes - Viewed (0) -
cni/pkg/nodeagent/net_test.go
Namespace: "bar", UID: "123", }, Spec: corev1.PodSpec{ServiceAccountName: "sa"}, } // this is usually called after add. so manually add the pod uid for now fakens := newFakeNs(123) closed := fakens.closed workload := WorkloadInfo{ Workload: podToWorkload(pod), Netns: fakens, } fixture.podNsMap.UpsertPodCacheWithNetns(string(pod.UID), workload)
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/ztunnelserver.go
if latestConn == nil { return fmt.Errorf("no ztunnel connection") } uid := string(pod.ObjectMeta.UID) r := &zdsapi.WorkloadRequest{ Payload: &zdsapi.WorkloadRequest_Add{ Add: &zdsapi.AddWorkload{ WorkloadInfo: podToWorkload(pod), Uid: uid, }, }, } log.Infof("About to send added pod: %s to ztunnel: %+v", uid, r) data, err := proto.Marshal(r) if err != nil { return err }
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 12.4K bytes - Viewed (0) -
istioctl/pkg/multicluster/cluster.go
// (see https://docs.google.com/document/d/1F__vEKeI41P7PPUCMM9PVPYY34pyrvQI5rbTJVnS5c4) func clusterUID(client kubernetes.Interface) (types.UID, error) { kubeSystem, err := client.CoreV1().Namespaces().Get(context.TODO(), "kube-system", metav1.GetOptions{}) if err != nil { return "", err } return kubeSystem.UID, nil
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Sep 02 03:11:58 GMT 2022 - 1.1K bytes - Viewed (0) -
cni/pkg/nodeagent/ztunnelserver_test.go
ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("name-%d", id), UID: types.UID(fmt.Sprintf("uid-%d", id)), }, Spec: v1.PodSpec{}, Status: v1.PodStatus{}, } return pod, newFakeNs(devNull.Fd()) } func connect(ctx context.Context) struct { ztunClient *net.UnixConn ztunServer *ztunnelServer uid string } { pods := &fakePodCache{} pod, ns := podAndNetns()
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 8.6K bytes - Viewed (0) -
cni/pkg/repair/repaircontroller.go
if uid, f := c.repairedPods[key]; f { if uid == pod.UID { log.Debugf("Skipping pod, already repaired") } else { // This is unexpected, bubble up to an error. Might be missing event, or invalid assumption in our code. // Either way, we will skip. log.Errorf("Skipping pod, already repaired with an unexpected UID %v vs %v", uid, pod.UID) } return nil }
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Sat Feb 10 00:31:55 GMT 2024 - 10.4K bytes - Viewed (0) -
cni/pkg/nodeagent/informers_test.go
NodeName = "testnode" ctx, cancel := context.WithCancel(context.Background()) defer cancel() pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", UID: "1234", }, Spec: corev1.PodSpec{ NodeName: NodeName, }, Status: corev1.PodStatus{ PodIP: "11.1.1.12", }, } ns := &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri May 03 19:29:42 GMT 2024 - 15.8K bytes - Viewed (0)