code: func (e *EndpointController) checkLeftoverEndpoints() {
  	list, err := e.endpointsLister.List(labels.Everything())
  	if err != nil {
  		utilruntime.HandleError(fmt.Errorf("Unable to list endpoints (%v); orphaned endpoints will not be cleaned up. (They're pretty harmless, but you can restart this component if you want another attempt made.)", err))
  		return
  	}
  	for _, ep := range list {
  		if _, ok := ep.Annotations[resourcelock.LeaderElectionRecordAnnotationKey]; ok {
  			// when there are multiple controller-manager instances,
  			// we observe that it will delete leader-election endpoints after 5min
  			// and cause re-election
  			// so skip the delete here
  			// as leader-election only have endpoints without service
  			continue
  		}
  		key, err := controller.KeyFunc(ep)
  		if err != nil {
  			utilruntime.HandleError(fmt.Errorf("Unable to get key for endpoint %#v", ep))
  			continue
  		}
  		e.queue.Add(key)
  	}
  }
docs: // checkLeftoverEndpoints lists all currently existing endpoints and adds their
  // service to the queue. This will detect endpoints that exist with no
  // corresponding service; these endpoints need to be deleted. We only need to
  // do this once on startup, because in steady-state these are detected (but
  // some stragglers could have been left behind if the endpoint controller
  // reboots).