# RayJob enableInTreeAutoscaling crash loop

**URL:** <https://discuss.ray.io/t/rayjob-enableintreeautoscaling-crash-loop/10939>\
**Category:** Kubernetes\
**Created:** [June 6, 2023, 8:53pm UTC](https://discuss.ray.io/t/rayjob-enableintreeautoscaling-crash-loop/10939 "2023-06-06T20:53:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scott\_Zelenka](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/scott_zelenka/32/4328_2.png) [@Scott\_Zelenka](https://discuss.ray.io/u/Scott_Zelenka)\
**Post date:** [June 6, 2023, 8:53pm UTC](https://discuss.ray.io/t/rayjob-enableintreeautoscaling-crash-loop/10939/1 "2023-06-06T20:53:16Z")

</div>

Attempting to configure a RayJob via CRD, without `enableInTreeAutoscaling=true` it’ll run, but not scale up based on the workload like a regular RayCluster does.

The RayJob CRD allows for `spec.rayClusterSpec.enableInTreeAutoscaling`, but when deploying the RayJob CRD with this set, the Operator seems to be stuck in a loop of detecting a change, deleting all the workers back to 1 replica, then the autoscaler sidecar will attempt to scale it up, etc. etc.

What is the proper method for configuring a RayJob CRD, such that the RayCluster it creates is permitted to scale up?

Testing on Ray 2.4.0 on Python 3.9 with the official Docker image on K8s 1.24

---

<div class="post-metadata">

**Author:** ![eschneeweiss](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/eschneeweiss/32/5706_2.png) [@eschneeweiss](https://discuss.ray.io/u/eschneeweiss)\
**Post date:** [August 27, 2024, 1:26pm UTC](https://discuss.ray.io/t/rayjob-enableintreeautoscaling-crash-loop/10939/2 "2024-08-27T13:26:44Z")

</div>

I am dealing with a similar issue, is there any answer on this?
