code: func (c *Client) WatchUntilReady(namespace string, reader io.Reader, timeout int64, shouldWait bool) error {
  	infos, err := c.BuildUnstructured(namespace, reader)
  	if err != nil {
  		return err
  	}
  	// For jobs, there's also the option to do poll c.Jobs(namespace).Get():
  	// https://github.com/adamreese/kubernetes/blob/master/test/e2e/job.go#L291-L300
  	return perform(infos, c.watchTimeout(time.Duration(timeout)*time.Second))
  }
docs: // WatchUntilReady watches the resource given in the reader, and waits until it is ready.
  //
  // This function is mainly for hook implementations. It watches for a resource to
  // hit a particular milestone. The milestone depends on the Kind.
  //
  // For most kinds, it checks to see if the resource is marked as Added or Modified
  // by the Kubernetes event stream. For some kinds, it does more:
  //
  // - Jobs: A job is marked "Ready" when it has successfully completed. This is
  //   ascertained by watching the Status fields in a job's output.
  //
  // Handling for other kinds will be added as necessary.