code: func (e *EndpointController) updatePod(old, cur interface{}) {
  	newPod := cur.(*v1.Pod)
  	oldPod := old.(*v1.Pod)
  	if newPod.ResourceVersion == oldPod.ResourceVersion {
  		// Periodic resync will send update events for all known pods.
  		// Two different versions of the same pod will always have different RVs.
  		return
  	}
  
  	podChangedFlag := podChanged(oldPod, newPod)
  
  	// Check if the pod labels have changed, indicating a possible
  	// change in the service membership
  	labelsChanged := false
  	if !reflect.DeepEqual(newPod.Labels, oldPod.Labels) ||
  		!hostNameAndDomainAreEqual(newPod, oldPod) {
  		labelsChanged = true
  	}
  
  	// If both the pod and labels are unchanged, no update is needed
  	if !podChangedFlag && !labelsChanged {
  		return
  	}
  
  	services, err := e.getPodServiceMemberships(newPod)
  	if err != nil {
  		utilruntime.HandleError(fmt.Errorf("Unable to get pod %v/%v's service memberships: %v", newPod.Namespace, newPod.Name, err))
  		return
  	}
  
  	if labelsChanged {
  		oldServices, err := e.getPodServiceMemberships(oldPod)
  		if err != nil {
  			utilruntime.HandleError(fmt.Errorf("Unable to get pod %v/%v's service memberships: %v", oldPod.Namespace, oldPod.Name, err))
  			return
  		}
  		services = determineNeededServiceUpdates(oldServices, services, podChangedFlag)
  	}
  
  	for key := range services {
  		e.queue.Add(key)
  	}
  }
docs: // When a pod is updated, figure out what services it used to be a member of
  // and what services it will be a member of, and enqueue the union of these.
  // old and cur must be *v1.Pod types.