- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for NewAttributesRecord (0.25 sec)
-
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) -
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) -
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) -
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) -
plugin/pkg/admission/alwayspullimages/admission_test.go
{Name: "ctr3", Image: "image", ImagePullPolicy: api.PullIfNotPresent}, {Name: "ctr4", Image: "image", ImagePullPolicy: api.PullAlways}, }, }, } err := 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: Mon Nov 30 22:59:57 UTC 2020 - 8.5K 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) -
staging/src/k8s.io/apiserver/pkg/admission/chain_test.go
accept: false, }, } for _, test := range tests { t.Logf("testcase = %s", test.name) // call admit and check that validate was not called at all err := test.chain.Admit(context.TODO(), NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, test.ns, "", schema.GroupVersionResource{}, "", test.operation, test.options, false, nil), nil) accepted := (err == nil) if accepted != test.accept {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 20 15:11:00 UTC 2019 - 5.4K bytes - Viewed (0) -
plugin/pkg/admission/deny/admission_test.go
api "k8s.io/kubernetes/pkg/apis/core" ) func TestAdmission(t *testing.T) { handler := admissiontesting.WithReinvocationTesting(t, NewAlwaysDeny().(*alwaysDeny)) err := handler.Admit(context.TODO(), admission.NewAttributesRecord(nil, nil, api.Kind("kind").WithVersion("version"), "namespace", "name", api.Resource("resource").WithVersion("version"), "subresource", admission.Create, &metav1.CreateOptions{}, false, nil), nil) if err == nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 20 15:11:00 UTC 2019 - 1.5K bytes - Viewed (0) -
plugin/pkg/admission/antiaffinity/admission_test.go
}, }, }, }, errorExpected: true, }, } for _, test := range tests { pod.Spec.Affinity = test.affinity err := handler.Validate(context.TODO(), admission.NewAttributesRecord(&pod, nil, api.Kind("Pod").WithVersion("version"), "foo", "name", api.Resource("pods").WithVersion("version"), "", "ignored", nil, false, nil), nil) if test.errorExpected && err == nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 20 15:11:00 UTC 2019 - 7.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/errors_test.go
) // makes sure that we never get: // Internal error occurred: [some error, object does not implement the Object interfaces] func TestNewForbidden(t *testing.T) { attributes := NewAttributesRecord( &fakeObj{}, nil, schema.GroupVersionKind{Group: "foo", Version: "bar", Kind: "Baz"}, "", "", schema.GroupVersionResource{Group: "foo", Version: "bar", Resource: "baz"}, "", Create,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 14 17:49:43 UTC 2019 - 1.7K bytes - Viewed (0)