Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 88 for admitPV (0.13 sec)

  1. plugin/pkg/admission/podnodeselector/admission_test.go

    		ignoreTestNamespaceNodeSelector bool
    		admit                           bool
    		testName                        string
    	}{
    		{
    			defaultNodeSelector:             "",
    			podNodeSelector:                 map[string]string{},
    			mergedNodeSelector:              labels.Set{},
    			ignoreTestNamespaceNodeSelector: true,
    			admit:                           true,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/audit_test.go

    	"github.com/stretchr/testify/assert"
    	"github.com/stretchr/testify/require"
    )
    
    // fakeHandler implements Interface
    type fakeHandler struct {
    	// return value of Admit()
    	admit error
    	// annotations add to attributesRecord during Admit() phase
    	admitAnnotations map[string]string
    	// return value of Validate()
    	validate error
    	// annotations add to attributesRecord during Validate() phase
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  3. pkg/kubelet/cm/topologymanager/scope_container.go

    		},
    	}
    }
    
    func (s *containerScope) Admit(pod *v1.Pod) lifecycle.PodAdmitResult {
    	for _, container := range append(pod.Spec.InitContainers, pod.Spec.Containers...) {
    		bestHint, admit := s.calculateAffinity(pod, &container)
    		klog.InfoS("Best TopologyHint", "bestHint", bestHint, "pod", klog.KObj(pod), "containerName", container.Name)
    
    		if !admit {
    			metrics.TopologyManagerAdmissionErrorsTotal.Inc()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 14 14:44:24 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  4. plugin/pkg/admission/admit/admission.go

    	})
    }
    
    // alwaysAdmit is an implementation of admission.Interface which always says yes to an admit request.
    type alwaysAdmit struct{}
    
    var _ admission.MutationInterface = alwaysAdmit{}
    var _ admission.ValidationInterface = alwaysAdmit{}
    
    // Admit makes an admission decision based on the request attributes
    func (alwaysAdmit) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) (err error) {
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 16 11:54:27 UTC 2020
    - 2.1K bytes
    - Viewed (0)
  5. pkg/kubelet/nodeshutdown/nodeshutdown_manager.go

    }
    
    // managerStub is a fake node shutdown managerImpl .
    type managerStub struct{}
    
    // Admit returns a fake Pod admission which always returns true
    func (managerStub) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAdmitResult {
    	return lifecycle.PodAdmitResult{Admit: true}
    }
    
    // Start is a no-op always returning nil for non linux platforms.
    func (managerStub) Start() error {
    	return nil
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 24 09:20:34 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  6. pkg/kubelet/cm/topologymanager/scope_pod.go

    			policy:           policy,
    			podMap:           containermap.NewContainerMap(),
    		},
    	}
    }
    
    func (s *podScope) Admit(pod *v1.Pod) lifecycle.PodAdmitResult {
    	bestHint, admit := s.calculateAffinity(pod)
    	klog.InfoS("Best TopologyHint", "bestHint", bestHint, "pod", klog.KObj(pod))
    	if !admit {
    		metrics.TopologyManagerAdmissionErrorsTotal.Inc()
    		return admission.GetPodAdmitResult(&TopologyAffinityError{})
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 14 14:44:24 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/admission/reinvocation.go

    func (r *reinvoker) Admit(ctx context.Context, a Attributes, o ObjectInterfaces) error {
    	if mutator, ok := r.admissionChain.(MutationInterface); ok {
    		err := mutator.Admit(ctx, a, o)
    		if err != nil {
    			return err
    		}
    		s := a.GetReinvocationContext()
    		if s.ShouldReinvoke() {
    			s.SetIsReinvoke()
    			// Calling admit a second time will reinvoke all in-tree plugins
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 20 15:11:00 UTC 2019
    - 2.3K bytes
    - Viewed (0)
  8. pkg/kubelet/sysctl/allowlist.go

    }
    
    // Admit checks that all sysctls given in pod's security context
    // are valid according to the allowlist.
    func (w *patternAllowlist) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAdmitResult {
    	pod := attrs.Pod
    	if pod.Spec.SecurityContext == nil || len(pod.Spec.SecurityContext.Sysctls) == 0 {
    		return lifecycle.PodAdmitResult{
    			Admit: true,
    		}
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 27 22:58:54 UTC 2023
    - 4K bytes
    - Viewed (0)
  9. pkg/kubelet/cm/admission/errors_test.go

    			},
    			true,
    		},
    	}
    
    	for _, tc := range testCases {
    		h := GetPodAdmitResult(tc.Error)
    		if tc.Error == nil {
    			if !h.Admit {
    				t.Errorf("expected PodAdmitResult.Admit = true")
    			}
    			continue
    		}
    
    		if h.Admit {
    			t.Errorf("expected PodAdmitResult.Admit = false")
    		}
    
    		if tc.expectedAdmissionError {
    			err, ok := tc.Error.(*TestAdmissionError)
    			if !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 08 21:15:37 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  10. pkg/kubelet/sysctl/allowlist_test.go

    		status := w.Admit(attrs)
    		if status.Admit {
    			t.Errorf("expected to be rejected: %+v", test)
    		}
    	}
    
    	// test for: len(pod.Spec.SecurityContext.Sysctls) == 0
    	pod.Spec.SecurityContext.Sysctls = []v1.Sysctl{}
    	status := w.Admit(attrs)
    	if !status.Admit {
    		t.Errorf("expected to be allowlisted,got %+v", status)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 27 22:58:54 UTC 2023
    - 3.6K bytes
    - Viewed (0)
Back to top