- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 53 for NewBadRequest (0.43 sec)
-
plugin/pkg/admission/alwayspullimages/admission.go
// Ignore all calls to subresources or resources other than pods. if shouldIgnore(attributes) { return nil } pod, ok := attributes.GetObject().(*api.Pod) if !ok { return apierrors.NewBadRequest("Resource was marked with kind Pod but was unable to be converted") } pods.VisitContainersWithPath(&pod.Spec, field.NewPath("spec"), func(c *api.Container, _ *field.Path) bool { c.ImagePullPolicy = api.PullAlways
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 30 22:59:57 UTC 2020 - 5.2K bytes - Viewed (0) -
pkg/registry/core/replicationcontroller/storage/storage.go
if err != nil { return nil, err } if newScaleObj == nil { return nil, errors.NewBadRequest("nil update passed to Scale") } scale, ok := newScaleObj.(*autoscaling.Scale) if !ok { return nil, errors.NewBadRequest(fmt.Sprintf("expected input object type to be Scale, but %T", newScaleObj)) } // validate
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 08 21:44:00 UTC 2023 - 12K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/errors/statuserror.go
func NewDryRunUnsupportedErr(webhookName string) *apierrors.StatusError { reason := fmt.Sprintf("admission webhook %q does not support dry run", webhookName) return apierrors.NewBadRequest(reason)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 13:12:07 UTC 2019 - 2K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/structuredmerge.go
// Check that the patch object has the same version as the live object if patchVersion := patchObj.GetObjectKind().GroupVersionKind().GroupVersion(); patchVersion != f.groupVersion { return nil, nil, errors.NewBadRequest( fmt.Sprintf("Incorrect version specified in apply patch. "+ "Specified patch version: %s, expected: %s", patchVersion, f.groupVersion)) } patchObjMeta, err := meta.Accessor(patchObj)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 30 22:55:50 UTC 2023 - 7.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/generic/rest/response_checker.go
switch { case resp.StatusCode == http.StatusInternalServerError: return errors.NewInternalError(fmt.Errorf("%s", bodyText)) case resp.StatusCode == http.StatusBadRequest: return errors.NewBadRequest(bodyText) case resp.StatusCode == http.StatusNotFound: return errors.NewGenericServerResponse(resp.StatusCode, "", checker.QualifiedResource, checker.Name, bodyText, 0, false) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Feb 03 06:33:43 UTC 2017 - 2.3K bytes - Viewed (0) -
pkg/registry/core/pod/strategy.go
return true }) errStr := fmt.Sprintf("a container name must be specified for pod %s, choose one of: %s", pod.Name, containerNames) return "", errors.NewBadRequest(errStr) } } else { if !podHasContainerWithName(pod, container) { return "", errors.NewBadRequest(fmt.Sprintf("container %s is not valid for pod %s", container, pod.Name)) } } return container, nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 17:51:48 UTC 2024 - 29.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/generic/rest/response_checker_test.go
}, { resp: &http.Response{ Body: ioutil.NopCloser(bytes.NewBufferString("Invalid request.")), StatusCode: http.StatusBadRequest, }, expectError: true, expected: errors.NewBadRequest("Invalid request."), name: "bad request", }, { resp: &http.Response{ Body: ioutil.NopCloser(bytes.NewBufferString("Pod does not exist.")), StatusCode: http.StatusInternalServerError,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 31 19:04:33 UTC 2018 - 2.6K bytes - Viewed (0) -
pkg/registry/core/pod/storage/storage.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Mar 20 14:29:25 UTC 2023 - 13.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go
} // Make the webhook request client, err := invocation.Webhook.GetRESTClient(a.cm) if err != nil { return false, &webhookutil.ErrCallingWebhook{WebhookName: h.Name, Reason: fmt.Errorf("could not get REST client: %w", err), Status: apierrors.NewBadRequest("error getting REST client")} }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 08:48:22 UTC 2024 - 19.6K bytes - Viewed (0) -
plugin/pkg/admission/antiaffinity/admission.go
if len(attributes.GetSubresource()) != 0 || attributes.GetResource().GroupResource() != api.Resource("pods") { return nil } pod, ok := attributes.GetObject().(*api.Pod) if !ok { return apierrors.NewBadRequest("Resource was marked with kind Pod but was unable to be converted") } affinity := pod.Spec.Affinity if affinity != nil && affinity.PodAntiAffinity != nil { var podAntiAffinityTerms []api.PodAffinityTerm
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 20 15:11:00 UTC 2019 - 3.1K bytes - Viewed (0)