-
Notifications
You must be signed in to change notification settings - Fork 47
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
py: add basic service URL resolver #421
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
39ed152
to
6cbc548
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @isinyaaa , some early 👀 for your considerations
@Al-Pragliola any thoughts on potential amendments which would not require a rolebinding or anyway any changes to the permission settings? |
6cbc548
to
7139a22
Compare
mm no, I can't think of another way to let the notebook pod interact with the k8s api-server, but I think the odh-dashboard role is a bit too permissive, we should have an ad-hoc role with only the required permissions |
Thanks @Al-Pragliola , adding to #421 (comment), what about having some "fallbacks" in case that permission is not there? Do we believe we might have some options? For example, attemping in case a list K8s resources in a set of known to be used namespaces, may require simpler/lower permissions? for example, listing MR CR instances in a set of known namespaces in case this require lower permission, or listing Services again in known namespaces, etc? |
@tarilabs if we can't get DSC it falls back to looking for the instance in the specified namespace, or the default ( |
I don't think that is viable, since there will be only 1 "upstream" pypi of the MR python client? Hence why I believe would have been preferable to adopt a fallback(s) approach |
7f65be5
to
f049130
Compare
f049130
to
92b96f1
Compare
3b3b124
to
4280577
Compare
IMO the Python library should not use any OpenShift calls directly. That brings in additional dependency on where the MR deployed into a client library. I suggest we feed this information through some kind of config or env to keep it simple, then think through how this config can be supplied. I am thinking like |
Yes, the DSC namespace discovery is an odh/rhoai feature, since there is no equivalent place to discover registries namespace in kubeflow. Although, the default MR manifests kind of make We should keep things simple and allow this capability to discover the presence of DSC CR in the client library. The Python client can simply ignore that service discovery path if DSC resource type is not present and try to lookup registries using the hostname provided by users. If we want to allow Python API to be service location agnostic, another way to do that would be by supporting an env variable for a default MR namespace, and also support specifying a direct service host. That way it can be also be injected into the notebook from a user supplied configmap (which could be cluster/env specific) if needed. |
BTW, the Python client can do this without binding to OpenShift specific APIs using the K8s unstructured generic API. |
The |
Apologies, when I mentioned OpenShift in general I was referring to Kube. saying in general Python client should not make any assumptions on where the MR is hosted IMO. Thinking more in terms of what you said above
then make some other automation happen to provide the config/env based on environment. |
similar pattern by MLFlow https://mlflow.org/docs/latest/model-registry.html#id10 |
I believe this is the link you wanted: https://mlflow.org/docs/latest/model-registry.html#databricks-unity-catalog-model-registry (the original link is an entry in a TOC) Sounds nice and following up from #447 (comment) , what about using something analogous to Viper on the Go side, like https://pypi.org/project/12factor-configclasses/ that would support said injection? This way:
|
Signed-off-by: Isabella do Amaral <idoamara@redhat.com>
Signed-off-by: Isabella do Amaral <idoamara@redhat.com>
Signed-off-by: Isabella do Amaral <idoamara@redhat.com>
4280577
to
c01f397
Compare
Description
Adds a simple constructor that resolves cluster service URLs.
How Has This Been Tested?
Tested with the latest UI using a MR deployed directly through the settings panel.
The client then connects:
and creates a new MV:
Change was reflected on the UI as expected:
Merge criteria:
DCO
check)If you have UI changes