Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for NewInvalid (0.16 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/delete.go

    					err = errors.NewBadRequest(err.Error())
    					scope.err(err, w, req)
    					return
    				}
    			}
    		}
    		if errs := validation.ValidateDeleteOptions(options); len(errs) > 0 {
    			err := errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "DeleteOptions"}, "", errs)
    			scope.err(err, w, req)
    			return
    		}
    		options.TypeMeta.SetGroupVersionKind(metav1.SchemeGroupVersion.WithKind("DeleteOptions"))
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 01 10:00:32 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  2. pkg/registry/core/serviceaccount/storage/token.go

    		return nil, errors.NewInvalid(gvk.GroupKind(), name, errs)
    	}
    	if len(req.Namespace) > 0 && req.Namespace != namespace {
    		errs := field.ErrorList{field.Invalid(field.NewPath("metadata").Child("namespace"), req.Namespace, "must match the service account namespace if specified")}
    		return nil, errors.NewInvalid(gvk.GroupKind(), name, errs)
    	}
    
    	// Lookup service account
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 05 10:24:31 UTC 2024
    - 10K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go

    			err = errors.NewBadRequest(err.Error())
    			scope.err(err, w, req)
    			return
    		}
    		if errs := validation.ValidatePatchOptions(options, patchType); len(errs) > 0 {
    			err := errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "PatchOptions"}, "", errs)
    			scope.err(err, w, req)
    			return
    		}
    		options.TypeMeta.SetGroupVersionKind(metav1.SchemeGroupVersion.WithKind("PatchOptions"))
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  4. pkg/registry/core/service/storage/alloc.go

    	// TODO(thockin): when we tighten validation (e.g. to require IPs) we will
    	// need a "strict" and a "loose" form of this.
    	if el := validation.ValidateServiceClusterIPsRelatedFields(service); len(el) != 0 {
    		return errors.NewInvalid(api.Kind("Service"), service.Name, el)
    	}
    
    	//TODO(thockin): Move this logic to validation?
    	el := make(field.ErrorList, 0)
    
    	// Update-only prep work.
    	if oldService != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:05 UTC 2023
    - 37.3K bytes
    - Viewed (0)
  5. pkg/registry/apps/deployment/storage/storage.go

    	if !ok {
    		return nil, errors.NewBadRequest(fmt.Sprintf("not a DeploymentRollback: %#v", obj))
    	}
    
    	if errs := appsvalidation.ValidateDeploymentRollback(rollback); len(errs) != 0 {
    		return nil, errors.NewInvalid(apps.Kind("DeploymentRollback"), rollback.Name, errs)
    	}
    	if name != rollback.Name {
    		return nil, errors.NewBadRequest("name in URL does not match name in DeploymentRollback object")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 16.8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/api/errors/errors_test.go

    		t.Errorf("expected to be %s", metav1.StatusReasonAlreadyExists)
    	}
    	if !IsNotFound(NewNotFound(resource("tests"), "3")) {
    		t.Errorf("expected to be %s", metav1.StatusReasonNotFound)
    	}
    	if !IsInvalid(NewInvalid(kind("Test"), "2", nil)) {
    		t.Errorf("expected to be %s", metav1.StatusReasonInvalid)
    	}
    	if !IsBadRequest(NewBadRequest("reason")) {
    		t.Errorf("expected to be %s", metav1.StatusReasonBadRequest)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 28 07:31:28 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  7. pkg/controlplane/controller/clusterauthenticationtrust/cluster_authentication_trust_controller_test.go

    		client := fake.NewSimpleClientset()
    		client.PrependReactor("update", "configmaps", func(action clienttesting.Action) (handled bool, ret runtime.Object, err error) {
    			return true, nil, apierrors.NewInvalid(schema.GroupKind{Kind: "ConfigMap"}, cm.Name, field.ErrorList{field.TooLong(field.NewPath(""), cm, corev1.MaxSecretSize)})
    		})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 14 00:05:53 UTC 2023
    - 14.6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/update.go

    			err = errors.NewBadRequest(err.Error())
    			scope.err(err, w, req)
    			return
    		}
    		if errs := validation.ValidateUpdateOptions(options); len(errs) > 0 {
    			err := errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "UpdateOptions"}, "", errs)
    			scope.err(err, w, req)
    			return
    		}
    		options.TypeMeta.SetGroupVersionKind(metav1.SchemeGroupVersion.WithKind("UpdateOptions"))
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 20:19:46 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/get.go

    		if errs := metainternalversionvalidation.ValidateListOptions(&opts, utilfeature.DefaultFeatureGate.Enabled(features.WatchList)); len(errs) > 0 {
    			err := errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "ListOptions"}, "", errs)
    			scope.err(err, w, req)
    			return
    		}
    
    		// transform fields
    		// TODO: DecodeParametersInto should do this.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Feb 16 10:22:16 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/create.go

    			err = errors.NewBadRequest(err.Error())
    			scope.err(err, w, req)
    			return
    		}
    		if errs := validation.ValidateCreateOptions(options); len(errs) > 0 {
    			err := errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "CreateOptions"}, "", errs)
    			scope.err(err, w, req)
    			return
    		}
    		options.TypeMeta.SetGroupVersionKind(metav1.SchemeGroupVersion.WithKind("CreateOptions"))
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 20:19:46 UTC 2023
    - 10.1K bytes
    - Viewed (0)
Back to top