Skip to content

Commit

Permalink
fix bug, infinite recursive call of GetLoadBalancerName()
Browse files Browse the repository at this point in the history
  • Loading branch information
wgliang committed Oct 13, 2018
1 parent 416f63c commit 31c7eac
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import (

"github.com/golang/glog"
"github.com/xanzy/go-cloudstack/cloudstack"

"k8s.io/api/core/v1"
cloudprovider "k8s.io/cloud-provider"
)

type loadBalancer struct {
Expand Down Expand Up @@ -239,7 +241,7 @@ func (cs *CSCloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName st

// GetLoadBalancerName retrieves the name of the LoadBalancer.
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.
Expand Down

0 comments on commit 31c7eac

Please sign in to comment.