code: func (s *ServiceController) nodeSyncLoop() {
  	newHosts, err := s.nodeLister.ListWithPredicate(getNodeConditionPredicate())
  	if err != nil {
  		klog.Errorf("Failed to retrieve current set of nodes from node lister: %v", err)
  		return
  	}
  	if nodeSlicesEqualForLB(newHosts, s.knownHosts) {
  		// The set of nodes in the cluster hasn't changed, but we can retry
  		// updating any services that we failed to update last time around.
  		s.servicesToUpdate = s.updateLoadBalancerHosts(s.servicesToUpdate, newHosts)
  		return
  	}
  
  	klog.Infof("Detected change in list of current cluster nodes. New node set: %v",
  		nodeNames(newHosts))
  
  	// Try updating all services, and save the ones that fail to try again next
  	// round.
  	s.servicesToUpdate = s.cache.allServices()
  	numServices := len(s.servicesToUpdate)
  	s.servicesToUpdate = s.updateLoadBalancerHosts(s.servicesToUpdate, newHosts)
  	klog.Infof("Successfully updated %d out of %d load balancers to direct traffic to the updated set of nodes",
  		numServices-len(s.servicesToUpdate), numServices)
  
  	s.knownHosts = newHosts
  }
docs: // nodeSyncLoop handles updating the hosts pointed to by all load
  // balancers whenever the set of nodes in the cluster changes.