From 2444e4e1dc80d709dd700baf0bd53d7c63f48c70 Mon Sep 17 00:00:00 2001 From: Joe Beda Date: Tue, 19 Aug 2014 22:17:22 -0700 Subject: [PATCH] Simplify labels for `kubecfg run` We created a name= label on each object we created. This was confusing. Instead, piggyback on `replicationController` label and use that as the selector. --- pkg/kubecfg/kubecfg.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/kubecfg/kubecfg.go b/pkg/kubecfg/kubecfg.go index f6dfb4c96da..dce07c30b7b 100644 --- a/pkg/kubecfg/kubecfg.go +++ b/pkg/kubecfg/kubecfg.go @@ -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)