From b2a2ce0bb3983d1bc7ceb956af9400d0e54466ff Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Fri, 8 May 2015 10:13:42 -0400 Subject: [PATCH] Legacy scope naming should NEVER set namespace for root ... resources. --- pkg/apiserver/api_installer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/apiserver/api_installer.go b/pkg/apiserver/api_installer.go index 7b27c94f794..59a83bbf6e8 100644 --- a/pkg/apiserver/api_installer.go +++ b/pkg/apiserver/api_installer.go @@ -691,6 +691,9 @@ var _ ScopeNamer = legacyScopeNaming{} // Namespace returns the namespace from the query or the default. func (n legacyScopeNaming) Namespace(req *restful.Request) (namespace string, err error) { + if n.scope.Name() == meta.RESTScopeNameRoot { + return api.NamespaceNone, nil + } values, ok := req.Request.URL.Query()[n.scope.ParamName()] if !ok || len(values) == 0 { // legacy behavior