code: func oldPodsRunning(newRS *apps.ReplicaSet, oldRSs []*apps.ReplicaSet, podMap map[types.UID]*v1.PodList) bool {
  	if oldPods := util.GetActualReplicaCountForReplicaSets(oldRSs); oldPods > 0 {
  		return true
  	}
  	for rsUID, podList := range podMap {
  		// If the pods belong to the new ReplicaSet, ignore.
  		if newRS != nil && newRS.UID == rsUID {
  			continue
  		}
  		for _, pod := range podList.Items {
  			switch pod.Status.Phase {
  			case v1.PodFailed, v1.PodSucceeded:
  				// Don't count pods in terminal state.
  				continue
  			case v1.PodUnknown:
  				// This happens in situation like when the node is temporarily disconnected from the cluster.
  				// If we can't be sure that the pod is not running, we have to count it.
  				return true
  			default:
  				// Pod is not in terminal phase.
  				return true
  			}
  		}
  	}
  	return false
  }
docs: // oldPodsRunning returns whether there are old pods running or any of the old ReplicaSets thinks that it runs pods.