mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
fix bug, infinite recursive call of GetLoadBalancerName()
This commit is contained in:
parent
416f63c050
commit
31c7eac2c4
@ -23,7 +23,9 @@ import (
|
|||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
"github.com/xanzy/go-cloudstack/cloudstack"
|
"github.com/xanzy/go-cloudstack/cloudstack"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
|
cloudprovider "k8s.io/cloud-provider"
|
||||||
)
|
)
|
||||||
|
|
||||||
type loadBalancer struct {
|
type loadBalancer struct {
|
||||||
@ -239,7 +241,7 @@ func (cs *CSCloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName st
|
|||||||
|
|
||||||
// GetLoadBalancerName retrieves the name of the LoadBalancer.
|
// GetLoadBalancerName retrieves the name of the LoadBalancer.
|
||||||
func (cs *CSCloud) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string {
|
func (cs *CSCloud) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string {
|
||||||
return cs.GetLoadBalancerName(ctx, clusterName, service)
|
return cloudprovider.DefaultLoadBalancerName(service)
|
||||||
}
|
}
|
||||||
|
|
||||||
// getLoadBalancer retrieves the IP address and ID and all the existing rules it can find.
|
// getLoadBalancer retrieves the IP address and ID and all the existing rules it can find.
|
||||||
|
Loading…
Reference in New Issue
Block a user