Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 55 for NewAttributesRecord (0.2 sec)

  1. staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission_test.go

    		t.Errorf("unexpected error initializing handler: %v", err)
    	}
    
    	stopCh := make(chan struct{})
    	defer close(stopCh)
    
    	informerFactory.Start(stopCh)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  2. plugin/pkg/admission/noderestriction/admission_test.go

    			podsGetter: noExistingPods,
    			attributes: admission.NewAttributesRecord(coremymirrorpod, nil, podKind, coremymirrorpod.Namespace, coremymirrorpod.Name, podResource, "", admission.Create, &metav1.CreateOptions{}, false, mynode),
    			err:        "",
    		},
    		{
    			name:       "forbid update of mirror pod bound to self",
    			podsGetter: existingPods,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 73.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/predicates/namespace/matcher_test.go

    			attr:           admission.NewAttributesRecord(&namespace2, nil, schema.GroupVersionKind{}, namespace1.Name, namespace1.Name, schema.GroupVersionResource{Resource: "namespaces"}, "", admission.Delete, &metav1.DeleteOptions{}, false, nil),
    			expectedLabels: namespace1Labels,
    		},
    		{
    			name:           "request is for namespace/finalizer",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 26 00:41:14 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/predicates/object/matcher_test.go

    			objectSelector: &metav1.LabelSelector{},
    			attrs:          admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, "", "name", schema.GroupVersionResource{}, "", admission.Create, &metav1.CreateOptions{}, false, nil),
    			expectCall:     true,
    		},
    		{
    			name:           "matches new object",
    			objectSelector: runLevel1Excluder,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 26 00:41:14 UTC 2022
    - 4.7K bytes
    - Viewed (0)
  5. plugin/pkg/admission/serviceaccount/admission_test.go

    		if handler.Handles(op) {
    			t.Errorf("Expected not to handle operation %s", op)
    		}
    	}
    }
    
    func TestIgnoresNonPodResource(t *testing.T) {
    	pod := &api.Pod{}
    	attrs := admission.NewAttributesRecord(pod, nil, api.Kind("Pod").WithVersion("version"), "myns", "myname", api.Resource("CustomResource").WithVersion("version"), "", admission.Create, &metav1.CreateOptions{}, false, nil)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 12 17:49:30 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook_test.go

    	}{
    		{
    			name:        "no rules (just write)",
    			webhook:     &v1.ValidatingWebhook{NamespaceSelector: &metav1.LabelSelector{}, Rules: []v1.RuleWithOperations{}},
    			attrs:       admission.NewAttributesRecord(nil, nil, gvk("apps", "v1", "Deployment"), "ns", "name", gvr("apps", "v1", "deployments"), "", admission.Create, &metav1.CreateOptions{}, false, nil),
    			expectCall:  false,
    			matchResult: true,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 28 19:30:04 UTC 2023
    - 32K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/matching/matching_test.go

    	}{
    		{
    			name:          "no rules (just write)",
    			criteria:      &v1.MatchResources{NamespaceSelector: &metav1.LabelSelector{}, ResourceRules: []v1.NamedRuleWithOperations{}},
    			attrs:         admission.NewAttributesRecord(nil, nil, gvk("apps", "v1", "Deployment"), "ns", "name", gvr("apps", "v1", "deployments"), "", admission.Create, &metav1.CreateOptions{}, false, nil),
    			expectMatches: false,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 38.2K bytes
    - Viewed (0)
  8. plugin/pkg/admission/namespace/autoprovision/admission_test.go

    	}
    	informerFactory.Start(wait.NeverStop)
    
    	pod := newPod(namespace)
    	err = admissiontesting.WithReinvocationTesting(t, handler).Admit(context.TODO(), admission.NewAttributesRecord(&pod, nil, api.Kind("Pod").WithVersion("version"), pod.Namespace, pod.Name, api.Resource("pods").WithVersion("version"), "", admission.Create, &metav1.CreateOptions{}, false, nil), nil)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/admission/plugin/resourcequota/admission_test.go

    		desc string
    		attr admission.Attributes
    	}{
    		{
    			"subresource",
    			admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, "namespace", "name", schema.GroupVersionResource{}, "subresource", admission.Create, nil, false, nil),
    		},
    		{
    			"non-namespaced resource",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 23 10:34:50 UTC 2022
    - 5.2K bytes
    - Viewed (0)
  10. plugin/pkg/admission/resourcequota/admission_test.go

    	err = handler.Validate(context.TODO(), admission.NewAttributesRecord(newPod, nil, api.Kind("Pod").WithVersion("version"), newPod.Namespace, newPod.Name, corev1.Resource("pods").WithVersion("version"), "", admission.Create, &metav1.CreateOptions{}, false, nil), nil)
    	if err == nil {
    		t.Errorf("Expected an error because the pod exceeded allowed quota")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 21:28:42 UTC 2024
    - 84.1K bytes
    - Viewed (0)
Back to top