Skip to content

[Feat][operator] Support customizing autoscaler container command and args#4539

Open
fangyinc wants to merge 2 commits intoray-project:masterfrom
fangyinc:issues4538
Open

[Feat][operator] Support customizing autoscaler container command and args#4539
fangyinc wants to merge 2 commits intoray-project:masterfrom
fangyinc:issues4538

Conversation

@fangyinc
Copy link
Contributor

Why are these changes needed?

Currently, the autoscaler container's startup command is hardcoded in BuildAutoscalerContainer function:

Args: []string{
    "ray kuberay-autoscaler --cluster-name $(RAY_CLUSTER_NAME) --cluster-namespace $(RAY_CLUSTER_NAMESPACE)",
},

Users cannot customize the autoscaler startup command for debugging purposes or to use a custom autoscaler image with a different entrypoint.

This PR adds Command and Args fields to AutoscalerOptions in the RayCluster CRD, allowing users to override the default autoscaler container command and args.

Usage Example

apiVersion: ray.io/v1
kind: RayCluster
metadata:
  name: raycluster-autoscaler
spec:
  rayVersion: '2.52.0'
  enableInTreeAutoscaling: true
  autoscalerOptions:
    command: ["/bin/bash", "-c"]
    args:
      - |
        echo "Starting custom autoscaler..."
        ray kuberay-autoscaler \
          --cluster-name $(RAY_CLUSTER_NAME) \
          --cluster-namespace $(RAY_CLUSTER_NAMESPACE)

Related issue number

Closes #4538

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@fangyinc fangyinc changed the title feat: support customizing autoscaler container command and args [Feat][Operator] Support customizing autoscaler container command and args Feb 25, 2026
@fangyinc fangyinc changed the title [Feat][Operator] Support customizing autoscaler container command and args [Feat][operator] Support customizing autoscaler container command and args Feb 25, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@fangyinc
Copy link
Contributor Author

fangyinc commented Mar 2, 2026

@Future-Outlier PTAL. Thanks you~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature][operator] Support customizing autoscaler container command and args

1 participant