From 702937ac8614a05d3168c6565bea8a3347883dc0 Mon Sep 17 00:00:00 2001 From: jennybuckley Date: Wed, 11 Jul 2018 11:45:24 -0700 Subject: [PATCH] Explicitly disable dry run for connect --- staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go index a941f6fbaf4..4aab4de6646 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go @@ -98,6 +98,11 @@ func (scope *RequestScope) AllowsStreamSchema(s string) bool { // ConnectResource returns a function that handles a connect request on a rest.Storage object. func ConnectResource(connecter rest.Connecter, scope RequestScope, admit admission.Interface, restPath string, isSubresource bool) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { + if isDryRun(req.URL) { + scope.err(errors.NewBadRequest("dryRun is not supported"), w, req) + return + } + namespace, name, err := scope.Namer.Name(req) if err != nil { scope.err(err, w, req)