code: func IsPodAvailable(pod *v1.Pod, minReadySeconds int32, now metav1.Time) bool {
  	if !IsPodReady(pod) {
  		return false
  	}
  
  	c := GetPodReadyCondition(pod.Status)
  	minReadySecondsDuration := time.Duration(minReadySeconds) * time.Second
  	if minReadySeconds == 0 || !c.LastTransitionTime.IsZero() && c.LastTransitionTime.Add(minReadySecondsDuration).Before(now.Time) {
  		return true
  	}
  	return false
  }
docs: // IsPodAvailable returns true if a pod is available; false otherwise.
  // Precondition for an available pod is that it must be ready. On top
  // of that, there are two cases when a pod can be considered available:
  // 1. minReadySeconds == 0, or
  // 2. LastTransitionTime (is set) + minReadySeconds < current time