code: func PodRunningAndReady(event watch.Event) (bool, error) {
  	switch event.Type {
  	case watch.Deleted:
  		return false, errors.NewNotFound(schema.GroupResource{Resource: "pods"}, "")
  	}
  	switch t := event.Object.(type) {
  	case *corev1.Pod:
  		switch t.Status.Phase {
  		case corev1.PodFailed, corev1.PodSucceeded:
  			return false, ErrPodCompleted
  		case corev1.PodRunning:
  			conditions := t.Status.Conditions
  			if conditions == nil {
  				return false, nil
  			}
  			for i := range conditions {
  				if conditions[i].Type == corev1.PodReady &&
  					conditions[i].Status == corev1.ConditionTrue {
  					return true, nil
  				}
  			}
  		}
  	}
  	return false, nil
  }
docs: // PodRunningAndReady returns true if the pod is running and ready, false if the pod has not
  // yet reached those states, returns ErrPodCompleted if the pod has run to completion, or
  // an error in any other case.