Skip to content

kuberay-apiserver should match kuberay-operator in watchNamespaces feature #27

@shaoqin2

Description

@shaoqin2

# The KubeRay operator will watch the custom resources in the namespaces listed in the "watchNamespace" parameter.
# watchNamespace:
# - n1
# - n2

This is a very useful feature installing the operator, but kuberay-apiserver does not match this behavior when using singleNamespaceInstall.

If we install apiserver, operator in namespace X and operator with watchNamespac [X, Y], trying to manage CRD in Y, the setup leads to

2023/11/22 16:56:17 could not list clusters rpc error: code = Unknown desc = List clusters failed.: List RayCluster failed in tsray: rayclusters.ray.io is forbidden: User "system:serviceaccount:default:kuberay-apiserver" cannot list resource "rayclusters" in API group "ray.io" in the namespace "Y"

Should we consider also installing the RBAC for CRD in kuberay-apiserver to a list of watchNamespace like kuberay-operator?

I'm happy to provide that PR if maintainers believe this is a reasonable request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions