Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 75 for pod (1.35 sec)

  1. 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 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  2. 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 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  3. cni/pkg/plugin/plugin_test.go

    	pod.Spec.Containers[0].Name = "mockContainer"
    	pod.Spec.Containers[1].Name = "istio-proxy"
    	pod.ObjectMeta.Annotations[injectAnnotationKey] = "false"
    
    	testDoAddRun(t, buildMockConf(true, ""), testNSName, pod, ns)
    }
    
    func TestCmdAddTwoContainersWithLabel(t *testing.T) {
    	pod, ns := buildFakePodAndNSForClient()
    	pod.Spec.Containers[0].Name = "mockContainer"
    	pod.Spec.Containers[1].Name = "istio-proxy"
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 17.5K bytes
    - Viewed (0)
  4. 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 non-annotation POD update event
    	_, err = client.Kube().CoreV1().Pods(pod.Namespace).Patch(ctx, pod.Name,
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Feb 08 01:03:24 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  5. 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 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  6. istioctl/pkg/checkinject/checkinject_test.go

    )
    
    func Test_analyzeRunningWebhooks(t *testing.T) {
    	cases := []struct {
    		name             string
    		pod              *corev1.Pod
    		ns               *corev1.Namespace
    		expectedMessages []webhookAnalysis
    	}{
    		{
    			name: "no inj because of no match labels",
    			pod:  podTestObject("test1", "test1", "", ""),
    			ns:   nsTestObject("test1", "", ""),
    			expectedMessages: []webhookAnalysis{
    				{
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  7. cni/pkg/nodeagent/cni-watcher_test.go

    	valid := CNIPluginAddEvent{
    		Netns:        "/var/netns/foo",
    		PodName:      "pod-bingo",
    		PodNamespace: "funkyns",
    		IPs: []IPConfig{{
    			Address: *addr,
    		}},
    	}
    
    	setupLogging()
    	NodeName = "testnode"
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    	pod := &corev1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      "pod-bingo",
    			Namespace: "funkyns",
    		},
    		Spec: corev1.PodSpec{
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Feb 02 08:18:40 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  8. istioctl/pkg/injector/injector-list_test.go

    )
    
    func Test_extractRevisionFromPod(t *testing.T) {
    	cases := []struct {
    		name             string
    		pod              *corev1.Pod
    		expectedRevision string
    	}{
    		{
    			name:             "no rev",
    			pod:              &corev1.Pod{},
    			expectedRevision: "",
    		},
    		{
    			name: "has rev annotation",
    			pod: &corev1.Pod{
    				ObjectMeta: metav1.ObjectMeta{
    					Annotations: map[string]string{
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Jan 04 03:08:06 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  9. istioctl/pkg/injector/injector-list.go

    		retval[revisionLabel] = counts
    	}
    	return retval
    }
    
    func extractRevisionFromPod(pod *corev1.Pod) string {
    	return describe.GetRevisionFromPodAnnotation(pod.GetAnnotations())
    }
    
    func injectionDisabled(pod *corev1.Pod) bool {
    	inject := pod.ObjectMeta.GetAnnotations()[annotation.SidecarInject.Name]
    	if lbl, labelPresent := pod.ObjectMeta.GetLabels()[label.SidecarInject.Name]; labelPresent {
    		inject = lbl
    	}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Jan 04 03:08:06 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  10. cni/pkg/nodeagent/ztunnelserver.go

    	PodDeleted(ctx context.Context, uid string) error
    	PodAdded(ctx context.Context, pod *v1.Pod, netns Netns) error
    	Close() error
    }
    
    /*
    To clean up stale ztunnels
    
    	we may need to ztunnel to send its (uid, bootid / boot time) to us
    	so that we can remove stale entries when the ztunnel pod is deleted
    	or when the ztunnel pod is restarted in the same pod (remove old entries when the same uid connects again, but with different boot id?)
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
Back to top