- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 45 for NewAttributesRecord (0.39 sec)
-
plugin/pkg/admission/priority/admission_test.go
if err := addPriorityClasses(ctrl, test.existingClasses); err != nil { t.Errorf("Test %q: unable to add object to informer: %v", test.name, err) } // Now add the new class. attrs := admission.NewAttributesRecord( test.newClass, nil, scheduling.Kind("PriorityClass").WithVersion("version"), "", "", scheduling.Resource("priorityclasses").WithVersion("version"), "", test.operation,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 03 18:43:48 UTC 2022 - 21.2K bytes - Viewed (0) -
plugin/pkg/admission/security/podsecurity/admission_test.go
"enforce-warn-audit-baseline", "warn-baseline-audit-restricted", } for _, namespace := range namespaces { b.Run(namespace+"_pod", func(b *testing.B) { ctx := context.Background() attrs := admission.NewAttributesRecord( corePod.DeepCopy(), nil, schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Pod"}, namespace, "mypod", schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"}, "",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 15 01:29:47 UTC 2022 - 10.7K bytes - Viewed (0) -
plugin/pkg/admission/namespace/exists/admission_test.go
if err != nil { t.Errorf("unexpected error initializing handler: %v", err) } informerFactory.Start(wait.NeverStop) pod := newPod(namespace) err = handler.Validate(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 - 4.4K bytes - Viewed (0) -
plugin/pkg/admission/runtimeclass/admission_test.go
expectError: false, expectedPod: nil, }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { attrs := admission.NewAttributesRecord(tc.pod, nil, core.Kind("Pod").WithVersion("version"), tc.pod.Namespace, tc.pod.Name, core.Resource("pods").WithVersion("version"), "", admission.Create, &metav1.CreateOptions{}, false, &user.DefaultInfo{})
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 17 01:30:14 UTC 2022 - 17.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/update.go
return newObj, mutatingAdmission.Admit(ctx, admission.NewAttributesRecord(newObj, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, updateToCreateOptions(options), dryrun.IsDryRun(options.DryRun), userInfo), scope) } } else { if mutatingAdmission.Handles(admission.Update) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 01 20:19:46 UTC 2023 - 11.5K bytes - Viewed (0) -
plugin/pkg/admission/limitranger/admission_test.go
if err != nil { t.Fatal(err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 51.5K bytes - Viewed (0) -
plugin/pkg/admission/imagepolicy/admission_test.go
if err != nil { t.Errorf("%s: failed to create client: %v", tt.test, err) return } pod := goodPod(strconv.Itoa(rand.Intn(1000))) attr := admission.NewAttributesRecord(pod, nil, api.Kind("Pod").WithVersion("version"), "namespace", "", api.Resource("pods").WithVersion("version"), "", admission.Create, &metav1.CreateOptions{}, false, &user.DefaultInfo{})
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 02 06:05:06 UTC 2023 - 32.9K bytes - Viewed (0) -
plugin/pkg/admission/podnodeselector/admission_test.go
handler.clusterNodeSelectors[namespace.Name] = test.whitelist pod.Spec = api.PodSpec{NodeSelector: test.podNodeSelector} err := 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 - 8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/metrics/metrics_test.go
) var ( kind = schema.GroupVersionKind{Group: "kgroup", Version: "kversion", Kind: "kind"} resource = schema.GroupVersionResource{Group: "rgroup", Version: "rversion", Resource: "resource"} attr = admission.NewAttributesRecord(nil, nil, kind, "ns", "name", resource, "subresource", admission.Create, &metav1.CreateOptions{}, false, nil) ) func TestObserveAdmissionStep(t *testing.T) { defer Metrics.reset() defer legacyregistry.Reset()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jul 14 17:01:37 UTC 2023 - 16.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/predicates/rules/rules_test.go
} type tests map[string]ruleTest func a(group, version, resource, subresource, name string, operation admission.Operation, operationOptions runtime.Object) admission.Attributes { return admission.NewAttributesRecord( nil, nil, schema.GroupVersionKind{Group: group, Version: version, Kind: "k" + resource}, "ns", name, schema.GroupVersionResource{Group: group, Version: version, Resource: resource}, subresource, operation,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 25 23:28:16 UTC 2022 - 13.8K bytes - Viewed (0)