Simplify labels for `kubecfg run`

We created a name=<controller name> label on each object we created.  This was confusing.  Instead, piggyback on `replicationController` label and use that as the selector.
pull/6/head
Joe Beda 2014-08-19 22:17:22 -07:00
parent 8bfba149a5
commit 2444e4e1dc
1 changed files with 2 additions and 5 deletions

View File

@ -168,7 +168,7 @@ func RunController(image, name string, replicas int, client client.Interface, po
DesiredState: api.ReplicationControllerState{
Replicas: replicas,
ReplicaSelector: map[string]string{
"name": name,
"replicationController": name,
},
PodTemplate: api.PodTemplate{
DesiredState: api.PodState{
@ -184,13 +184,10 @@ func RunController(image, name string, replicas int, client client.Interface, po
},
},
Labels: map[string]string{
"name": name,
"replicationController": name,
},
},
},
Labels: map[string]string{
"name": name,
},
}
controllerOut, err := client.CreateReplicationController(controller)