Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 50 for NewNotFound (0.13 sec)

  1. 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)
  2. 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)
  3. 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)
  4. staging/src/k8s.io/cli-runtime/pkg/resource/fallback_query_param_verifier_test.go

    			crds: []schema.GroupKind{},
    			gvk: schema.GroupVersionKind{
    				Group:   "batch",
    				Version: "v1",
    				Kind:    "Job",
    			},
    			queryParam:       QueryParamFieldValidation,
    			primaryError:     errors.NewNotFound(schema.GroupResource{}, "OpenAPI V3 endpoint not found"),
    			expectedSupports: true,
    		},
    		"Field validation query param is supported for batch/v1/Job, invalid v3 document error": {
    			crds: []schema.GroupKind{},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 10 18:30:16 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. pkg/kubelet/certificate/bootstrap/bootstrap_test.go

    			switch action.GetResource().Version {
    			case "v1":
    				return true, nil, fmt.Errorf("create error")
    			default:
    				return true, nil, apierrors.NewNotFound(certificatesv1.Resource("certificatesigningrequests"), "")
    			}
    		})
    	default:
    		f.PrependReactor("create", "certificatesigningrequests", func(action clienttesting.Action) (handled bool, ret runtime.Object, err error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 09 14:24:11 UTC 2023
    - 13K bytes
    - Viewed (0)
Back to top