Pod proxy, exec and portforward subresources

Makes it possible to access the following subresources:

/namespaces/<ns>/pods/<pod-name>[:port]/proxy
/namespaces/<ns>/pods/<pod-name>/exec?container=<container>&command=<cmd>
/namespaces/<ns>/pods/<pod-name>/portforward
This commit is contained in:
Cesar Wong
2015-04-14 11:12:27 -04:00
parent 4da14e9357
commit d672363387
5 changed files with 652 additions and 14 deletions

View File

@@ -387,11 +387,14 @@ func (m *Master) init(c *Config) {
// TODO: Factor out the core API registration
m.storage = map[string]rest.Storage{
"pods": podStorage.Pod,
"pods/status": podStorage.Status,
"pods/log": podStorage.Log,
"pods/binding": podStorage.Binding,
"bindings": podStorage.Binding,
"pods": podStorage.Pod,
"pods/status": podStorage.Status,
"pods/log": podStorage.Log,
"pods/exec": podStorage.Exec,
"pods/portforward": podStorage.PortForward,
"pods/proxy": podStorage.Proxy,
"pods/binding": podStorage.Binding,
"bindings": podStorage.Binding,
"replicationControllers": controllerStorage,
"services": service.NewStorage(m.serviceRegistry, m.nodeRegistry, m.endpointRegistry, m.portalNet, c.ClusterName),