Minimal status mutation change

PUT /api/v1beta3/namespaces/default/pods/foo/status
    {
      "metadata": {...}, // allowed for valid values
      "spec": {}, // ignored
      "status": {...}, // allowed, except for Host
    }

Exposes the simplest possibly change. Needs a slight refactoring
to RESTUpdateStrategy to split merging which can be done in a
follow up.
This commit is contained in:
Clayton Coleman
2015-02-24 00:42:27 -05:00
parent 08402d798c
commit 3d290089ae
7 changed files with 203 additions and 68 deletions

View File

@@ -369,7 +369,7 @@ func logStackOnRecover(panicReason interface{}, httpWriter http.ResponseWriter)
func (m *Master) init(c *Config) {
boundPodFactory := &pod.BasicBoundPodFactory{}
podStorage, bindingStorage := podetcd.NewREST(c.EtcdHelper, boundPodFactory)
podStorage, bindingStorage, podStatusStorage := podetcd.NewREST(c.EtcdHelper, boundPodFactory)
podRegistry := pod.NewRegistry(podStorage)
eventRegistry := event.NewEtcdRegistry(c.EtcdHelper, uint64(c.EventTTL.Seconds()))
@@ -401,8 +401,9 @@ func (m *Master) init(c *Config) {
// TODO: Factor out the core API registration
m.storage = map[string]apiserver.RESTStorage{
"pods": podStorage,
"bindings": bindingStorage,
"pods": podStorage,
"pods/status": podStatusStorage,
"bindings": bindingStorage,
"replicationControllers": controller.NewREST(registry, podRegistry),
"services": service.NewREST(m.serviceRegistry, c.Cloud, m.nodeRegistry, m.portalNet, c.ClusterName),