- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for NewNotFound (0.36 sec)
-
staging/src/k8s.io/apiserver/pkg/storage/errors/storage.go
// operation into the appropriate API error. func InterpretListError(err error, qualifiedResource schema.GroupResource) error { switch { case storage.IsNotFound(err): return errors.NewNotFound(qualifiedResource, "") case storage.IsUnreachable(err), storage.IsRequestTimeout(err): return errors.NewServerTimeout(qualifiedResource, "list", 2) // TODO: make configurable or handled at a higher level
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 08 15:39:10 UTC 2023 - 4.2K bytes - Viewed (0) -
pkg/controlplane/reconcilers/endpointsadapter_test.go
}, "endpointslice exists, endpoints does not": { expectedError: errors.NewNotFound(schema.GroupResource{Group: "", Resource: "endpoints"}, "foo"), expectedEndpoints: noEndpoints, initialState: []runtime.Object{epSlice1}, namespaceParam: "testing", nameParam: "foo", }, "wrong-namespace": { expectedError: errors.NewNotFound(schema.GroupResource{Group: "", Resource: "endpoints"}, "foo"),
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 18 12:23:16 UTC 2024 - 15.4K bytes - Viewed (0) -
security/pkg/k8s/configutil_test.go
} } func createConfigMapDisabledClient(client *fake.Clientset) { client.PrependReactor("get", "configmaps", func(action ktesting.Action) (bool, runtime.Object, error) { return true, &v1.ConfigMap{}, errors.NewNotFound(v1.Resource("configmaps"), configMapName) }) client.PrependReactor("create", "configmaps", func(action ktesting.Action) (bool, runtime.Object, error) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Feb 08 21:58:25 UTC 2024 - 13K bytes - Viewed (0) -
pkg/scheduler/testing/framework/fake_listers.go
for _, pvc := range f.pvcs { if pvc.Name == name && pvc.Namespace == f.namespace { return pvc, nil } } return nil, errors.NewNotFound(v1.Resource("persistentvolumeclaims"), name) } func (f persistentVolumeClaimNamespaceLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { return nil, fmt.Errorf("not implemented") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 20 10:14:08 UTC 2023 - 10.1K bytes - Viewed (0) -
pkg/registry/registrytest/node.go
r.Lock() defer r.Unlock() if r.Err != nil { return nil, r.Err } for _, node := range r.Nodes.Items { if node.Name == nodeID { return &node, nil } } return nil, errors.NewNotFound(api.Resource("nodes"), nodeID) } func (r *NodeRegistry) DeleteNode(ctx context.Context, nodeID string) error { r.Lock() defer r.Unlock() var newList []api.Node for _, node := range r.Nodes.Items {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 23:13:50 UTC 2024 - 2.8K bytes - Viewed (0) -
pkg/serviceaccount/claims_test.go
if f.serviceAccount == nil { return nil, apierrors.NewNotFound(schema.GroupResource{Group: "", Resource: "serviceaccounts"}, name) } return f.serviceAccount, nil } func (f fakeGetter) GetPod(namespace, name string) (*v1.Pod, error) { if f.pod == nil { return nil, apierrors.NewNotFound(schema.GroupResource{Group: "", Resource: "pods"}, name) } return f.pod, nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 17.9K bytes - Viewed (0) -
pkg/controller/serviceaccount/tokengetter.go
} func (c clientGetter) GetNode(name string) (*v1.Node, error) { // handle the case where the node lister isn't set due to feature being disabled if c.nodeLister == nil { return nil, apierrors.NewNotFound(v1.Resource("nodes"), name) } if node, err := c.nodeLister.Get(name); err == nil { return node, nil } return c.client.CoreV1().Nodes().Get(context.TODO(), name, metav1.GetOptions{})
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 30 21:15:10 UTC 2023 - 3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go
wantBody: []byte(": bad"), }, { name: "fail to encode object or status with status code", out: smallPayload, outErrs: []error{kerrors.NewNotFound(schema.GroupResource{}, "test"), fmt.Errorf("bad2")}, mediaType: "application/json", req: &http.Request{Header: http.Header{}, URL: &url.URL{Path: "/path"}}, statusCode: http.StatusOK,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 15.7K bytes - Viewed (0) -
pkg/registry/core/rest/storage_core_generic.go
} type notFoundGetter struct { gr schema.GroupResource } func (g notFoundGetter) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { return nil, errors.NewNotFound(g.gr, name)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 30 21:15:10 UTC 2023 - 6K bytes - Viewed (0) -
cmd/kubeadm/app/util/apiclient/idempotency_test.go
setupClient: func(client *clientsetfake.Clientset) { client.PrependReactor("get", "configmaps", func(clientgotesting.Action) (bool, runtime.Object, error) { return true, nil, apierrors.NewNotFound(schema.GroupResource{}, "name") }) client.PrependReactor("create", "configmaps", func(clientgotesting.Action) (bool, runtime.Object, error) { return true, nil, nil }) },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Feb 18 11:14:32 UTC 2024 - 33.2K bytes - Viewed (0)