- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 284 for pod (3.05 sec)
-
cni/pkg/nodeagent/pod_cache.go
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 }
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/pod_cache_test.go
func TestDoubleTake(t *testing.T) { p := newPodNetnsCache(openNsTestOverride) pod := &corev1.Pod{ObjectMeta: metav1.ObjectMeta{UID: "testUID"}} ns := newFakeNs(inc()) wl := WorkloadInfo{ Workload: podToWorkload(pod), Netns: ns, } netns1 := p.UpsertPodCacheWithNetns(string(pod.UID), wl) netnsTaken := p.Take(string(pod.UID)) if netns1 != netnsTaken {
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/plugin/plugin_test.go
} func TestCmdAddTwoContainersWithLabel(t *testing.T) { pod, ns := buildFakePodAndNSForClient() pod.Spec.Containers[0].Name = "mockContainer" pod.Spec.Containers[1].Name = "istio-proxy" pod.ObjectMeta.Annotations[label.SidecarInject.Name] = "false" testDoAddRun(t, buildMockConf(true, ""), testNSName, pod, ns) } func TestCmdAddTwoContainers(t *testing.T) {
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Wed May 08 15:58:51 GMT 2024 - 17.5K bytes - Viewed (0) -
cni/pkg/repair/repaircontroller.go
func (c *Controller) repairPod(pod *corev1.Pod) error { m := podsRepaired.With(typeLabel.Value(repairType)) log := repairLog.WithLabels("pod", pod.Namespace+"/"+pod.Name) key := types.NamespacedName{Name: pod.Name, Namespace: pod.Namespace} // We will get an event every time the pod changes. The repair is not instantaneous, though -- it will only recover // once the pod restarts (in CrashLoopBackoff), which can take some time.
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
mt.Assert(EventTotals.Name(), map[string]string{"type": "update"}, monitortest.AtLeast(4)) waitForMockCalls() assertPodNotAnnotated(t, client, pod) // patch a test label to emulate a POD update event _, err = client.Kube().CoreV1().Pods(pod.Namespace).Patch(ctx, pod.Name, types.MergePatchType, []byte(`{"metadata":{"labels":{"test":"update"}}}`), metav1.PatchOptions{})
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) -
cni/pkg/nodeagent/net.go
log := log.WithLabels("ns", pod.Namespace, "name", pod.Name) log.Debug("Pod is now stopped... cleaning up.") if err := removePodFromHostNSIpset(pod, &s.hostsideProbeIPSet); err != nil { log.Errorf("failed to remove pod %s from host ipset, error was: %v", pod.Name, err) return err } log.Info("in pod mode - deleting pod from ztunnel")
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/informers.go
func (s *InformerHandlers) GetAmbientPods() []*corev1.Pod { var pods []*corev1.Pod for _, pod := range s.pods.List(metav1.NamespaceAll, klabels.Everything()) { ns := s.namespaces.Get(pod.Namespace, "") if ns == nil { log.Warnf("failed to find namespace %s for pod %s", pod.Namespace, pod.Name) } if !util.IsZtunnelPod(s.systemNamespace, pod) && util.PodRedirectionEnabled(ns, pod) { pods = append(pods, pod) } }
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri May 03 19:29:42 GMT 2024 - 9.6K bytes - Viewed (0) -
cni/pkg/util/podutil_test.go
pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, Spec: corev1.PodSpec{ NodeName: "derp", }, Status: corev1.PodStatus{ PodIP: "2.2.2.2", PodIPs: []corev1.PodIP{{IP: "2.2.2.2"}, {IP: "3.3.3.3"}}, }, } podIPs := GetPodIPsIfPresent(pod) assert.Equal(t, len(podIPs), 2) } func TestGetPodIPsIfNoPodIPPresent(t *testing.T) { pod := &corev1.Pod{
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri May 03 19:29:42 GMT 2024 - 4.9K bytes - Viewed (0) -
cni/pkg/nodeagent/server_test.go
func (f *fakeServer) AddPodToMesh(ctx context.Context, pod *corev1.Pod, podIPs []netip.Addr, netNs string) error { if f.testWG != nil { defer f.testWG.Done() } args := f.Called(ctx, pod, podIPs, netNs) return args.Error(0) } func (f *fakeServer) RemovePodFromMesh(ctx context.Context, pod *corev1.Pod) error { if f.testWG != nil { defer f.testWG.Done() } args := f.Called(ctx, pod) return args.Error(0) }
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
} pod := &corev1.Pod{ObjectMeta: podMeta} fixture.ipsetDeps.On("listEntriesByIP", "foo-v4", ).Return([]netip.Addr{}, nil) err := netServer.ConstructInitialSnapshot([]*corev1.Pod{pod}) assert.NoError(t, err) if fixture.podNsMap.Get("863b91d4-4b68-4efa-917f-4b560e3e86aa") == nil { t.Fatal("expected pod to be in cache") } }
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)