code: func (rsc *ReplicaSetController) resolveControllerRef(namespace string, controllerRef *metav1.OwnerReference) *apps.ReplicaSet {
  	// We can't look up by UID, so look up by Name and then verify UID.
  	// Don't even try to look up by Name if it's the wrong Kind.
  	if controllerRef.Kind != rsc.Kind {
  		return nil
  	}
  	rs, err := rsc.rsLister.ReplicaSets(namespace).Get(controllerRef.Name)
  	if err != nil {
  		return nil
  	}
  	if rs.UID != controllerRef.UID {
  		// The controller we found with this Name is not the same one that the
  		// ControllerRef points to.
  		return nil
  	}
  	return rs
  }
docs: // resolveControllerRef returns the controller referenced by a ControllerRef,
  // or nil if the ControllerRef could not be resolved to a matching controller
  // of the correct Kind.