transform ConnectMethods to kube verbs

pull/8/head
xuzhonghu 2018-06-27 11:14:36 +08:00
parent 05f073dc28
commit 8c820ae303
1 changed files with 7 additions and 0 deletions

View File

@ -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)