Skip to content

[Feature][RayService] Set default ports for users #3246

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

Closed
1 of 2 tasks
MortalHappiness opened this issue Mar 28, 2025 · 3 comments · Fixed by #3262
Closed
1 of 2 tasks

[Feature][RayService] Set default ports for users #3246

MortalHappiness opened this issue Mar 28, 2025 · 3 comments · Fixed by #3262
Assignees
Labels
enhancement New feature or request good-first-issue Good for newcomers rayservice

Comments

@MortalHappiness
Copy link
Member

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

Currently, many sample YAML files define the ports section. We can set default values in the KubeRay operator and remove that section from the sample YAML files. Note that the default ports for RayService are different from the default ports for RayCluster.

ports:
- containerPort: 6379
name: gcs-server
- containerPort: 8265 # Ray dashboard
name: dashboard
- containerPort: 10001
name: client
- containerPort: 8000
name: serve

Use case

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@MortalHappiness MortalHappiness added enhancement New feature or request good-first-issue Good for newcomers rayservice labels Mar 28, 2025
@machichima
Copy link
Contributor

Hi, I would like to work on this

@machichima
Copy link
Contributor

machichima commented Mar 30, 2025

Hi, @MortalHappiness

Just to confirm: I need to set default values for the four ports (gcs-server, dashboard, client, and serve) as 6379, 8265, 10001, and 8000, respectively, and remove the entire port section in yaml. Is that correct?

If so, I think it is already supported:

ports = getDefaultPorts()

Where the default values are:

DefaultClientPort = 10001
DefaultGcsServerPort = 6379
DefaultDashboardPort = 8265
DefaultMetricsPort = 8080
DefaultDashboardAgentListenPort = 52365
DefaultServingPort = 8000

@MortalHappiness
Copy link
Member Author

Okay. Then just remove that section from the YAML files and add tests for it. By the way, I noticed the following for-loop isn’t necessary. We can just use normal map access. You can change that too.

portsInt := getServicePorts(rayCluster)
ports := make([]corev1.ServicePort, 0, 1)
for name, port := range portsInt {
if name == utils.ServingPortName {
svcPort := corev1.ServicePort{Name: name, Port: port}
ports = append(ports, svcPort)
break
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good-first-issue Good for newcomers rayservice
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants