mirror of https://github.com/k3s-io/k3s
Simplify labels for `kubecfg run`
We created a name=<controller name> label on each object we created. This was confusing. Instead, piggyback on `replicationController` label and use that as the selector.pull/6/head
parent
8bfba149a5
commit
2444e4e1dc
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue