- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 22 for NewBadRequest (0.24 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) -
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) -
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) -
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) -
pkg/registry/core/node/strategy.go
if !valid { return nil, nil, errors.NewBadRequest(fmt.Sprintf("invalid node request %q", id)) } info, err := connection.GetConnectionInfo(ctx, types.NodeName(name)) if err != nil { return nil, nil, err } if err := isProxyableHostname(ctx, info.Hostname); err != nil { return nil, nil, errors.NewBadRequest(err.Error()) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 13 23:06:39 UTC 2024 - 9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/namer.go
if err != nil { return "", "", err } return namespace, name, err } // errEmptyName is returned when API requests do not fill the name section of the path.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 14 10:11:56 UTC 2022 - 2.6K bytes - Viewed (0) -
plugin/pkg/admission/extendedresourcetoleration/admission.go
if len(attributes.GetSubresource()) != 0 || attributes.GetResource().GroupResource() != core.Resource("pods") { return nil } pod, ok := attributes.GetObject().(*core.Pod) if !ok { return errors.NewBadRequest(fmt.Sprintf("expected *core.Pod but got %T", attributes.GetObject())) } resources := sets.String{} for _, container := range pod.Spec.Containers { for resourceName := range container.Resources.Requests {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 20 15:11:00 UTC 2019 - 3.1K bytes - Viewed (0) -
plugin/pkg/admission/defaulttolerationseconds/admission.go
} if len(attributes.GetSubresource()) > 0 { // only run the checks below on pods proper and not subresources return nil } pod, ok := attributes.GetObject().(*api.Pod) if !ok { return errors.NewBadRequest(fmt.Sprintf("expected *api.Pod but got %T", attributes.GetObject())) } tolerations := pod.Spec.Tolerations toleratesNodeNotReady := false toleratesNodeUnreachable := false
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 06 04:56:21 UTC 2019 - 4K bytes - Viewed (0)