code: func (jm *JobController) addPod(obj interface{}) {
  	pod := obj.(*v1.Pod)
  	if pod.DeletionTimestamp != nil {
  		// on a restart of the controller controller, it's possible a new pod shows up in a state that
  		// is already pending deletion. Prevent the pod from being a creation observation.
  		jm.deletePod(pod)
  		return
  	}
  
  	// If it has a ControllerRef, that's all that matters.
  	if controllerRef := metav1.GetControllerOf(pod); controllerRef != nil {
  		job := jm.resolveControllerRef(pod.Namespace, controllerRef)
  		if job == nil {
  			return
  		}
  		jobKey, err := controller.KeyFunc(job)
  		if err != nil {
  			return
  		}
  		jm.expectations.CreationObserved(jobKey)
  		jm.enqueueController(job, true)
  		return
  	}
  
  	// Otherwise, it's an orphan. Get a list of all matching controllers and sync
  	// them to see if anyone wants to adopt it.
  	// DO NOT observe creation because no controller should be waiting for an
  	// orphan.
  	for _, job := range jm.getPodJobs(pod) {
  		jm.enqueueController(job, true)
  	}
  }
docs: // When a pod is created, enqueue the controller that manages it and update it's expectations.