From 8c820ae303b253cde5d690eac5eec05a0e707c27 Mon Sep 17 00:00:00 2001 From: xuzhonghu Date: Wed, 27 Jun 2018 11:14:36 +0800 Subject: [PATCH] transform ConnectMethods to kube verbs --- staging/src/k8s.io/apiserver/pkg/endpoints/installer.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go b/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go index 3edd09dcdf..1b52a5bd07 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go @@ -805,6 +805,13 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } addParams(route, action.Params) routes = append(routes, route) + + // transform ConnectMethods to kube verbs + if kubeVerb, found := toDiscoveryKubeVerb[method]; found { + if len(kubeVerb) != 0 { + kubeVerbs[kubeVerb] = struct{}{} + } + } } default: return nil, fmt.Errorf("unrecognized action verb: %s", action.Verb)