mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Don't start up multiple apiserver load balancers
get() is called in a loop until client configuration is successfully retrieved. Each iteration will try to configure the apiserver proxy, which will in turn create a new load balancer. Skip creating a new load balancer if we already have one. Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
parent
c0d129003b
commit
8ace8975d2
@ -119,7 +119,7 @@ func (p *proxy) SetAPIServerPort(ctx context.Context, port int) error {
|
||||
p.apiServerURL = u.String()
|
||||
p.apiServerEnabled = true
|
||||
|
||||
if p.lbEnabled {
|
||||
if p.lbEnabled && p.apiServerLB == nil {
|
||||
lbServerPort := p.lbServerPort
|
||||
if lbServerPort != 0 {
|
||||
lbServerPort = lbServerPort - 1
|
||||
|
Loading…
Reference in New Issue
Block a user