code: func newVersionedStatefulSetPod(currentSet, updateSet *apps.StatefulSet, currentRevision, updateRevision string, ordinal int) *v1.Pod {
  	if currentSet.Spec.UpdateStrategy.Type == apps.RollingUpdateStatefulSetStrategyType &&
  		(currentSet.Spec.UpdateStrategy.RollingUpdate == nil && ordinal < int(currentSet.Status.CurrentReplicas)) ||
  		(currentSet.Spec.UpdateStrategy.RollingUpdate != nil && ordinal < int(*currentSet.Spec.UpdateStrategy.RollingUpdate.Partition)) {
  		pod := newStatefulSetPod(currentSet, ordinal)
  		setPodRevision(pod, currentRevision)
  		return pod
  	}
  	pod := newStatefulSetPod(updateSet, ordinal)
  	setPodRevision(pod, updateRevision)
  	return pod
  }
docs: // newVersionedStatefulSetPod creates a new Pod for a StatefulSet. currentSet is the representation of the set at the
  // current revision. updateSet is the representation of the set at the updateRevision. currentRevision is the name of
  // the current revision. updateRevision is the name of the update revision. ordinal is the ordinal of the Pod. If the
  // returned error is nil, the returned Pod is valid.