-
Notifications
You must be signed in to change notification settings - Fork 446
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
Expose head service ServiceSpec #1035
Expose head service ServiceSpec #1035
Conversation
Signed-off-by: Archit Kulkarni <[email protected]>
Signed-off-by: Archit Kulkarni <[email protected]>
headServiceSpec: | ||
description: HeadServiceSpec is the Kubernetes ServiceSpec of | ||
the head service. | ||
properties: |
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.
Everything on and below this line (properties:
) was autogenerated by make helm
. I'm not sure how it works, but it looks reasonable.
Is https://github.com/ray-project/kuberay/blob/master/ray-operator/controllers/ray/raycluster_controller_fake_test.go the best place to add a test for this? |
There's one test failure:
I'm trying to figure out why the new |
Signed-off-by: Archit Kulkarni <[email protected]>
Signed-off-by: Archit Kulkarni <[email protected]>
@@ -19,6 +19,9 @@ spec: | |||
{{- end }} | |||
headGroupSpec: | |||
serviceType: {{ .Values.service.type }} | |||
{{- if .Values.service.headServiceSpec }} |
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.
Add headServiceSpec
in values.yaml.
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.
I was wondering about this, why does it need to be included? I used head autoscalerOptions:
as an example, which is also not included in values.yaml
.
Did you mean to add headServiceSpec
with a default value of {}
, or to add it commented out like autoscalerOptions
?
for name, port := range ports { | ||
svcPort := corev1.ServicePort{Name: name, Port: port, AppProtocol: &defaultAppProtocol} | ||
service.Spec.Ports = append(service.Spec.Ports, svcPort) | ||
Spec: serviceSpec, |
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.
v1.ServiceSpec
is not enough for users. For example, users need to configure head service's annotations for some ingress controllers (#708). In addition, users also want to configure service's labels (#874, slack thread).
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.
Sorry, could you say a little more about what you mean here? Are you saying "expose the entire head service" is different from "expose the head service spec"?
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.
Resolved offline. I'll update this PR to expose the entire head service (which in particular includes ObjectMeta, which includes labels and annotations.)
At some point, the API needs to be upgraded to, say, v1beta1. Then you're allowed to make backwards-incompatible changes, but there's some rigamarole with converting webhooks that you're supposed to do: https://book.kubebuilder.io/multiversion-tutorial/conversion-concepts.html |
Closing in favor of #1040 |
Exposes the
ServiceSpec
of the head pod service to the user. Previously, we only exposed thetype
field. This led to limitations such as, for example, the user specifyingtype: LoadBalancer
and having no way to set the associated fieldLoadBalancerIPs
.After this PR, we will have two ways of specifying the service type: the legacy
HeadGroupSpec.ServiceType
, and the newHeadGroupSpec.HeadServiceSpec.Type
. In this PR we make the former take precedence.In the long term we should have only one way of specifying this. One plan might involve a few PRs:
HeadGroupSpec.ServiceType
to useHeadGroupSpec.HeadServiceSpec.Type
, if anyHeadGroupSpec.ServiceType
in v0.6HeadGroupSpec.ServiceType
in v0.7.Or, if we think it's convenient and harmless, we can leave them both in forever.
Why are these changes needed?
Closes #877
Related issue number
Checks