- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 38 for NewAttributesRecord (0.21 sec)
-
plugin/pkg/admission/podtolerationrestriction/admission_test.go
pod := test.pod pod.Spec.Tolerations = test.podTolerations err = admissiontesting.WithReinvocationTesting(t, handler).Admit(context.TODO(), admission.NewAttributesRecord(pod, nil, api.Kind("Pod").WithVersion("version"), "testNamespace", namespace.ObjectMeta.Name, api.Resource("pods").WithVersion("version"), "", admission.Create, &metav1.CreateOptions{}, false, nil), nil)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 16K bytes - Viewed (0) -
plugin/pkg/admission/storage/persistentvolume/resize/admission_test.go
fmt.Println("add storageclass error: ", err) } } for _, tc := range tests { operation := admission.Update operationOptions := &metav1.CreateOptions{} attributes := admission.NewAttributesRecord(tc.newObj, tc.oldObj, schema.GroupVersionKind{}, metav1.NamespaceDefault, "foo", tc.resource, tc.subresource, operation, operationOptions, false, nil) err := ctrl.Validate(context.TODO(), attributes, nil)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Aug 21 13:31:28 UTC 2023 - 7.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/audit_test.go
a.AddAnnotation(k, v) } return h.validate } func (h fakeHandler) Handles(o Operation) bool { return h.handles } func attributes() Attributes { return NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, "", "", schema.GroupVersionResource{}, "", "", nil, false, nil) } func TestWithAudit(t *testing.T) { var testCases = map[string]struct { admit error
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 5.8K bytes - Viewed (0) -
plugin/pkg/admission/network/defaultingressclass/admission_test.go
} if testCase.classAnnotation != nil { ingress.Annotations = map[string]string{networkingv1beta1.AnnotationIngressClass: *testCase.classAnnotation} } attrs := admission.NewAttributesRecord( ingress, // new object nil, // old object api.Kind("Ingress").WithVersion("version"), ingress.Namespace, ingress.Name, networkingv1.Resource("ingresses").WithVersion("version"),
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 04 13:12:32 UTC 2023 - 7.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testing/testcase.go
Webhooks: webhooks, }) client := fakeclientset.NewSimpleClientset(objs...) informerFactory := informers.NewSharedInformerFactory(client, 0) return client, informerFactory } func newAttributesRecord(object metav1.Object, oldObject metav1.Object, kind schema.GroupVersionKind, namespace string, name string, resource string, labels map[string]string, dryRun bool) admission.Attributes { object.SetName(name)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 03 06:51:04 UTC 2023 - 47.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/matchconditions/matcher_test.go
} return f.evaluations, 0, nil } func (f *fakeCelFilter) CompilationErrors() []error { return []error{} } func TestMatch(t *testing.T) { 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: Sat Jul 15 00:53:08 UTC 2023 - 8.6K bytes - Viewed (0) -
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) -
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) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go
err = mutatingAdmission.Admit(ctx, admission.NewAttributesRecord(opts, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, nil, false, userInfo), scope) if err != nil { scope.err(err, w, req) return } } if validatingAdmission, ok := admit.(admission.ValidationInterface); ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 08 21:44:00 UTC 2023 - 17K bytes - Viewed (0) -
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)