Skip to content

Commit

Permalink
Merge pull request kubernetes#79082 from timoreimann/delete-unused-se…
Browse files Browse the repository at this point in the history
…rvice-controller-load-balancer-name-method

Remove unused ServiceController.loadBalancerName method
  • Loading branch information
k8s-ci-robot authored Jun 20, 2019
2 parents bd35a48 + 77c9950 commit 8d8c54b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 0 additions & 4 deletions pkg/controller/service/service_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,6 @@ func (s *ServiceController) needsUpdate(oldService *v1.Service, newService *v1.S
return false
}

func (s *ServiceController) loadBalancerName(service *v1.Service) string {
return s.balancer.GetLoadBalancerName(context.TODO(), "", service)
}

func getPortsForLB(service *v1.Service) ([]*v1.ServicePort, error) {
var protocol v1.Protocol

Expand Down
3 changes: 2 additions & 1 deletion pkg/controller/service/service_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package service

import (
"context"
"errors"
"fmt"
"reflect"
Expand Down Expand Up @@ -360,7 +361,7 @@ func TestSyncLoadBalancerIfNeeded(t *testing.T) {
}
if balancer == nil {
t.Errorf("Got no load balancer, expected one to be created")
} else if balancer.Name != controller.loadBalancerName(tc.service) ||
} else if balancer.Name != controller.balancer.GetLoadBalancerName(context.Background(), "", tc.service) ||
balancer.Region != region ||
balancer.Ports[0].Port != tc.service.Spec.Ports[0].Port {
t.Errorf("Created load balancer has incorrect parameters: %v", balancer)
Expand Down

0 comments on commit 8d8c54b

Please sign in to comment.