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

Add label to RayCluster if owned by AppWrapper #771

Closed

Conversation

ChristianZaccaria
Copy link
Collaborator

Issue link

Part of: https://issues.redhat.com/browse/RHOAIENG-14731

What changes have been made

  • When AppWrapper is True in ClusterConfiguration, a label is added to the RayCluster on creation.

This change is required to identify if the RayCluster is owned by an AppWrapper.

Verification steps

Checks

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

Copy link
Contributor

openshift-ci bot commented Nov 21, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from christianzaccaria. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ChristianZaccaria ChristianZaccaria requested review from varshaprasad96 and Bobbins228 and removed request for KPostOffice and Fiona-Waters November 21, 2024 12:17
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.05%. Comparing base (003a287) to head (941e1e3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #771   +/-   ##
=======================================
  Coverage   93.04%   93.05%           
=======================================
  Files          36       36           
  Lines        2402     2404    +2     
=======================================
+ Hits         2235     2237    +2     
  Misses        167      167           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@@ -207,6 +207,9 @@ def get_labels(cluster: "codeflare_sdk.ray.cluster.Cluster"):
if cluster.config.labels != {}:
labels.update(cluster.config.labels)

if cluster.config.appwrapper is True:
labels.update({"resource.owner": "appwrapper"})
Copy link
Contributor

Choose a reason for hiding this comment

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

Would we do better with app.kubernetes.io/managed-by: appwrapper?
Seems to be the recommended labeling scheme

@ChristianZaccaria
Copy link
Collaborator Author

Closed as not required, AppWrapper ownerReference is added before creation.
[Link]

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.

2 participants