code: func (w *KubeWaiter) WaitForPodsWithLabel(kvLabel string) error {
  
  	lastKnownPodNumber := -1
  	return wait.PollImmediate(constants.APICallRetryInterval, w.timeout, func() (bool, error) {
  		listOpts := metav1.ListOptions{LabelSelector: kvLabel}
  		pods, err := w.client.CoreV1().Pods(metav1.NamespaceSystem).List(listOpts)
  		if err != nil {
  			fmt.Fprintf(w.writer, "[apiclient] Error getting Pods with label selector %q [%v]\n", kvLabel, err)
  			return false, nil
  		}
  
  		if lastKnownPodNumber != len(pods.Items) {
  			fmt.Fprintf(w.writer, "[apiclient] Found %d Pods for label selector %s\n", len(pods.Items), kvLabel)
  			lastKnownPodNumber = len(pods.Items)
  		}
  
  		if len(pods.Items) == 0 {
  			return false, nil
  		}
  
  		for _, pod := range pods.Items {
  			if pod.Status.Phase != v1.PodRunning {
  				return false, nil
  			}
  		}
  
  		return true, nil
  	})
  }
docs: // WaitForPodsWithLabel will lookup pods with the given label and wait until they are all
  // reporting status as running.