code: func updateWithRetries(rcClient client.ReplicationControllerInterface, rc *api.ReplicationController, applyUpdate updateFunc) (*api.ReplicationController, error) {
  	var err error
  	oldRc := rc
  	err = wait.Poll(10*time.Millisecond, 1*time.Minute, func() (bool, error) {
  		// Apply the update, then attempt to push it to the apiserver.
  		applyUpdate(rc)
  		if rc, err = rcClient.Update(rc); err == nil {
  			// rc contains the latest controller post update
  			return true, nil
  		}
  		// Update the controller with the latest resource version, if the update failed we
  		// can't trust rc so use oldRc.Name.
  		if rc, err = rcClient.Get(oldRc.Name); err != nil {
  			// The Get failed: Value in rc cannot be trusted.
  			rc = oldRc
  		}
  		// The Get passed: rc contains the latest controller, expect a poll for the update.
  		return false, nil
  	})
  	// If the error is non-nil the returned controller cannot be trusted, if it is nil, the returned
  	// controller contains the applied update.
  	return rc, err
  }
docs: // updateWithRetries updates applies the given rc as an update.