Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for PodRedirectionEnabled (0.22 sec)

  1. cni/pkg/util/podutil_test.go

    			},
    			want: false,
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			if got := PodRedirectionEnabled(tt.args.namespace, tt.args.pod); got != tt.want {
    				t.Errorf("PodRedirectionEnabled() = %v, want %v", got, tt.want)
    			}
    		})
    	}
    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)
  2. cni/pkg/util/podutil.go

    ))
    
    var annotationRemovePatch = []byte(fmt.Sprintf(
    	`{"metadata":{"annotations":{"%s":null}}}`,
    	constants.AmbientRedirection,
    ))
    
    // PodRedirectionEnabled determines if a pod should or should not be configured
    // to have traffic redirected thru the node proxy.
    func PodRedirectionEnabled(namespace *corev1.Namespace, pod *corev1.Pod) bool {
    	if !(namespace.GetLabels()[constants.DataplaneModeLabel] == constants.DataplaneModeAmbient ||
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri May 03 19:29:42 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/informers.go

    	ns := s.namespaces.Get(podNamespace, "")
    	if ns == nil {
    		return nil, fmt.Errorf("failed to find namespace %v", ns)
    	}
    	pod := s.pods.Get(podName, podNamespace)
    	if util.PodRedirectionEnabled(ns, pod) {
    		return pod, nil
    	}
    	return nil, nil
    }
    
    func (s *InformerHandlers) Start() {
    	kube.WaitForCacheSync("informer", s.ctx.Done(), s.pods.HasSynced, s.namespaces.HasSynced)
    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)
  4. cni/pkg/plugin/plugin.go

    	if err != nil {
    		return false, err
    	}
    	ns, err := client.CoreV1().Namespaces().Get(context.Background(), podNamespace, metav1.GetOptions{})
    	if err != nil {
    		return false, err
    	}
    
    	return util.PodRedirectionEnabled(ns, pod), nil
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed May 08 15:58:51 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top