Open rjmco opened 1 year ago
My thought is that the head Service should indeed behave the way you describe. I think your fix makes sense, but you're right that after the PR #1040, the recommended way will be to set the annotations directly in spec.headGroupSpec.headService
, specifically spec.headGroupSpec.headService.metadata.anotations
, and these annotations should also be inherited by the RayService
. So I think there should be no need to submit your fix as a PR.
@kevin85421 can comment if I've said anything wrong here.
Search before asking
KubeRay Component
ray-operator
What happened + What you expected to happen
If a
spec.rayClusterConfig.headServiceAnnotations
value is declared on aRayService
manifest, the "head"Service
created by theRayCluster
(e.g.rayservice-sample-raycluster-ffd2k-head-svc
) will include those annotations, but the "head"Service
created by theRayService
(i.e.rayservice-sample-head-svc
) will not.I would have expected the "head"
Service
created by theRayService
to have the same annotations because it should be a replica of the activeRayCluster
's "head"Service
.Reproduction script
kuberay/ray-operator/config/samples/ray_v1alpha1_rayservice.yaml
manifest by adding thespec.rayClusterConfig.headServiceAnnotations: {"test": "test"}
value and applying. As the example shows:Service
created by theRayService
(i.e.rayservice-sample-head-svc
) but are present on the "head"Service
created by theRayCluster
(i.e.rayservice-sample-raycluster-ffd2k-head-svc
):Anything else
The ability to add annotations to services and change other fields on the
Service
's spec is important to take full advantage of some cloud provider's load balancer features. Particularly in my case, I am aiming to use the annotationcloud.google.com/backend-config:{"default": "head-svc-backend-config"}
to configure the GCP load balancer to use HTTP health checks and restrict access to the Ray dashboard endpoint with an authentication portal using Identity-Aware Proxy.I am willing to submit a PR to fix the behavior to match my expectations. In fact, I already have a working fix on https://github.com/ray-project/kuberay/compare/master...rjmco:kuberay:0-5-0-fix-lack-of-annotations-on-rayservice-service to which I can add unit test and submit.
However, after searching the issues before submitting this one, I found that @kevin85421 and @architkulkarni are working #877 and #1040 which will completely change the CRD's interface on the next version and I also am not sure if the teams agrees with the expected behavior that I described above.
Does the team agree that the "head"
Service
created by theRayService
should be behave in the way that I described above, or should there be an independent field in the CRD to manage what annotations the "head"Service
created by theRayService
should contain?Are you willing to submit a PR?