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

[Bug] KubeRay tries to create ClusterRoleBinding when singleNamespaceInstall and rbacEnable are set to true #1186

Closed
2 tasks done
anshulomar opened this issue Jun 24, 2023 · 1 comment · Fixed by #1190
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@anshulomar
Copy link

Search before asking

  • I searched the issues and found no similar issues.

KubeRay Component

ray-operator

What happened + What you expected to happen

After #1106 and #1162 were merged, I provided the following config combination:
rbacEnable: true
crNamespacedRbacEnable: false
singleNamespaceInstall: true
watchNamespace:
- ns1

I expected KubeRay to not create cluster-scoped resources and to not create roles and rolebindings in "ns1" namespace. But I observed that KubeRay tries to create ClusterRoleBinding. Looking at the code https://github.com/ray-project/kuberay/blob/master/helm-chart/kuberay-operator/templates/rolebinding.yaml#L1-L2, it will always create a ClusterRoleBinding if rbacEnable is set to true.

Reproduction script

  1. Create a Kind cluster
  2. Install KubeRay operator via Helm and provide following config combination:
    rbacEnable: true
    crNamespacedRbacEnable: false
    singleNamespaceInstall: true
    watchNamespace:
    - ns1
  3. Observe that KubeRay tries to create a ClusterRoleBinding

Anything else

This problem occurs everytime. I think the logic for creating ClusterRoleBinding should be the same as that for ClusterRole: https://github.com/ray-project/kuberay/blob/master/helm-chart/kuberay-operator/templates/role.yaml#L1C1-L1C1.

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@anshulomar anshulomar added the bug Something isn't working label Jun 24, 2023
@anshulomar
Copy link
Author

@kevin85421 could you, please, take a look? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant