- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for NewNotFound (0.33 sec)
-
staging/src/k8s.io/apiserver/pkg/admission/errors.go
} return apierrors.NewForbidden(resource, name, internalError) } // NewNotFound is a utility function to return a well-formatted admission control error response func NewNotFound(a Attributes) error { name, resource, err := extractResourceName(a) if err != nil { return apierrors.NewInternalError(err) } return apierrors.NewNotFound(resource, name)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 26 19:40:51 UTC 2017 - 2.3K bytes - Viewed (0) -
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/client/conditions/conditions.go
// returns ErrPodCompleted if the pod has run to completion, or an error in any other case. func PodRunning(event watch.Event) (bool, error) { switch event.Type { case watch.Deleted: return false, errors.NewNotFound(schema.GroupResource{Resource: "pods"}, "") } switch t := event.Object.(type) { case *v1.Pod: switch t.Status.Phase { case v1.PodRunning: return true, nil case v1.PodFailed, v1.PodSucceeded:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jan 16 13:43:36 UTC 2023 - 2K bytes - Viewed (0) -
pkg/controller/certificates/rootcacertpublisher/metrics_test.go
# TYPE root_ca_cert_publisher_sync_total counter root_ca_cert_publisher_sync_total{code="200"} 1 `, }, { desc: "kube api error", err: apierrors.NewNotFound(corev1.Resource("configmap"), "test-configmap"), metrics: []string{ "root_ca_cert_publisher_sync_total", }, want: `
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Sep 16 12:05:32 UTC 2021 - 2.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/status_test.go
} if !reflect.DeepEqual(actual, expected) { t.Errorf("%s: Expected %#v, Got %#v", actual, expected, actual) } } func TestAPIStatus(t *testing.T) { cases := map[error]metav1.Status{ errors.NewNotFound(schema.GroupResource{Group: "legacy.kubernetes.io", Resource: "foos"}, "bar"): { Status: metav1.StatusFailure, Code: http.StatusNotFound, Reason: metav1.StatusReasonNotFound,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Jan 05 13:03:34 UTC 2019 - 2.4K 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/registry/registrytest/endpoint.go
if e.Err != nil { return nil, e.Err } if e.Endpoints != nil { for _, endpoint := range e.Endpoints.Items { if endpoint.Name == name { return &endpoint, nil } } } return nil, errors.NewNotFound(api.Resource("endpoints"), name) } func (e *EndpointRegistry) Watch(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return nil, fmt.Errorf("unimplemented!") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 17 16:50:16 UTC 2019 - 4K bytes - Viewed (0) -
pkg/controller/cronjob/injection.go
func (c *fakeCJControl) GetCronJob(ctx context.Context, namespace, name string) (*batchv1.CronJob, error) { if name == c.CronJob.Name && namespace == c.CronJob.Namespace { return c.CronJob, nil } return nil, errors.NewNotFound(schema.GroupResource{ Group: "v1beta1", Resource: "cronjobs", }, name) } var _ cjControlInterface = &fakeCJControl{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 22 09:37:31 UTC 2023 - 4.7K 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/admission/plugin/webhook/predicates/namespace/matcher_test.go
return nil, nil } func (f fakeNamespaceLister) Get(name string) (*corev1.Namespace, error) { ns, ok := f.namespaces[name] if ok { return ns, nil } return nil, errors.NewNotFound(corev1.Resource("namespaces"), name) } func TestGetNamespaceLabels(t *testing.T) { namespace1Labels := map[string]string{ "runlevel": "1", } namespace1 := corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 26 00:41:14 UTC 2022 - 4.8K bytes - Viewed (0)