code: func (s *ServiceController) syncService(key string) error {
  	startTime := time.Now()
  	var cachedService *cachedService
  	defer func() {
  		klog.V(4).Infof("Finished syncing service %q (%v)", key, time.Since(startTime))
  	}()
  
  	namespace, name, err := cache.SplitMetaNamespaceKey(key)
  	if err != nil {
  		return err
  	}
  
  	// service holds the latest service info from apiserver
  	service, err := s.serviceLister.Services(namespace).Get(name)
  	switch {
  	case errors.IsNotFound(err):
  		// service absence in store means watcher caught the deletion, ensure LB info is cleaned
  		klog.Infof("Service has been deleted %v. Attempting to cleanup load balancer resources", key)
  		err = s.processServiceDeletion(key)
  	case err != nil:
  		klog.Infof("Unable to retrieve service %v from store: %v", key, err)
  	default:
  		cachedService = s.cache.getOrCreate(key)
  		err = s.processServiceUpdate(cachedService, service, key)
  	}
  
  	return err
  }
docs: // syncService will sync the Service with the given key if it has had its expectations fulfilled,
  // meaning it did not expect to see any more of its pods created or deleted. This function is not meant to be
  // invoked concurrently with the same key.