From 31c7eac2c4806e5e74d50633fbd70bc9b8b92bdd Mon Sep 17 00:00:00 2001 From: Guoliang Wang Date: Thu, 6 Sep 2018 18:33:35 +0800 Subject: [PATCH] fix bug, infinite recursive call of GetLoadBalancerName() --- .../providers/cloudstack/cloudstack_loadbalancer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/cloudprovider/providers/cloudstack/cloudstack_loadbalancer.go b/pkg/cloudprovider/providers/cloudstack/cloudstack_loadbalancer.go index 89912402502..c561b4ab333 100644 --- a/pkg/cloudprovider/providers/cloudstack/cloudstack_loadbalancer.go +++ b/pkg/cloudprovider/providers/cloudstack/cloudstack_loadbalancer.go @@ -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 { @@ -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.