Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 106 for admitPV (0.13 sec)

  1. 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)
  2. 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)
  3. 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)
  4. staging/src/k8s.io/apiserver/pkg/admission/testing/helpers.go

    	admission admission.MutationInterface
    }
    
    // Admit reinvokes the admission handler and reports a test error if the admission handler performs
    // non-idempotent mutatations to the admission object.
    func (r *reinvoker) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error {
    	r.t.Helper()
    	outputs := []runtime.Object{}
    	for i := 0; i < 2; i++ {
    		err := r.admission.Admit(ctx, a, o)
    		if err != nil {
    			return err
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/admission/metrics/metrics.go

    	extraLabels []string
    }
    
    // Admit performs a mutating admission control check and emit metrics.
    func (p pluginHandlerWithMetrics) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error {
    	mutatingHandler, ok := p.Interface.(admission.MutationInterface)
    	if !ok {
    		return nil
    	}
    
    	start := time.Now()
    	err := mutatingHandler.Admit(ctx, a, o)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 14 17:01:40 UTC 2023
    - 15.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/admission_test.go

    	}
    }
    
    type mockAdmissionController struct {
    	admit func(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error
    }
    
    func (c *mockAdmissionController) Handles(operation admission.Operation) bool {
    	return true
    }
    
    func (c *mockAdmissionController) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error {
    	return c.admit(ctx, a, o)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 12 21:32:54 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/update.go

    			scope.err(err, w, req)
    			return
    		}
    		span.AddEvent("Conversion done")
    
    		audit.LogRequestObject(req.Context(), obj, objGV, scope.Resource, scope.Subresource, scope.Serializer)
    		admit = admission.WithAudit(admit)
    
    		// if this object supports namespace info
    		if objectMeta, err := meta.Accessor(obj); err == nil {
    			// ensure namespace on the object is correct, or error if a conflicting namespace was set in the object
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 20:19:46 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete.go

    		// timeout inside the parent context is lower than requestTimeoutUpperBound.
    		ctx, cancel := context.WithTimeout(ctx, requestTimeoutUpperBound)
    		defer cancel()
    
    		ctx = request.WithNamespace(ctx, namespace)
    		admit = admission.WithAudit(admit)
    
    		outputMediaType, _, err := negotiation.NegotiateOutputMediaType(req, scope.Serializer, scope)
    		if err != nil {
    			scope.err(err, w, req)
    			return
    		}
    
    		options := &metav1.DeleteOptions{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 01 10:00:32 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin_test.go

    			}
    
    			b.ResetTimer()
    			b.RunParallel(func(pb *testing.PB) {
    				for pb.Next() {
    					wh.Admit(context.TODO(), attr, objectInterfaces)
    				}
    			})
    		})
    	}
    }
    
    // TestAdmit tests that MutatingWebhook#Admit works as expected
    func TestAdmit(t *testing.T) {
    	testServer := webhooktesting.NewTestServer(t)
    	testServer.StartTLS()
    	defer testServer.Close()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:52 UTC 2024
    - 11K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/create.go

    			obj = scope.FieldManager.UpdateNoErrors(liveObj, obj, managerOrUserAgent(options.FieldManager, req.UserAgent()))
    			admit = fieldmanager.NewManagedFieldsValidatingAdmissionController(admit)
    
    			if mutatingAdmission, ok := admit.(admission.MutationInterface); ok && mutatingAdmission.Handles(admission.Create) {
    				if err := mutatingAdmission.Admit(ctx, admissionAttributes, scope); err != nil {
    					return nil, err
    				}
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 20:19:46 UTC 2023
    - 10.1K bytes
    - Viewed (0)
Back to top