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

Introduce services.opendatahub.io api group #1389

Conversation

VaishnaviHire
Copy link
Member

@VaishnaviHire VaishnaviHire commented Nov 25, 2024

Description

This PR includes following changes:

  1. Initialize services.opendatahub.io api group and Monitoring API
  2. Generalize ComponentReconciler --> Reconciler
  3. Update components.opendatahub.io/part-of label --> platform.opendatahub.io/part-of

How Has This Been Tested?

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 14.28571% with 42 lines in your changes missing coverage. Please review.

Please upload report for BASE (feature-operator-refactor@15ca54e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pkg/controller/reconciler/reconciler_support.go 0.00% 21 Missing ⚠️
pkg/controller/reconciler/reconciler.go 0.00% 11 Missing ⚠️
...ctions/render/kustomize/action_render_manifests.go 16.66% 3 Missing and 2 partials ⚠️
...actions/render/template/action_render_templates.go 16.66% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##             feature-operator-refactor    #1389   +/-   ##
============================================================
  Coverage                             ?   26.37%           
============================================================
  Files                                ?       65           
  Lines                                ?     5210           
  Branches                             ?        0           
============================================================
  Hits                                 ?     1374           
  Misses                               ?     3674           
  Partials                             ?      162           

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

type ServiceObject interface {
client.Object
WithStatus
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR, but we can probably move the Status, WithStatus, ServiceObject to a shared packages and reuse it across all our at least internal APIs

object components.ComponentObject,
) (*ComponentReconciler, error) {
// NewReconciler creates a new reconciler for the given type.
func NewReconciler[T client.Object](mgr manager.Manager, name string, object T) (*Reconciler[T], error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need generics ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we should add a check to allow only ComponentObject and ServiceObject?

Copy link
Contributor

@lburgazzoli lburgazzoli Nov 28, 2024

Choose a reason for hiding this comment

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

if we merge ServiceObject and ComponentObject as per #1389 (comment), then we can maybe just use the new type ?

Copy link
Member Author

Choose a reason for hiding this comment

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

In that case, I will update the PR to merge the 2 objects

@lburgazzoli
Copy link
Contributor

Quickly skimmed through the code and beside some minor comments, looks ok

Copy link
Member

@zdtsw zdtsw left a comment

Choose a reason for hiding this comment

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

two questions:

  1. what is dscmonitorings?
  2. do we want this service to be created for all ODH+RHOAIs ?

@VaishnaviHire
Copy link
Member Author

VaishnaviHire commented Dec 2, 2024

two questions:
what is dscmonitorings?

Its same as in components https://github.com/opendatahub-io/opendatahub-operator/blob/feature-operator-refactor/apis/components/v1/dashboard_types.go#L92 . It contains all the fields as exposed in the DSCI spec

  1. do we want this service to be created for all ODH+RHOAIs ?

The Monitoring object will only be created only when managementState is set to Managed for monitoring in DSCI. We are not changing any operator behavior yet i.e the manifests will only get deployed when it's a Managed RHOAI. Moved manifests upstream to have same code upstream and downstream.

Copy link
Contributor

Choose a reason for hiding this comment

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

this can be renamed too

@lburgazzoli
Copy link
Contributor

Just a small comment, that can be fixed in another branch, but LGTM, @zdtsw ?

@zdtsw
Copy link
Member

zdtsw commented Dec 3, 2024

Just a small comment, that can be fixed in another branch, but LGTM, @zdtsw ?

in general, LGTM,

but these should be removed:

  • config/rbac/services_dscmonitoring_editor_role.yaml
  • config/rbac/services_dscmonitoring_viewer_role.yaml

then renegerate bundle

  • bundle/manifests/services.opendatahub.io_monitorings.yaml
  • bundle/manifests/opendatahub-operator.clusterserviceversion.yaml
  • bundle/manifests/dscinitialization.opendatahub.io_dscinitializations.yaml

@VaishnaviHire
Copy link
Member Author

@lburgazzoli @zdtsw Addressed your last comments

@openshift-ci openshift-ci bot added the lgtm label Dec 3, 2024
Copy link

openshift-ci bot commented Dec 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zdtsw

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-ci openshift-ci bot added the approved label Dec 3, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 970b40b into opendatahub-io:feature-operator-refactor Dec 3, 2024
10 checks passed
MarianMacik pushed a commit to MarianMacik/opendatahub-operator that referenced this pull request Jan 22, 2025
…flux/component-updates/odh-ml-pipelines-scheduledworkflow-v2-v2-17

chore(deps): update odh-ml-pipelines-scheduledworkflow-v2-v2-17 to dda4a87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants