code: func scaleHasDesiredReplicas(sClient scaleclient.ScalesGetter, gr schema.GroupResource, resourceName string, namespace string, desiredReplicas int32) wait.ConditionFunc {
  	return func() (bool, error) {
  		actualScale, err := sClient.Scales(namespace).Get(gr, resourceName)
  		if err != nil {
  			return false, err
  		}
  		// this means the desired scale target has been reset by something else
  		if actualScale.Spec.Replicas != desiredReplicas {
  			return true, nil
  		}
  		return actualScale.Spec.Replicas == actualScale.Status.Replicas &&
  			desiredReplicas == actualScale.Status.Replicas, nil
  	}
  }
docs: // scaleHasDesiredReplicas returns a condition that will be true if and only if the desired replica
  // count for a scale (Spec) equals its updated replicas count (Status)