Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for NewAttributesRecord (0.2 sec)

  1. 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)
  2. 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)
  3. 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)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/validator_test.go

    }
    
    func TestValidate(t *testing.T) {
    	ignore := v1.Ignore
    	fail := v1.Fail
    
    	forbiddenReason := metav1.StatusReasonForbidden
    	unauthorizedReason := metav1.StatusReasonUnauthorized
    
    	fakeAttr := admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, "default", "foo", schema.GroupVersionResource{}, "", admission.Create, nil, false, nil)
    	fakeVersionedAttr, _ := admission.NewVersionedAttributes(fakeAttr, schema.GroupVersionKind{}, nil)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go

    		staticCreateAttributes := admission.NewAttributesRecord(
    			nil,
    			nil,
    			scope.Kind,
    			namespace,
    			name,
    			scope.Resource,
    			scope.Subresource,
    			admission.Create,
    			patchToCreateOptions(options),
    			dryrun.IsDryRun(options.DryRun),
    			userInfo)
    		staticUpdateAttributes := admission.NewAttributesRecord(
    			nil,
    			nil,
    			scope.Kind,
    			namespace,
    			name,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/filter_test.go

    	return admission.NewAttributesRecord(object, oldObject, gvk, namespace, name, gvr, "", admission.Create, &metav1.CreateOptions{}, false, nil)
    }
    
    func endpointStatusUpdateAttributes() admission.Attributes {
    	attrs := endpointCreateAttributes()
    	return admission.NewAttributesRecord(
    		attrs.GetObject(), attrs.GetObject(), attrs.GetKind(), attrs.GetNamespace(), attrs.GetName(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 40.4K bytes
    - Viewed (0)
  7. plugin/pkg/admission/gc/gc_admission_test.go

    			if tc.oldObj != nil {
    				operation = apiserveradmission.Update
    				options = &metav1.UpdateOptions{}
    			}
    			user := &user.DefaultInfo{Name: tc.username}
    			attributes := apiserveradmission.NewAttributesRecord(tc.newObj, tc.oldObj, schema.GroupVersionKind{}, metav1.NamespaceDefault, "foo", tc.resource, tc.subresource, operation, options, false, user)
    
    			err = gcAdmit.Validate(context.TODO(), attributes, nil)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 21:28:42 UTC 2024
    - 24.5K bytes
    - Viewed (0)
Back to top