mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
rename labels in kubcfg logic
This commit is contained in:
parent
bb3900f447
commit
cf86d66076
@ -30,7 +30,7 @@ CONTROLLER_NAME=update-demo
|
|||||||
function validate() {
|
function validate() {
|
||||||
NUM_REPLICAS=$1
|
NUM_REPLICAS=$1
|
||||||
CONTAINER_IMAGE_VERSION=$2
|
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.
|
# Container turn up on a clean cluster can take a while for the docker image pull.
|
||||||
ALL_RUNNING=0
|
ALL_RUNNING=0
|
||||||
while [ $ALL_RUNNING -ne 1 ]; do
|
while [ $ALL_RUNNING -ne 1 ]; do
|
||||||
|
@ -201,7 +201,7 @@ func RunController(image, name string, replicas int, client client.Interface, po
|
|||||||
DesiredState: api.ReplicationControllerState{
|
DesiredState: api.ReplicationControllerState{
|
||||||
Replicas: replicas,
|
Replicas: replicas,
|
||||||
ReplicaSelector: map[string]string{
|
ReplicaSelector: map[string]string{
|
||||||
"replicationController": name,
|
"simpleService": name,
|
||||||
},
|
},
|
||||||
PodTemplate: api.PodTemplate{
|
PodTemplate: api.PodTemplate{
|
||||||
DesiredState: api.PodState{
|
DesiredState: api.PodState{
|
||||||
@ -217,7 +217,7 @@ func RunController(image, name string, replicas int, client client.Interface, po
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Labels: map[string]string{
|
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},
|
JSONBase: api.JSONBase{ID: name},
|
||||||
Port: port,
|
Port: port,
|
||||||
Labels: map[string]string{
|
Labels: map[string]string{
|
||||||
"name": name,
|
"simpleService": name,
|
||||||
},
|
},
|
||||||
Selector: map[string]string{
|
Selector: map[string]string{
|
||||||
"replicationController": name,
|
"simpleService": name,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
svc, err := client.CreateService(svc)
|
svc, err := client.CreateService(svc)
|
||||||
|
Loading…
Reference in New Issue
Block a user