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]Run kuberay in a single namespace #258

Merged
merged 6 commits into from
Jun 2, 2022

Conversation

wilsonwang371
Copy link
Collaborator

@wilsonwang371 wilsonwang371 commented May 11, 2022

Why are these changes needed?

Run kuberay in a single namespace.

Instead of setup kuberay using

kubectl apply -k "github.com/ray-project/kuberay/manifests/cluster-scope-resources"
kubectl apply -k "github.com/ray-project/kuberay/manifests/base"

now we use

kubectl apply -k "github.com/ray-project/kuberay/manifests/cluster-scope-resources"
kubectl apply -k "github.com/ray-project/kuberay/manifests/singe-namespace"

Related issue number

#227

Checks

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

@wilsonwang371
Copy link
Collaborator Author

cc @Jeffwan @scarlet25151

@Jeffwan
Copy link
Collaborator

Jeffwan commented May 12, 2022

image

Can we revert the rename changes? The major reason is the current folder structure is from kubebuilder output. Sometimes, when we upgrade the kubebuilder etc, we still like the structure to be working and that's why we want them remain the same.

@Jeffwan
Copy link
Collaborator

Jeffwan commented May 12, 2022

For the changes here, I feel we can override the setting at the root kustomization level?
image

@Jeffwan
Copy link
Collaborator

Jeffwan commented May 12, 2022

Let's have a discussion tomorrow on this.

@wilsonwang371
Copy link
Collaborator Author

now we use kustomize to patch clusterrole clusterrolebinding with a very minimal code change.

cc @Jeffwan

bases:
- ../../base
patches:
- path: patch-cr.json
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about the name? Will we have cluster-role created in namespace scope?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this will convert all cluster-role to role with namespace.

@Jeffwan
Copy link
Collaborator

Jeffwan commented Jun 1, 2022

BTW, This is kind of tricky. Besides Kind itself, we need to make sure apiversion is correct as well. There might be other issues like CRB doesn't have namespace field but RB does.

I think it's still acceptable at this moment. Let's do the refactor later if it lack of flexibility in the future.

@DmitriGekhtman
Copy link
Collaborator

kubectl apply -k "github.com/ray-project/kuberay/manifests/cluster-scope-resources"
kubectl apply -k "github.com/ray-project/kuberay/manifests/single-namespace"

I guess an admin may be the one to run the first step. A user with restricted permissions would run the second step.

@wilsonwang371
Copy link
Collaborator Author

kubectl apply -k "github.com/ray-project/kuberay/manifests/cluster-scope-resources"
kubectl apply -k "github.com/ray-project/kuberay/manifests/single-namespace"

I guess an admin may be the one to run the first step. A user with restricted permissions would run the second step.

yes, I should make this more clear. I updated the README document

@wilsonwang371 wilsonwang371 changed the title [Feature]Run kuberay in a single namespace [WIP][Feature]Run kuberay in a single namespace Jun 1, 2022
use kustomize patch to update cluster level role and rolebinding to using a single namespace
@wilsonwang371 wilsonwang371 changed the title [WIP][Feature]Run kuberay in a single namespace [Feature]Run kuberay in a single namespace Jun 2, 2022
@Jeffwan Jeffwan merged commit a1f6dc8 into ray-project:master Jun 2, 2022
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
* single namespace support

use kustomize patch to update cluster level role and rolebinding to using a single namespace

* bug fix

* bug fix: watch namespace

* bug fix

* bug fix

* bug fix
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.

None yet

3 participants