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

Enable istio support for ray #2847

Conversation

hansinikarunarathne
Copy link
Member

@hansinikarunarathne hansinikarunarathne commented Aug 17, 2024

Pull Request Template for Kubeflow manifests Issues

✏️ A brief description of the changes

I enable Istio in ray
I followed the steps in https://docs.ray.io/en/latest/cluster/kubernetes/k8s-ecosystem/istio.html#step-4-create-the-raycluster except the step 3.

image
image
image
inside the notebook

🐛 If this PR is related to an issue, please put the link to the issue here.

#2742

✅ Contributor checklist


You can join the CNCF Slack and access our meetings at the Kubeflow Community website. Our channel on the CNCF Slack is here #kubeflow-platform.

@juliusvonkohout juliusvonkohout changed the title Enable istio support for the ray Enable istio support for ray Aug 23, 2024
@juliusvonkohout
Copy link
Member

@alex-treebeard @kevin85421 @wadhah101 can you take a look as well, since you contributed here before?

@juliusvonkohout juliusvonkohout self-assigned this Aug 26, 2024
@hansinikarunarathne hansinikarunarathne force-pushed the feature-enable-istio-for-rayCluster branch 3 times, most recently from 11c31f5 to 7cfe7eb Compare September 9, 2024 20:12
@hansinikarunarathne
Copy link
Member Author

did the requested changes. please review @juliusvonkohout

Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
Signed-off-by: hansinikarunarathne <hansini.20@cse.mrt.ac.lk>
- from:
- source:
principals:
- "cluster.local/ns/kubeflow-user-example-com/sa/kubeflow-raycluster"
Copy link
Member

Choose a reason for hiding this comment

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

This must be generic. The namespace could also have another name that you do not know in advance. The same manifests should work for different users.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a way to templating that namespace value without using helm?

Copy link
Member

@juliusvonkohout juliusvonkohout Sep 14, 2024

Choose a reason for hiding this comment

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

The Serviceaccount is wrong. It should be default-editor everywhere. Especially in the raycluster itself.

You can take a look at https://istio.io/latest/docs/reference/config/security/authorization-policy/ for ideas and ask gpt4. Maybe you can just whitelist the whole namespace.

I do not need templating, but a general solution that just works without manual effort.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it only enough to generalize the service account name(with default-editor)? Because since we are deploying it in a namespace, we have to specify the namespace to give the access to only for that specific namespace(kubeflow-user-example in this case)

Copy link
Member

Choose a reason for hiding this comment

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

No the other way around. We need to generalize the namespace. It would be alright to allow all serviceaccounts or all pods from the namespace. But the deployments should still run as default-editor. This must be deployable without manual changes per namespace.

Copy link
Member

Choose a reason for hiding this comment

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

Are you setting the default-editor in the raycluster resource itself?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added the default-editor service account to the deployment.

We need to generalize the namespace.

This means should I add like this,
cluster.local/ns/kubeflow-user-example-com/sa/*

Copy link
Member Author

Choose a reason for hiding this comment

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

I did the changes . @juliusvonkohout

contrib/ray/test.sh Outdated Show resolved Hide resolved
contrib/ray/raycluster_example.yaml Show resolved Hide resolved
Signed-off-by: Hansini Karunarathne <107214435+hansinikarunarathne@users.noreply.github.com>
Signed-off-by: Hansini Karunarathne <107214435+hansinikarunarathne@users.noreply.github.com>
Signed-off-by: Hansini Karunarathne <107214435+hansinikarunarathne@users.noreply.github.com>
@juliusvonkohout
Copy link
Member

juliusvonkohout commented Sep 27, 2024

Please remove the part of "## Step 3: Create a namespace" in a follow up PR. There shall be no manual namespace creation. All of this is handled by kubeflow profiles.

@juliusvonkohout
Copy link
Member

/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label Sep 27, 2024
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: juliusvonkohout

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 944e829 into kubeflow:master Sep 27, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants