mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Merge pull request #79082 from timoreimann/delete-unused-service-controller-load-balancer-name-method
Remove unused ServiceController.loadBalancerName method
This commit is contained in:
commit
8d8c54bd73
@ -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
|
||||
|
||||
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"reflect"
|
||||
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user