-
Notifications
You must be signed in to change notification settings - Fork 59
Fixed get_cluster() method #432
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
Fixed get_cluster() method #432
Conversation
Why does |
The We use the Ray cluster spec This is necessary as we plan to reintroduce routes in #407 and we will not be supplying domains for them as OpenShift does so automatically. Alternatively we could go under the assumption that the ingress is created successfully and use |
|
@Bobbins228 I am still not sure what do you need the domain for when calling Do you need domain to compute what is the Dashboard URL, or is there any other reason? |
|
@sutaakar To create this app wrapper we need all required fields to be fulfilled in the case of Kind clusters
|
|
@Bobbins228 What will happen in case user fills some random value as |
|
@sutaakar It is not ideal hence the suggestion to first check for the ingress in the namespace and gather the domain from the host before asking for the |
|
Yeah, I'm not a huge fan of this either. Could you add an annotation to the ray-cluster that has the ingress domain and then get it directly from there? |
|
Another option could be to assign an owner for Ingress/Route (if it doesn't have) and use it to query for Ingress belonging to the AppWrapper or Ray cluster. |
|
@KPostOffice @sutaakar We now get the appwrapper object and extract the domain from the ingress Host when You no longer have to provide the |
|
@sutaakar I was able to apply the owner functionality in relation to ray clusters created with app wrappers but ingresses created when |
|
When does the Edit - It is provided as a parameter for ClusterConfiguration. |
|
@sutaakar |
|
hmm, so SDK creates RayCluster CR directly. Would it have sense to add owner for Secret and Ingress pointing to RayCluster CR? From my perspective they are coupled together (there is no reason for Secret or Ingress to exist outside of RayCluster CR lifecycle)? |
|
@sutaakar To add a owner reference I need to add in the uid of the ray cluster right? |
|
@Bobbins228 Right, uid is required. |
|
@sutaakar We won't be able to apply the uid of the Ray Cluster to the ingress because it is created when the rc is up. Ingresses and secrets are created at the same time. For the case of |
5c53009 to
418aec5
Compare
|
/lgtm |
|
@Srihari1192 do you want to review the PR too? |
Sure will take a look |
|
@Bobbins228 @sutaakar I have noticed below error when testing with this changes in this PR at step get_cluster('mnist',namespace)
|
|
@Srihari1192 |
|
@Bobbins228 Yes the Ingress_options is set same as in sdk test here and also i tried verifying existing sdk tests same error here aswell https://github.com/project-codeflare/codeflare-operator/actions/runs/7406823001/job/20151892482?pr=424 |
|
@Srihari1192 What is put in place of the host for |
It will be set based on the cluster type here https://github.com/project-codeflare/codeflare-operator/pull/424/files#diff-572dd9104509ce659f6f38075e4ad54935cb91373ab4a03c3a05eaa91f4c39c8R190-R206 |
|
@Srihari1192 I will have a look further to see if there is a better way to extract the ingress domain from the host. |
Srihari1192
left a comment
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.
Tested the changes here looks good
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KPostOffice, Srihari1192 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 |
Issue link
Closes #431
What changes have been made
Ingresses have the label
ingress-owner: appwrapperwhich is used to identify them.When
mcad=Truethe SDK gets the the ownership reference from the ingress object to identify and check it is a match with the appwrapper name.When
mcad=Falsethe ingresses are listed and the domain is gathered from the ingress with theingress-ownerlabel.For both scenarios the ingress domain is extracted from the host of the ingress.
Included steps to recreate scenarios where ingress_options are set.
Fixed missing ingress creation steps for the
_component_resources_upand_component_resources_downfunctions for cases whenmcad=False.Verification steps
Run through a demo notebook and create a Ray Cluster on Kind and OpenShift.
run
cluster = get_cluster(name, namespace)cluster.down()and othercluster.commands should work.Create a Ray Cluster on Kind with ingress options set see here.
Run
cluster = get_cluster(name, namespace)Create a Ray cluster with
mcad=Falsean ingress should be created now andget_cluster()should work too.Checks