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] Add support user-defined serve service ports #2670

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

Conversation

remimin
Copy link

@remimin remimin commented Dec 19, 2024

Why are these changes needed?

Users may only need to customize the serve service to use the NodePort mode for external access, but currently, the implementation requires setting all ports in the cluster to NodePort mode.

Related issue number

Checks

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

@remimin
Copy link
Author

remimin commented Dec 23, 2024

@kevin85421 @MortalHappiness PTAL

Comment on lines +129 to +155
instanceWithoutSvc = &rayv1.RayCluster{
ObjectMeta: metav1.ObjectMeta{
Name: "raycluster-sample-nosvc",
Namespace: "default",
},
Spec: rayv1.RayClusterSpec{
HeadServiceAnnotations: map[string]string{
headServiceAnnotationKey1: headServiceAnnotationValue1,
headServiceAnnotationKey2: headServiceAnnotationValue2,
},
HeadGroupSpec: rayv1.HeadGroupSpec{
ServiceType: corev1.ServiceTypeClusterIP,
Template: corev1.PodTemplateSpec{
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "ray-head",
Ports: []corev1.ContainerPort{
{ContainerPort: 10001, Name: "client"},
},
},
},
},
},
},
},
}
Copy link
Member

Choose a reason for hiding this comment

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

Why not use instanceForSvc directly? They are almost the same.

Copy link
Author

Choose a reason for hiding this comment

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

They are different, instanceWithoutSvc does not include the "serve" container port for the service.

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