From d42f4942bca255b1a20802885d1f036702dc0925 Mon Sep 17 00:00:00 2001 From: FengyunPan Date: Mon, 27 Mar 2017 17:22:05 +0800 Subject: [PATCH] Remove the code which get same resources twice There is no need to get the same ingress resources from ingressclient twice. --- controllers/gce/controller/controller.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/controllers/gce/controller/controller.go b/controllers/gce/controller/controller.go index d3e4772ec..397a610ac 100644 --- a/controllers/gce/controller/controller.go +++ b/controllers/gce/controller/controller.go @@ -371,10 +371,6 @@ func (lbc *LoadBalancerController) updateIngressStatus(l7 *loadbalancers.L7, ing } } // Update annotations through /update endpoint - currIng, err = ingClient.Get(ing.Name, metav1.GetOptions{}) - if err != nil { - return err - } currIng.Annotations = loadbalancers.GetLBAnnotations(l7, currIng.Annotations, lbc.CloudClusterManager.backendPool) if !reflect.DeepEqual(ing.Annotations, currIng.Annotations) { glog.V(3).Infof("Updating annotations of %v/%v", ing.Namespace, ing.Name)