Skip to content

Commit

Permalink
Merge pull request #206 from nicksardo/remove-dupe
Browse files Browse the repository at this point in the history
Remove duplicate nodeport translation
  • Loading branch information
nicksardo authored Apr 11, 2018
2 parents b40702c + d615c49 commit 950a8f7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,8 @@ func (lbc *LoadBalancerController) sync(key string) (retErr error) {
return err
}

// Get all service ports for the ingress being synced.
lbSvcPorts := lbc.Translator.ToNodePorts(&extensions.IngressList{
Items: []extensions.Ingress{*ing},
})

// Create the backend services and higher-level LB resources.
if err = lbc.CloudClusterManager.EnsureLoadBalancer(lb, lbSvcPorts, igs); err != nil {
if err = lbc.CloudClusterManager.EnsureLoadBalancer(lb, ingNodePorts, igs); err != nil {
return err
}

Expand All @@ -330,7 +325,7 @@ func (lbc *LoadBalancerController) sync(key string) (retErr error) {

// If NEG enabled, link the backend services to the NEGs.
if lbc.negEnabled {
for _, svcPort := range lbSvcPorts {
for _, svcPort := range ingNodePorts {
if svcPort.NEGEnabled {
zones, err := lbc.Translator.ListZones()
if err != nil {
Expand Down

0 comments on commit 950a8f7

Please sign in to comment.