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

RC Controller - Avoid multiple calls to DiscoveryAPI #510

Merged

Conversation

ChristianZaccaria
Copy link
Contributor

@ChristianZaccaria ChristianZaccaria commented Apr 11, 2024

Issue link

Jira: https://issues.redhat.com/browse/RHOAIENG-5333

What changes have been made

  • In the support file, we are separating concerns between what is needed for OpenShift and KinD clusters. I.e., ingressHost is only required for ingresses.
  • Added isOpenShiftInitalized variable - Its purpose is to ensure that when checking if the cluster type is OpenShift, this check and call to the DiscoveryAPI is only performed once.
  • Accessing KubeRay configuration directly.

Verification steps

Overall functionality remains the same.

On OpenShift:

  1. Login to your OpenShift cluster.
  2. Run KubeRay v1.1.0 - Install doc
  3. Run the CFO locally against the cluster with make run NAMESPACE=somenamespace
  4. Run Kueue: deploy Kueue with kubectl apply --server-side -k "github.com/opendatahub-io/kueue/config/rhoai?ref=dev"
  5. Create ClusterQueue, LocalQueue, and ResourceFlavor if not done already.
  6. Install the latest SDK from main branch.
  7. Attempt to create a RayCluster in a notebook with:
cluster = Cluster(ClusterConfiguration(
    name='jobtest',
    namespace='default', # or localqueue namespace
    num_workers=1,
    min_cpus=1,
    max_cpus=1,
    min_memory=2,
    max_memory=2,
    num_gpus=0,
    write_to_file=True,
    image="quay.io/project-codeflare/ray:latest-py39-cu118"
))
  1. RayCluster pods should be created, and the RayCluster controller in the CFO should successfully create an accessible dashboard route.

On KinD:
Same steps as for OpenShift, except we shall turn OAuth to false to enable RC Controller to create ingresses instead.

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

@sutaakar
Copy link
Contributor

Looks fine, just one comment above.
The changes in config will nicely help with component test refactoring.

Copy link
Contributor

@sutaakar sutaakar left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Apr 12, 2024
Copy link

openshift-ci bot commented Apr 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sutaakar

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

@openshift-merge-bot openshift-merge-bot bot merged commit da57f8c into project-codeflare:main Apr 12, 2024
7 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.

None yet

2 participants