Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "kubecfg -s <port> run ..." select correctly #1397

Merged
merged 2 commits into from
Sep 23, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion hack/e2e-suite/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions pkg/kubecfg/kubecfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -217,7 +217,7 @@ func RunController(image, name string, replicas int, client client.Interface, po
},
},
Labels: map[string]string{
"replicationController": name,
"simpleService": name,
},
},
},
Expand Down Expand Up @@ -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)
Expand Down