Merge pull request #1397 from thockin/kubecfg

Make "kubecfg -s <port> run ..." select correctly
This commit is contained in:
Joe Beda 2014-09-22 17:21:45 -07:00
commit d65f8e3b90
2 changed files with 5 additions and 5 deletions

View File

@ -30,7 +30,7 @@ CONTROLLER_NAME=update-demo
function validate() {
NUM_REPLICAS=$1
CONTAINER_IMAGE_VERSION=$2
POD_ID_LIST=$($KUBECFG '-template={{range.Items}}{{.ID}} {{end}}' -l replicationController=${CONTROLLER_NAME} list pods)
POD_ID_LIST=$($KUBECFG '-template={{range.Items}}{{.ID}} {{end}}' -l simpleService=${CONTROLLER_NAME} list pods)
# Container turn up on a clean cluster can take a while for the docker image pull.
ALL_RUNNING=0
while [ $ALL_RUNNING -ne 1 ]; do

View File

@ -201,7 +201,7 @@ func RunController(image, name string, replicas int, client client.Interface, po
DesiredState: api.ReplicationControllerState{
Replicas: replicas,
ReplicaSelector: map[string]string{
"replicationController": name,
"simpleService": name,
},
PodTemplate: api.PodTemplate{
DesiredState: api.PodState{
@ -217,7 +217,7 @@ func RunController(image, name string, replicas int, client client.Interface, po
},
},
Labels: map[string]string{
"replicationController": name,
"simpleService": name,
},
},
},
@ -252,10 +252,10 @@ func createService(name string, port int, client client.Interface) (*api.Service
JSONBase: api.JSONBase{ID: name},
Port: port,
Labels: map[string]string{
"name": name,
"simpleService": name,
},
Selector: map[string]string{
"name": name,
"simpleService": name,
},
}
svc, err := client.CreateService(svc)