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

[Feature] Allow setting app.kubernetes.io/name in head-svc created by RayService #2648

Open
1 of 2 tasks
varunsridhar1 opened this issue Dec 13, 2024 · 2 comments
Open
1 of 2 tasks
Labels
enhancement New feature or request rayservice

Comments

@varunsridhar1
Copy link

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

Currently, when RayService creates the head-svc, it automatically assigns the app.kubernetes.io/name label to kuberay. It would be helpful to allow setting that label to a custom value.

Use case

We would like to set the name to our app name, which we use to scrape and filter logs in Loki and other places.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@varunsridhar1 varunsridhar1 added enhancement New feature or request triage labels Dec 13, 2024
@win5923
Copy link
Contributor

win5923 commented Dec 16, 2024

You can set custom labels via the headGroupSpec.template.metadata.labels, like:

headGroupSpec:
      rayStartParams:
        dashboard-host: '0.0.0.0'
      template:
        metadata:
          labels:
            app.kubernetes.io/name: test
        spec:
          containers:
            - name: ray-head
              image: rayproject/ray:2.9.0
$ kubectl get service rayservice-sample-raycluster-zhst9-head-svc -o jsonpath="{.spec.selector.app\.kubernetes\.io/name}"
test

@varunsridhar1
Copy link
Author

@win5923 That worked for me on the Ray cluster head svc, but I would like to set a custom label on the head-svc created by RayService itself (rayservice-sample-head-svc in https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/rayservice.html#step-4-verify-the-kubernetes-cluster-status). It seems like this service always has app.kubernetes.io/name set to kuberay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rayservice
Projects
None yet
Development

No branches or pull requests

3 participants