code: func (rsc *ReplicaSetController) addPod(obj interface{}) {
  	pod := obj.(*v1.Pod)
  
  	if pod.DeletionTimestamp != nil {
  		// on a restart of the controller manager, it's possible a new pod shows up in a state that
  		// is already pending deletion. Prevent the pod from being a creation observation.
  		rsc.deletePod(pod)
  		return
  	}
  
  	// If it has a ControllerRef, that's all that matters.
  	if controllerRef := metav1.GetControllerOf(pod); controllerRef != nil {
  		rs := rsc.resolveControllerRef(pod.Namespace, controllerRef)
  		if rs == nil {
  			return
  		}
  		rsKey, err := controller.KeyFunc(rs)
  		if err != nil {
  			return
  		}
  		klog.V(4).Infof("Pod %s created: %#v.", pod.Name, pod)
  		rsc.expectations.CreationObserved(rsKey)
  		rsc.enqueueReplicaSet(rs)
  		return
  	}
  
  	// Otherwise, it's an orphan. Get a list of all matching ReplicaSets and sync
  	// them to see if anyone wants to adopt it.
  	// DO NOT observe creation because no controller should be waiting for an
  	// orphan.
  	rss := rsc.getPodReplicaSets(pod)
  	if len(rss) == 0 {
  		return
  	}
  	klog.V(4).Infof("Orphan Pod %s created: %#v.", pod.Name, pod)
  	for _, rs := range rss {
  		rsc.enqueueReplicaSet(rs)
  	}
  }
docs: // When a pod is created, enqueue the replica set that manages it and update its expectations.