rename labels in kubcfg logic

This commit is contained in:
Tim Hockin 2014-09-22 15:34:13 -07:00
parent bb3900f447
commit cf86d66076
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{
"replicationController": name,
"simpleService": name,
},
}
svc, err := client.CreateService(svc)