-
Notifications
You must be signed in to change notification settings - Fork 426
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Ren MinMin <[email protected]>
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"}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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