Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat][kubectl-plugin] support setting ray start params #3046

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidxia
Copy link
Contributor

@davidxia davidxia commented Feb 13, 2025

in kubectl ray create cluster and kubectl ray create workergroup commands
with new --head-ray-start-params and --worker-ray-start-params flags.

Example

$ kubectl ray create cluster dxia-test --dry-run \
  --head-ray-start-params dashboard-host=0.0.0.0,disable-usage-stats=true,num-cpus=0 \
  --worker-ray-start-params disable-usage-stats=true | grep -A 3 'rayStartParams:'

    rayStartParams:
      dashboard-host: 0.0.0.0
      disable-usage-stats: "true"
      num-cpus: "0"
--
    rayStartParams:
      disable-usage-stats: "true"
      metrics-export-port: "8080"
    replicas: 1

This idea was originally described in this doc.

Checks

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

@davidxia davidxia marked this pull request as ready for review February 13, 2025 19:00
Comment on lines +68 to +73
headRayStartParams := map[string]string{
"dashboard-host": "0.0.0.0",
}
workerRayStartParams := map[string]string{
"metrics-export-port": "8080",
}
maps.Copy(headRayStartParams, rayClusterSpecObject.HeadRayStartParams)
maps.Copy(workerRayStartParams, rayClusterSpecObject.WorkerRayStartParams)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For backwards compatibility. Lmk if it's better to remove these defaults and address the TODO comment above.

@MortalHappiness
Copy link
Member

Should we also support this for create workergroup command?

@davidxia
Copy link
Contributor Author

Yes that makes sense. I’ll update this PR later if no objections.

@davidxia
Copy link
Contributor Author

updated

@davidxia
Copy link
Contributor Author

rebased to fix conflicts

@davidxia davidxia force-pushed the ray-start-params branch 2 times, most recently from b0a76ec to b785c3e Compare February 21, 2025 21:39
@davidxia
Copy link
Contributor Author

rebased again to resolve conflicts :)

in `kubectl ray create cluster` and `kubectl ray create workergroup` commands
with new `--head-ray-start-params` and `--worker-ray-start-params` flags.

Example

```console
$ kubectl ray create cluster dxia-test --dry-run \
  --head-ray-start-params dashboard-host=0.0.0.0,disable-usage-stats=true,num-cpus=0 \
  --worker-ray-start-params disable-usage-stats=true | grep -A 3 'rayStartParams:'

    rayStartParams:
      dashboard-host: 0.0.0.0
      disable-usage-stats: "true"
      num-cpus: "0"
--
    rayStartParams:
      disable-usage-stats: "true"
      metrics-export-port: "8080"
    replicas: 1
```

Signed-off-by: David Xia <[email protected]>
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.

2 participants