code: func (scaler *ReplicaSetScaler) Scale(namespace, name string, newSize uint, preconditions *ScalePrecondition, retry, waitForReplicas *RetryParams) error {
  	if preconditions == nil {
  		preconditions = &ScalePrecondition{-1, ""}
  	}
  	if retry == nil {
  		// Make it try only once, immediately
  		retry = &RetryParams{Interval: time.Millisecond, Timeout: time.Millisecond}
  	}
  	cond := ScaleCondition(scaler, preconditions, namespace, name, newSize)
  	if err := wait.Poll(retry.Interval, retry.Timeout, cond); err != nil {
  		return err
  	}
  	if waitForReplicas != nil {
  		rs, err := scaler.c.ReplicaSets(namespace).Get(name)
  		if err != nil {
  			return err
  		}
  		return wait.Poll(waitForReplicas.Interval, waitForReplicas.Timeout,
  			client.ReplicaSetHasDesiredReplicas(scaler.c, rs))
  	}
  	return nil
  }
docs: // Scale updates a ReplicaSet to a new size, with optional precondition check (if preconditions is
  // not nil), optional retries (if retry is not nil), and then optionally waits for it's replica
  // count to reach the new value (if wait is not nil).