Skip to content

Conversation

400Ping
Copy link
Contributor

@400Ping 400Ping commented Sep 20, 2025

Why are these changes needed?

  • In multi-tenancy deployments, the KubeRay operator usually runs in a dedicated namespace, while CRD instances (RayCluster, RayService, RayJob) live in tenant namespaces.
  • The current KubeRay Operator Grafana dashboard filters controller-runtime metrics and CRD metrics with the same namespace variable, so it can’t correctly display operator metrics when operator and CRDs are in different namespaces.
  • This PR introduces a new dashboard variable ControllerNamespace and switches all controller-runtime queries to use it, leaving CRD queries on the existing namespace variable.

Result: the dashboard works for both single-tenant and multi-tenant setups without breaking existing users.
Screenshot 2025-09-20 at 8 50 28 PM

Related issue number

Closes #4013

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@400Ping 400Ping marked this pull request as draft September 20, 2025 15:23
@400Ping 400Ping marked this pull request as ready for review September 22, 2025 05:19
@400Ping
Copy link
Contributor Author

400Ping commented Sep 22, 2025

This CI error doesn't seem to be related to this pr?

Copy link
Collaborator

@owenowenisme owenowenisme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
But could you please add a screenshot that demonstrates both the controller metrics and the CRD metrics being displayed correctly on the dashboard?
Your current screenshot only shows controller.
Thanks!

@400Ping
Copy link
Contributor Author

400Ping commented Sep 22, 2025

LGTM. But could you please add a screenshot that demonstrates both the controller metrics and the CRD metrics being displayed correctly on the dashboard? Your current screenshot only shows controller. Thanks!

ok, will do it later tonight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Separate controller namespace and CRD namespaces for KubeRay-Operator Dashboard
2 participants