-
Notifications
You must be signed in to change notification settings - Fork 402
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
[Bug] Modification of nameOverride will cause label selector mismatch for head node #572
Conversation
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.
This makes sense to me -- I left some minor nits about test documentation.
If you haven't yet, could you test this out manually? You could do that by building an operator image with the changes, deploying with a non-default label, and making sure the worker pod connects to the cluster successfully.
Sorry, I see you've already done that. |
… for head node (ray-project#572) As mentioned in ray-project#495 and ray-project#530, the value of nameOverride needs to be hardcoded with the value "kuberay" to avoid the mismatch between head pod and head service. The value of app.kubernetes.io/name in the head pod's labels is same as app.kubernetes.io/name specified in RayCluster.Spec.HeadGroupSpec.Template.ObjectMeta.Labels of RayCluster custom resource YAML file. See the function labelPod in pod.go for more details. RayCluster.Spec.HeadGroupSpec.Template.ObjectMeta.Labels["app.kubernetes.io/name"] is controlled by the value of nameOverride in helm chart. However, the value of app.kubernetes.io/name in the head pod service's selector is hardcoded with the constant variable ApplicationName (= "kuberay")
Why are these changes needed?
As mentioned in #495 and #530, the value of nameOverride needs to be hardcoded with the value "kuberay" to avoid the mismatch between head pod and head service.
The value of
app.kubernetes.io/name
in the head pod's labels is same asapp.kubernetes.io/name
specified inRayCluster.Spec.HeadGroupSpec.Template.ObjectMeta.Labels
of RayCluster custom resource YAML file. See the functionlabelPod
in pod.go for more details.RayCluster.Spec.HeadGroupSpec.Template.ObjectMeta.Labels["app.kubernetes.io/name"]
is controlled by the value ofnameOverride
in helm chart.However, the value of
app.kubernetes.io/name
in the head pod service's selector is hardcoded with the constant variableApplicationName
(= "kuberay")Related issue number
closes #571
#495
#530
Checks
Check head node service
kubectl describe svc/ray-cluster-aaaaaaaaaa-head-svc
Without this PR: