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

feat: Add ModelRegistry component (#775) #776

Merged
merged 11 commits into from
Feb 1, 2024

Conversation

dhirajsb
Copy link
Contributor

@dhirajsb dhirajsb commented Dec 5, 2023

Description

This PR adds ModelRegistry as a component to the ODH operator.

How Has This Been Tested?

Tested with sample DSC CR including the new

spec:
  components:
    modelregistry:
      managementState: "Managed"

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • 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

openshift-ci bot commented Dec 5, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@dhirajsb
Copy link
Contributor Author

dhirajsb commented Dec 5, 2023

/test all

@dhirajsb
Copy link
Contributor Author

dhirajsb commented Dec 5, 2023

/test all

@dhirajsb dhirajsb marked this pull request as ready for review December 5, 2023 20:52
@dhirajsb
Copy link
Contributor Author

dhirajsb commented Dec 5, 2023

@VaishnaviHire any ideas why the e2e tests are failing?

tests/e2e/dsc_creation_test.go Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot added the lgtm label Dec 11, 2023
@tarilabs tarilabs removed their assignment Dec 11, 2023
@openshift-ci openshift-ci bot removed the lgtm label Dec 20, 2023
@dhirajsb
Copy link
Contributor Author

dhirajsb commented Dec 20, 2023

@LaVLaS @VaishnaviHire can you please review this PR? I've verified manually that the odh operator is able to deploy the model-registry-operator and it can create model-registry instances in projects.

@dhirajsb
Copy link
Contributor Author

dhirajsb commented Jan 8, 2024

/retest

@dhirajsb
Copy link
Contributor Author

dhirajsb commented Jan 9, 2024

@VaishnaviHire any ideas why the servicemesh unit test is failing?

@dhirajsb
Copy link
Contributor Author

@zdtsw any pointers to why the unit test is failing for servicemesh test?

@dhirajsb
Copy link
Contributor Author

/retest

components/modelregistry/modelregistry.go Show resolved Hide resolved
components/modelregistry/modelregistry.go Show resolved Hide resolved
config/rbac/role.yaml Outdated Show resolved Hide resolved
config/rbac/role.yaml Outdated Show resolved Hide resolved
@zdtsw
Copy link
Member

zdtsw commented Jan 15, 2024

@zdtsw any pointers to why the unit test is failing for servicemesh test?

did re-run, looks like a one-off thing

@dhirajsb dhirajsb force-pushed the modelregistry-incubation branch 2 times, most recently from 426c2ae to 9634283 Compare January 15, 2024 17:07
@dhirajsb
Copy link
Contributor Author

dhirajsb commented Feb 1, 2024

@VaishnaviHire, we'll stay on the model registry main version on incubation branch. Please merge this PR. TIA

@zdtsw zdtsw merged commit 112d3f1 into opendatahub-io:incubation Feb 1, 2024
6 of 7 checks passed
@dhirajsb dhirajsb deleted the modelregistry-incubation branch February 1, 2024 16:53
VaishnaviHire added a commit that referenced this pull request Feb 2, 2024
* add table of contents to readme (#769)

* Makefile: add clean target (#733)

Add `make clean` which removes build artefacts. At the moment it's
./bin, ./odh-manifests/* and cover.out from test target.

Do not remove odh-manifests directory since it is commited to VCS.

In the recipe chown of $(LOCALBIN) since setup-envtest makes its dir
RO for some reason [1].

Related: #696

[1] https://github.com/kubernetes-sigs/controller-runtime/blob/main/tools/setup-envtest/store/store.go#L191

Signed-off-by: Yauheni Kaliuta <[email protected]>

* chore: keeps repositories in the tmp dir (#774)

* chore: cleanup owns on RS,Pod, daemonset, CRD (#777)

* chore: cleanup owns on RS,Pod, daemonset, CRD
* cleanup: remove developmentconfig not in use
* chore: move rbac into one file and remove duplicated one

---------
Signed-off-by: Wen Zhou <[email protected]>

* Update incubation with downstream changes (#783)

* fix(oauth-dashboard): update APIversion when patch oauth-client (#136)

add more comment and error message

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit d688f25)

* Update kube-aggregator version

(cherry picked from commit a0c7864)

* fix(kserve): check on multiple depends operators if all pre-installed (#744) (#119)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 57c4b82)

* [backport]: changes from rhods_2.4 to rhods_2.5 (#129)

* [cherry-pick]: split workbenches image into 2 params.env file

Signed-off-by: Wen Zhou <[email protected]>

* Update opendatahub label

(cherry picked from commit 3e975f9)
(cherry picked from commit 9f8b649)

* Update Codeflare manifests path

(cherry picked from commit 014396c)
(cherry picked from commit 5f1c0d4)

* Move creation of default DSC

(cherry picked from commit ab33109)
(cherry picked from commit 00ddd6c)

* update(manifests): enable kserve, modelmesh and workbenches

- dashboard and modelmesh-monitoring still from odh-manifests

Signed-off-by: Wen Zhou <[email protected]>

* Fix cherry-pick for dsci

* fix(mm): set the new logic for modelmesh

Signed-off-by: Wen Zhou <[email protected]>

* Fix the KF deployment:

* fix(monitoring): do the switch for dev mode to not send alert

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 001cad1)

* refactor: reduce alert level for codeflare operator

* Update(manifests): for monitoring

- remove https:// for dashbaord target
- add nwp from odh-deployer
- fix: wrong service name for operator, this is defined in CSV
- port: do not use https but 8080

Signed-off-by: Wen Zhou <[email protected]>

* Fix manifests for monitoring

(cherry picked from commit 85883f102bc15f2343c0f6afe253a29a4ff3f64f)

* Revert changes to prometheus port

Changes to prometheus port makes the route inaccessible

* fix rebase

* fix(dsci): missing label on namespaces (#98)

- add SM which is in modelmesh-monitroing into operator monitoring
- add roles which are in modelmesh-monitoring into ours too
- apply 3 labels to both monitoring and application namespace (which is v1 doing)

Signed-off-by: Wen Zhou <[email protected]>

* fix(monitoring): typo (#101)

Signed-off-by: Wen Zhou <[email protected]>

* update(monitoring)

- remove hardcoded app. namespace in segment manifests
- remove hardcoded monitoring. namepsace in base manifests
- add placeholder to inject monitoring namespace in Servicemonitor

Signed-off-by: Wen Zhou <[email protected]>

* uplift: package version

- github.com/operator-framework/operator-lifecycle-manager/releases/tag/v0.26.0
- github.com/openshift/api to latest v0.0.0

Signed-off-by: Wen Zhou <[email protected]>

* Remove odh csv

* fix(crd): do not set ownerreference on CRD (#725)

-  we covered the case when set component from Managed to Remvoe
-  this is to cover the case when set have component as Managed and
delete DSC CR
- so if we do not set at first it wont get deleted

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit e9461e0)

* Fix DSCI Patch

* update(monitoring): metrics (#107)

* update(monitoring):

- add log in pod for QE to see it is dev mode cluster
- add two metrics:
	i do not think they are used in this config
	but they are presented in v1 config , so i add back
- move recording for workbench to correct rule file
- remove operator-alerting.rules it is not used in v1 to keep it simple

- fix: openshift-monitoring is using web as port name and our port

- add more comments for the config  and comments out not needed config
- add egress for odh monitoring and add cluster monitoring NS for ingress

- keep rhdos_aggerate_avaiablity from proemtehusrules along with 2 users
   reason for this is: PSI does not get non openshift-* or kube-* NS metrics to cluster-monitoring prometheus. as
cluster-monitoring prometheus-k8s only use prometheusrule not serivcemonitor ?

-  from test result:
	if our monitoring ns not set cluster-monitoring, there is no targets on federation2 and no rhods_aggreated_in metrics

- fix(monitoring): removed duplicated alerts of dashboard in workbenches

- add UWM ns for operator ingress

- according to doc: when enable UWM should not have custom Prometheus, this might be the conflicts why we cannot see metrics from odh monitoring in cluster-monitoring prometheus?

Signed-off-by: Wen Zhou <[email protected]>

* Remove DSCI explicit naming

* Fix regression in Prometheus Deployment

* Remove os.exit for custom functions

* Delete legacy blackbox exporter

* fix(monitoring): add missing role and rolebinding for prometheus (#112)

Signed-off-by: Wen Zhou <[email protected]>

* fix(monitoring): missing add new files into kustomization (#113)

Signed-off-by: Wen Zhou <[email protected]>

* cleanup(monitoring): after previous 2 commits this is not needed/useful (#114)

Signed-off-by: Wen Zhou <[email protected]>

* fix(monitoring): do not set odh monitoring namespace when apply for  manifests in "monitoring/base" (#115)

* fix(monitoring):  not set our monitoring when apply to monitoring/base folder
- hardcode our monitoring namespace for all needed manifests

Signed-off-by: Wen Zhou <[email protected]>

* revert: label changes made in upgrade PR

Signed-off-by: Wen Zhou <[email protected]>

* fix(monitoring): cannot load dashbaord record rules (#123)

Signed-off-by: Wen Zhou <[email protected]>

* fix(monitoring): when DSC is removed entry in rule_files should be
cleanedup

- match does not work with * in the string need to use (.*)
- add (-) in the front for diffientiate the rule_file or the real rules

Signed-off-by: Wen Zhou <[email protected]>

* cherry-pick: edson's rhods-12939 from odh + debug + timeout tuning

comnent out ExpointialBackoffWithContext for now to test
not add v2 into markedDeletion list

Signed-off-by: Wen Zhou <[email protected]>

* fix(upgrade): modelmesh monitoring deployment need deletion as well

Signed-off-by: Wen Zhou <[email protected]>

* fix: add statefulset

Signed-off-by: Wen Zhou <[email protected]>

* cherrypick: upstream 748 fix no reconcile when no error return

Signed-off-by: Wen Zhou <[email protected]>

* RHODS-12956: removing CR update from the operator reconciliation loop to avoid infinite loop (#128)

* chore

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Vaishnavi Hire <[email protected]>
Co-authored-by: Dimitri Saridakis <[email protected]>
Co-authored-by: Edson Tirelli <[email protected]>
(cherry picked from commit 81ebc87)
(cherry picked from commit 7525f99)

* fix(rebase): in previous commits (#131)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 15b2db8)
(cherry picked from commit 0062ba3)

* [rhods-2.5] Add Predicate for Prometheus Configmap (#134)

* Add Predicate for Prometheus Configmap

(cherry picked from commit 35f4136)

* fix(linter)

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>
(cherry picked from commit 6ecf2b5)
(cherry picked from commit deeccb7)

* fix(monitoring): only set prometheus as part-of label from component (#135)

this will reduced necessary updates on configmap

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 13c28ec)
(cherry picked from commit b809260)

* update: set kserve  as Managed by default DSC (#130)

- keep modelmesh in clean install removed(flip from previous managed)
- keep modelmesh from old version as-was
set OSSM and serving both as default Managaed
- update docs with default status and missing new components
- fix nilpointer in DSCI

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit f7c2713)
(cherry picked from commit 4f3cd66)

* fix(monitoring): do not add component rules till service is up (#137)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit d85efc5)
(cherry picked from commit 8cca478)

* fix(secret): do not delete secret if cannot find (#140)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 60f0419)
(cherry picked from commit 5e3731b)

* chore: typo (#141)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 0f9fe32)
(cherry picked from commit b8926f7)

* Add defaults for Kserve for new install

(cherry picked from commit 8bd2782)
(cherry picked from commit 81433ba)

* Revert "Update defaults for modelmesh" (#146)

(cherry picked from commit e5a27c4)
(cherry picked from commit 7389619)

* fix(mm-monitoring): revert the code logic but set to disable as delete (#153)

Signed-off-by: Wen Zhou <[email protected]>

fix(dsc): stop watching validationwebhook for non-create/delete events (#150)

* fix(dsc): stop watching validationwebhook for non-create/delete events
* update: remove CRD in the DSC watch and cleanup debug
* fix: add more ignore on the label changes
---------

Signed-off-by: Wen Zhou <[email protected]>

Revert "Remove modelmesh monitoring"

This reverts commit 91dd78f.

fix(modelmesh): remove wrong check on the deployment of modelmesh (#148)

Signed-off-by: Wen Zhou <[email protected]>

Retain existing DSCI values

Explicilty add Servicemesh in default dsci

Update defaults for modelmesh

(cherry picked from commit 6eb6d4a)
(cherry picked from commit a4788f3)

* fix: update default name for DSC in initialization-resource

- add missing default config for serving of kserve in sample
- set modelmesh in sample and init as Managed

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 633d9f6)

* fix: do not force check if servicemesh is set to managed in DSCI (#154)

* fix: do not force check if servicemesh is set to managed in DSCI

Signed-off-by: Wen Zhou <[email protected]>

* update: add supported value for serverless and servicemesh

- currently removed and unmanaged are the same logic

Signed-off-by: Wen Zhou <[email protected]>

* update: do not remove resources if it has label

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 3a672d4)

* Fix lint

* fix: rebase incubation

Signed-off-by: Wen Zhou <[email protected]>

* cherry-pick: red-hat-data-services#157

Signed-off-by: Wen Zhou <[email protected]>

* fix: for ODH to resolve
https://issues.redhat.com/browse/RHOAIENG-157

Signed-off-by: Wen Zhou <[email protected]>

* update: CSV

Signed-off-by: Wen Zhou <[email protected]>

* fix: linter

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>

* update(kserve): add monitoring logic (#782)

Signed-off-by: Wen Zhou <[email protected]>

* chore(mesh): Use third party service account tokens (#767)

This should allow Service Mesh to run on any OpenShift flavor.

Fixes opendatahub-io/kserve#138

Signed-off-by: Edgar Hernández <[email protected]>

* chore: change log info for monitoring patch namespace (#787)

Signed-off-by: Wen Zhou <[email protected]>

* fix devflags empty object (#659)

- change DefFlags to pointer type , see reason from example: https://www.sohamkamani.com/golang/omitempty/
- change both in DSC and DSCI

* feature: add support for unmanaged and remove for servicemesh and serverless (#781)

* feature: add support for unmanaged and remove for servicemesh and
serverless

Signed-off-by: Wen Zhou <[email protected]>

* Update components/kserve/kserve.go

Co-authored-by: Bartosz Majsak <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Bartosz Majsak <[email protected]>

* fix(rbac): missing get verbs on MWC and Secret (#789)

- this is causing MWC CR from kserve did not get cleaned up when kserve is Removed

Signed-off-by: Wen Zhou <[email protected]>

* fix(nilpointer): when more than one DSCI CR in cluster (#756)

* fix(nilpointer): when more than one DSCI CR in cluster

- use the one with ealiest timestamp as the default one
- suggest user to delete other CR but only use default one
- only set the extra/wrong DSCI in Error status

Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Bartosz Majsak <[email protected]>

* chore: change label name (#790)

- use a more generaic label than bind to namespace name

Signed-off-by: Wen Zhou <[email protected]>

* Remove lavlas from OWNERS (#791)

* feat(linters): Enable all linters by default. (#692)

* fix(builder): initializes rest config before invoking any partial builder (#792)

This way we can obtain interact with the cluster from partial builders instead of defering it to Apply phase.

* update(dsci): do not create default DSCI CR if it is running in  ODH (#770)

* update(dsci): do not create default DSCI CR if it is ODH

- the change is done without code logic but only set the env varible
   DISABLE_DSC_CONFIG in the CSV
- to keep the old logic (let operator auto create DSCI CR): remove this variable from CSV and restart pod. OR use API to not set this variable in subscription

* cleanup: initialization-resource in CSV

- since we do not create DSCI CR automatically, should not have required
on DSC CR

* test(e2e): add test for DSCI CR

---------

Signed-off-by: Wen Zhou <[email protected]>

* chore: shifts FeatureTracker creation to Feature's Apply phase (#795)

* fix(mesh): disables default network policy management (#798)

* fix: disables default network policy management

* fix: returns correct error

Co-authored-by: Wen Zhou <[email protected]>

---------

Co-authored-by: Wen Zhou <[email protected]>

* Fix [Snyk][CVE-2022-3064] [High] github.com/go-yaml/yaml - DOS vulnerability (#799)

* fix: Ensure Wait function waits for pods to appare in given namespace (#803)

When the Wait function is called to wait for e.g. the expected outcome of another operator,
the operator might take longer then the initial interval time of 2s to create a pod.
In this scenario the Wait function would get 0 Pods returned from the API Server to check
the state of and assume all is done.

Ensure we at least get a pod count higher then 0 before we return successful. This gives
the other operator our 5min deadline to create and start the pod(s).

* fix(service-mesh): ensures SMCP is available before patching network policy (#805)

* chore: swaps errors.Wrap to fmt.Errorf (#807)

* fix(service-mesh): reverts disabling network policy management (#809)

* fix(service-mesh): reverts disabling network policy management

* fix(lint): removes unused test code

* feat(templates): process Feature templates in memory (#797)

Co-authored-by: Bartosz Majsak <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>

* fix: ensures cleanup of associated `FeatureTracker`s (#812)

* test: adds failing test to cover missconfigured tracker and cleanup logic

* fix: ensures cleanup of associated FeatureTracker

* chore(test): extracts secret creation to its own func

* chore: uses addCleanup func

* feat: enhances FeatureTracker with spec (#808)

* feat: enhances FeatureTracker with spec (#17)

* initial add tracker spec

* update tests, update crd

* add omitempty to origin struct

* undo accidental tag change

* re add empty line

* move pointer operator

* add testing

* lint

* re-lint changes

* add ownertype, move newOrigin() to shared util

* Update apis/features/v1/features_types.go

Co-authored-by: Bartosz Majsak <[email protected]>

* remove origin from featureinitializer

* modify kserve sm step to match dashboard's

* make dsci servicemesh setup like dashboard's

* fix merge issues, lint

---------

Co-authored-by: Bartosz Majsak <[email protected]>

* restore testing mistakenly removed in merge

* satisfy linter post merge conflicts

* fix linter post merge

* fix post merge issue

* split For() into With + DefinedBy

* rename origin to source, definedby to from

---------

Co-authored-by: Bartosz Majsak <[email protected]>

* feat: add status/conditions to FeatureTrackers (#801)

Co-authored-by: Bartosz Majsak <[email protected]>

* fix: fix e2e test error handling for https://issues.redhat.com/browse/RHOAIENG-2219 (#817)

* fix(serverless): Patch to enable Secret filtering in KNative Serving (#814)

This prevents KNative's net-istio pods from being OOMKilled in environments with a large number of Secrets.

This would patch a Managed installation. Custom installations would be left untouched.

Signed-off-by: Edgar Hernández <[email protected]>

* (backport): wrong CR name in the message. (#813)

Signed-off-by: Wen Zhou <[email protected]>

* update(trusty): Change TrustyAI `apiGroup` (#823)

See trustyai-explainability/trustyai-service-operator#169

* Update go.mod

* revert go mod (#828)

* [backport]trustyai: monitoring (#824)

Signed-off-by: Wen Zhou <[email protected]>

* RHOAIENG-965: Fix ODH Upgrade after label updates (#822)

* fix(trustyai): missing overwrite for the devFlag on component level (#816)

- this will be able to test live build if set devFlags on the Trustyai
with downstream RHOAI build

Signed-off-by: Wen Zhou <[email protected]>

* update(trusty): set to GA (#810)

Signed-off-by: Wen Zhou <[email protected]>

* add openshift ci build root image configuration (#825)

* Makefile: generate config/manager/kustomization.yaml (#728)

There is a modification, `kustomize edit` of this file on deploy and
bundle targets. Since the file is stored in the version control it
pollutes `git status` and `git commit -a`.

Store only "template" in the VCS and generate the file at the build
time.

Move it to a separate target to not repeat yourself.

It will check the target for more other targets than before, but it
should not make any harm.

Make it phony to generate the file every time for the case of
changing IMG variable.

Signed-off-by: Yauheni Kaliuta <[email protected]>

* Makefile: generate default image name based on current user (#730)

It's a bit tedeous to supply IMG for barely every `make` call so
make it contstructed by Makefile itself based on the current user.

The default image name will be quay.io/$(USER)/opendatahub-operator:latest
if USER environment variable is not empty.

It's still possible to amend the generation with variables:

IMAGE_OWNER - as before, uses value as quay.io space.
IMG_TAG - use the tag instead of `latest`. The variable name is
  chosen because of IMG variable.
IMG - as before, use the complete image name

In the assignments '?=' replaced/used by '=' to not mess up with the
environment by accident since the names are pretty generic (it's
always possible to use `make -e` for those who wants).

It should not make problems with CI since it uses the names
directly [1] using our csv [2]. To push the image it uses workflow
[3] (code [4]).

Related: #696

[1] https://github.com/openshift/release/blob/master/ci-operator/config/opendatahub-io/opendatahub-operator/opendatahub-io-opendatahub-operator-incubation.yaml#L24
[2] https://github.com/opendatahub-io/opendatahub-operator/blob/incubation/bundle/manifests/opendatahub-operator.clusterserviceversion.yaml#L1678
[3] https://github.com/openshift/release/blob/master/ci-operator/config/opendatahub-io/opendatahub-operator/opendatahub-io-opendatahub-operator-incubation.yaml#L47
[4] https://github.com/openshift/release/blob/master/ci-operator/step-registry/opendatahub-io/ci/image-mirror/opendatahub-io-ci-image-mirror-commands.sh

Signed-off-by: Yauheni Kaliuta <[email protected]>

* Makefile: run linter and unit tests from default target (#735)

- rename default target `all` to `default`. Sounds more appropriate
  since there are a lot of other jobs left.
- depend `default` from `lint` and `unit-test`

It looks like more appropriate default for developers.

Related: #696

Signed-off-by: Yauheni Kaliuta <[email protected]>

* feat: Add ModelRegistry component (#775) (#776)

* feat: Add ModelRegistry component (#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

* feat(kueue): add logic to enable new component (#827)

* feat(kueue): add logic to enable new component
---------

Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Dimitri Saridakis <[email protected]>

* Changed variable name for cfo operator image (#794)

* Changed variable name for cfo operator image

* Fixed golint

* Changed defaultKustomizePath to manager

* changed CodeFlarePath to point to manager

* Changed defaultKustomizePath to default, added Params path

* chore: fix missing deepcopyinto for kueue by re-generate code (#835)

Signed-off-by: Wen Zhou <[email protected]>

* feat: simplifies Feature API (#831)

- `FeaturesInitializer` (now named `FeaturesHandler`) becomes an entry point to compose features 
    - it has two modes: cluster and component. Based on this mode it will initialize `.spec.source` transparently 
    - there is no `Prepare` func anymore - it is now part of `Apply` and `Delete` - most importantly `FeaturesHandler` keeps track of created features so there is no need to keep adding to the slice explicitly
- Tests have been adjusted to focus on behavior rather than implementation details

---------

Signed-off-by: Yauheni Kaliuta <[email protected]>
Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Edgar Hernández <[email protected]>
Co-authored-by: Ajay Jaganathan <[email protected]>
Co-authored-by: Yauheni Kaliuta <[email protected]>
Co-authored-by: Bartosz Majsak <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>
Co-authored-by: Edgar Hernández <[email protected]>
Co-authored-by: Landon LaSmith <[email protected]>
Co-authored-by: Aslak Knutsen <[email protected]>
Co-authored-by: Cameron Garrison <[email protected]>
Co-authored-by: Dhiraj Bokde <[email protected]>
Co-authored-by: Rui Vieira <[email protected]>
Co-authored-by: Ajay Pratap <[email protected]>
Co-authored-by: Dimitri Saridakis <[email protected]>
Co-authored-by: Mark Campbell <[email protected]>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Mar 8, 2024
…o#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Jun 24, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has changed.

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Jun 24, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has changed.

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Aug 27, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid double squashing due to
merge policy.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Aug 27, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid double squashing due to
merge policy.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Aug 27, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid double squashing due to
merge policy.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Aug 28, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid double squashing due to
merge policy.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Aug 29, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid double squashing due to
merge policy.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Aug 29, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid double squashing due to
merge policy.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Sep 2, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid double squashing due to
merge policy.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Sep 2, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid double squashing due to
merge policy.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)

modelregistry: partial: fix: add check for all platform offering on components

Partial application of

ab7e04e ("fix: add check for all platform offering on components (opendatahub-io#1205)")

ModelRegistry related.

Signed-off-by: Yauheni Kaliuta <[email protected]>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Sep 18, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid double squashing due to
merge policy.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)

modelregistry: partial: fix: add check for all platform offering on components

Partial application of

ab7e04e ("fix: add check for all platform offering on components (opendatahub-io#1205)")

ModelRegistry related.

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335 (opendatahub-io#1221)

* feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <[email protected]>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <[email protected]>

* update: modelregistry with namespace

- add namespace for rhoai case
- remove omitemptry on namespace: if user does not set it, it will get default value to use.
  since its type is string

Signed-off-by: Wen Zhou <[email protected]>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <[email protected]>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <[email protected]>

* fix: make registriesNamespace immutability check dynamic in cel validation rule

* fix: refactor validation rule, set registriesNamespace to optional, add patch func in modelregistry to set default value

* fix: add defaulting webhook including envtest, remove patch from modelregistry component

* fix: add namespace name pattern for registriesNamespace, allow empty string to replace with default value

* fix: use unique webhook names

* fix: don't change existing validating webhook name to avoid upgrade issues

* feat: add model registry registriesNamespace in DSC status

* update:

- move ModelRegistryStatus from ModelReg into status
- update validation rule for namespace:
  - when update is to removed/unmanaged modelreg: regardless previous state, can change name and set to removed
  - upgrade 2.13 to 2.14 when no NS set in 2.13
  - when update is from remove/unmanaged: e.g change from removed to managed and change name at the same tie
  - keep same namespace, regardless state
- reduce print on passed allowed webhook request
- set to omitemptry so required is not add in the CSV
- fix review comments:
  - move update status after reconcile is successful
  - set to use const for caching on ModeReg namespace

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Dhiraj Bokde <[email protected]>
Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>
(cherry picked from commit dd3df21)

fix: only replace/set default model reg namespace by webhook if component is enabled

- when modelreg is not set in DSC
- when modelreg is set to be Removed
these two cases should not block operation, for backwards compataible

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 03f6c0b)
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Sep 18, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid double squashing due to
merge policy.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)

modelregistry: partial: fix: add check for all platform offering on components

Partial application of

ab7e04e ("fix: add check for all platform offering on components (opendatahub-io#1205)")

ModelRegistry related.

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335 (opendatahub-io#1221)

* feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <[email protected]>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <[email protected]>

* update: modelregistry with namespace

- add namespace for rhoai case
- remove omitemptry on namespace: if user does not set it, it will get default value to use.
  since its type is string

Signed-off-by: Wen Zhou <[email protected]>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <[email protected]>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <[email protected]>

* fix: make registriesNamespace immutability check dynamic in cel validation rule

* fix: refactor validation rule, set registriesNamespace to optional, add patch func in modelregistry to set default value

* fix: add defaulting webhook including envtest, remove patch from modelregistry component

* fix: add namespace name pattern for registriesNamespace, allow empty string to replace with default value

* fix: use unique webhook names

* fix: don't change existing validating webhook name to avoid upgrade issues

* feat: add model registry registriesNamespace in DSC status

* update:

- move ModelRegistryStatus from ModelReg into status
- update validation rule for namespace:
  - when update is to removed/unmanaged modelreg: regardless previous state, can change name and set to removed
  - upgrade 2.13 to 2.14 when no NS set in 2.13
  - when update is from remove/unmanaged: e.g change from removed to managed and change name at the same tie
  - keep same namespace, regardless state
- reduce print on passed allowed webhook request
- set to omitemptry so required is not add in the CSV
- fix review comments:
  - move update status after reconcile is successful
  - set to use const for caching on ModeReg namespace

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Dhiraj Bokde <[email protected]>
Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>
(cherry picked from commit dd3df21)

fix: only replace/set default model reg namespace by webhook if component is enabled

- when modelreg is not set in DSC
- when modelreg is set to be Removed
these two cases should not block operation, for backwards compataible

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <[email protected]>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Sep 20, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid possible double squashing on
merging.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)

modelregistry: partial: fix: add check for all platform offering on components

Partial application of

ab7e04e ("fix: add check for all platform offering on components (opendatahub-io#1205)")

ModelRegistry related.

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335 (opendatahub-io#1221)

* feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <[email protected]>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <[email protected]>

* update: modelregistry with namespace

- add namespace for rhoai case
- remove omitemptry on namespace: if user does not set it, it will get default value to use.
  since its type is string

Signed-off-by: Wen Zhou <[email protected]>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <[email protected]>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <[email protected]>

* fix: make registriesNamespace immutability check dynamic in cel validation rule

* fix: refactor validation rule, set registriesNamespace to optional, add patch func in modelregistry to set default value

* fix: add defaulting webhook including envtest, remove patch from modelregistry component

* fix: add namespace name pattern for registriesNamespace, allow empty string to replace with default value

* fix: use unique webhook names

* fix: don't change existing validating webhook name to avoid upgrade issues

* feat: add model registry registriesNamespace in DSC status

* update:

- move ModelRegistryStatus from ModelReg into status
- update validation rule for namespace:
  - when update is to removed/unmanaged modelreg: regardless previous state, can change name and set to removed
  - upgrade 2.13 to 2.14 when no NS set in 2.13
  - when update is from remove/unmanaged: e.g change from removed to managed and change name at the same tie
  - keep same namespace, regardless state
- reduce print on passed allowed webhook request
- set to omitemptry so required is not add in the CSV
- fix review comments:
  - move update status after reconcile is successful
  - set to use const for caching on ModeReg namespace

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Dhiraj Bokde <[email protected]>
Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>
(cherry picked from commit dd3df21)

fix: only replace/set default model reg namespace by webhook if component is enabled

- when modelreg is not set in DSC
- when modelreg is set to be Removed
these two cases should not block operation, for backwards compataible

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <[email protected]>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <[email protected]>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <[email protected]>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Sep 21, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid possible double squashing on
merging.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)

modelregistry: partial: fix: add check for all platform offering on components

Partial application of

ab7e04e ("fix: add check for all platform offering on components (opendatahub-io#1205)")

ModelRegistry related.

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335 (opendatahub-io#1221)

* feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <[email protected]>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <[email protected]>

* update: modelregistry with namespace

- add namespace for rhoai case
- remove omitemptry on namespace: if user does not set it, it will get default value to use.
  since its type is string

Signed-off-by: Wen Zhou <[email protected]>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <[email protected]>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <[email protected]>

* fix: make registriesNamespace immutability check dynamic in cel validation rule

* fix: refactor validation rule, set registriesNamespace to optional, add patch func in modelregistry to set default value

* fix: add defaulting webhook including envtest, remove patch from modelregistry component

* fix: add namespace name pattern for registriesNamespace, allow empty string to replace with default value

* fix: use unique webhook names

* fix: don't change existing validating webhook name to avoid upgrade issues

* feat: add model registry registriesNamespace in DSC status

* update:

- move ModelRegistryStatus from ModelReg into status
- update validation rule for namespace:
  - when update is to removed/unmanaged modelreg: regardless previous state, can change name and set to removed
  - upgrade 2.13 to 2.14 when no NS set in 2.13
  - when update is from remove/unmanaged: e.g change from removed to managed and change name at the same tie
  - keep same namespace, regardless state
- reduce print on passed allowed webhook request
- set to omitemptry so required is not add in the CSV
- fix review comments:
  - move update status after reconcile is successful
  - set to use const for caching on ModeReg namespace

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Dhiraj Bokde <[email protected]>
Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>
(cherry picked from commit dd3df21)

fix: only replace/set default model reg namespace by webhook if component is enabled

- when modelreg is not set in DSC
- when modelreg is set to be Removed
these two cases should not block operation, for backwards compataible

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <[email protected]>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <[email protected]>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <[email protected]>

Revert "get_all_manifests.sh: modelregistry: use rhoai-2.14 branch"

There is no yet rhoai-2.14 branch for modelregistry.

This reverts commit 4c7d83a.

Signed-off-by: Yauheni Kaliuta <[email protected]>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Sep 24, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid possible double squashing on
merging.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)

modelregistry: partial: fix: add check for all platform offering on components

Partial application of

ab7e04e ("fix: add check for all platform offering on components (opendatahub-io#1205)")

ModelRegistry related.

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335 (opendatahub-io#1221)

* feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <[email protected]>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <[email protected]>

* update: modelregistry with namespace

- add namespace for rhoai case
- remove omitemptry on namespace: if user does not set it, it will get default value to use.
  since its type is string

Signed-off-by: Wen Zhou <[email protected]>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <[email protected]>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <[email protected]>

* fix: make registriesNamespace immutability check dynamic in cel validation rule

* fix: refactor validation rule, set registriesNamespace to optional, add patch func in modelregistry to set default value

* fix: add defaulting webhook including envtest, remove patch from modelregistry component

* fix: add namespace name pattern for registriesNamespace, allow empty string to replace with default value

* fix: use unique webhook names

* fix: don't change existing validating webhook name to avoid upgrade issues

* feat: add model registry registriesNamespace in DSC status

* update:

- move ModelRegistryStatus from ModelReg into status
- update validation rule for namespace:
  - when update is to removed/unmanaged modelreg: regardless previous state, can change name and set to removed
  - upgrade 2.13 to 2.14 when no NS set in 2.13
  - when update is from remove/unmanaged: e.g change from removed to managed and change name at the same tie
  - keep same namespace, regardless state
- reduce print on passed allowed webhook request
- set to omitemptry so required is not add in the CSV
- fix review comments:
  - move update status after reconcile is successful
  - set to use const for caching on ModeReg namespace

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Dhiraj Bokde <[email protected]>
Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>
(cherry picked from commit dd3df21)

fix: only replace/set default model reg namespace by webhook if component is enabled

- when modelreg is not set in DSC
- when modelreg is set to be Removed
these two cases should not block operation, for backwards compataible

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <[email protected]>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <[email protected]>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <[email protected]>

Revert "get_all_manifests.sh: modelregistry: use rhoai-2.14 branch"

There is no yet rhoai-2.14 branch for modelregistry.

This reverts commit 4c7d83a.

Signed-off-by: Yauheni Kaliuta <[email protected]>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Sep 24, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid possible double squashing on
merging.

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)

modelregistry: partial: fix: add check for all platform offering on components

Partial application of

ab7e04e ("fix: add check for all platform offering on components (opendatahub-io#1205)")

ModelRegistry related.

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335 (opendatahub-io#1221)

* feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <[email protected]>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <[email protected]>

* update: modelregistry with namespace

- add namespace for rhoai case
- remove omitemptry on namespace: if user does not set it, it will get default value to use.
  since its type is string

Signed-off-by: Wen Zhou <[email protected]>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <[email protected]>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <[email protected]>

* fix: make registriesNamespace immutability check dynamic in cel validation rule

* fix: refactor validation rule, set registriesNamespace to optional, add patch func in modelregistry to set default value

* fix: add defaulting webhook including envtest, remove patch from modelregistry component

* fix: add namespace name pattern for registriesNamespace, allow empty string to replace with default value

* fix: use unique webhook names

* fix: don't change existing validating webhook name to avoid upgrade issues

* feat: add model registry registriesNamespace in DSC status

* update:

- move ModelRegistryStatus from ModelReg into status
- update validation rule for namespace:
  - when update is to removed/unmanaged modelreg: regardless previous state, can change name and set to removed
  - upgrade 2.13 to 2.14 when no NS set in 2.13
  - when update is from remove/unmanaged: e.g change from removed to managed and change name at the same tie
  - keep same namespace, regardless state
- reduce print on passed allowed webhook request
- set to omitemptry so required is not add in the CSV
- fix review comments:
  - move update status after reconcile is successful
  - set to use const for caching on ModeReg namespace

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Dhiraj Bokde <[email protected]>
Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>
(cherry picked from commit dd3df21)

fix: only replace/set default model reg namespace by webhook if component is enabled

- when modelreg is not set in DSC
- when modelreg is set to be Removed
these two cases should not block operation, for backwards compataible

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <[email protected]>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <[email protected]>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <[email protected]>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Sep 25, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid possible double squashing on
merging.

Set management state to Removed since it is not

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)

modelregistry: partial: fix: add check for all platform offering on components

Partial application of

ab7e04e ("fix: add check for all platform offering on components (opendatahub-io#1205)")

ModelRegistry related.

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335 (opendatahub-io#1221)

* feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <[email protected]>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <[email protected]>

* update: modelregistry with namespace

- add namespace for rhoai case
- remove omitemptry on namespace: if user does not set it, it will get default value to use.
  since its type is string

Signed-off-by: Wen Zhou <[email protected]>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <[email protected]>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <[email protected]>

* fix: make registriesNamespace immutability check dynamic in cel validation rule

* fix: refactor validation rule, set registriesNamespace to optional, add patch func in modelregistry to set default value

* fix: add defaulting webhook including envtest, remove patch from modelregistry component

* fix: add namespace name pattern for registriesNamespace, allow empty string to replace with default value

* fix: use unique webhook names

* fix: don't change existing validating webhook name to avoid upgrade issues

* feat: add model registry registriesNamespace in DSC status

* update:

- move ModelRegistryStatus from ModelReg into status
- update validation rule for namespace:
  - when update is to removed/unmanaged modelreg: regardless previous state, can change name and set to removed
  - upgrade 2.13 to 2.14 when no NS set in 2.13
  - when update is from remove/unmanaged: e.g change from removed to managed and change name at the same tie
  - keep same namespace, regardless state
- reduce print on passed allowed webhook request
- set to omitemptry so required is not add in the CSV
- fix review comments:
  - move update status after reconcile is successful
  - set to use const for caching on ModeReg namespace

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Dhiraj Bokde <[email protected]>
Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>
(cherry picked from commit dd3df21)

fix: only replace/set default model reg namespace by webhook if component is enabled

- when modelreg is not set in DSC
- when modelreg is set to be Removed
these two cases should not block operation, for backwards compataible

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <[email protected]>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <[email protected]>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <[email protected]>

Update config/samples/datasciencecluster_v1_datasciencecluster.yaml

Co-authored-by: Wen Zhou <[email protected]>

Update bundle/manifests/rhods-operator.clusterserviceversion.yaml

Co-authored-by: Wen Zhou <[email protected]>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this pull request Sep 25, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid possible double squashing on
merging.

Set management state to Removed since it is not

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)

modelregistry: partial: fix: add check for all platform offering on components

Partial application of

ab7e04e ("fix: add check for all platform offering on components (opendatahub-io#1205)")

ModelRegistry related.

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335 (opendatahub-io#1221)

* feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <[email protected]>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <[email protected]>

* update: modelregistry with namespace

- add namespace for rhoai case
- remove omitemptry on namespace: if user does not set it, it will get default value to use.
  since its type is string

Signed-off-by: Wen Zhou <[email protected]>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <[email protected]>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <[email protected]>

* fix: make registriesNamespace immutability check dynamic in cel validation rule

* fix: refactor validation rule, set registriesNamespace to optional, add patch func in modelregistry to set default value

* fix: add defaulting webhook including envtest, remove patch from modelregistry component

* fix: add namespace name pattern for registriesNamespace, allow empty string to replace with default value

* fix: use unique webhook names

* fix: don't change existing validating webhook name to avoid upgrade issues

* feat: add model registry registriesNamespace in DSC status

* update:

- move ModelRegistryStatus from ModelReg into status
- update validation rule for namespace:
  - when update is to removed/unmanaged modelreg: regardless previous state, can change name and set to removed
  - upgrade 2.13 to 2.14 when no NS set in 2.13
  - when update is from remove/unmanaged: e.g change from removed to managed and change name at the same tie
  - keep same namespace, regardless state
- reduce print on passed allowed webhook request
- set to omitemptry so required is not add in the CSV
- fix review comments:
  - move update status after reconcile is successful
  - set to use const for caching on ModeReg namespace

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Dhiraj Bokde <[email protected]>
Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>
(cherry picked from commit dd3df21)

fix: only replace/set default model reg namespace by webhook if component is enabled

- when modelreg is not set in DSC
- when modelreg is set to be Removed
these two cases should not block operation, for backwards compataible

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <[email protected]>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <[email protected]>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <[email protected]>

Update config/samples/datasciencecluster_v1_datasciencecluster.yaml

Co-authored-by: Wen Zhou <[email protected]>

Update bundle/manifests/rhods-operator.clusterserviceversion.yaml

Co-authored-by: Wen Zhou <[email protected]>

modelregistry: keep registriesNamespace as odh except CSV

It makes less divergency with ODH and default does not matter as
soon as CSV has RHOAI version.

Signed-off-by: Yauheni Kaliuta <[email protected]>
openshift-merge-bot bot pushed a commit to red-hat-data-services/rhods-operator that referenced this pull request Sep 26, 2024
…o#776)

Squashed commit due to buildability since ComponentInterface has
changed.

Other patches squashed as well to avoid possible double squashing on
merging.

Set management state to Removed since it is not

modelregistry: regenerate autogenerated files

Run `make generate manifests` after all the changes

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: Add ModelRegistry component (opendatahub-io#775) (opendatahub-io#776)

* feat: Add ModelRegistry component (opendatahub-io#775)

* fix: Fix modelregistry odh overlays path

* fix: fix dsc_create_test tests err nil check

* fix: refactor ModelRegistry.ReconcileComponent for new parameters

* chore: added modelregistry to README.md

* fix: add missing rbac rules for deploymentconfigs and daemonsets

* chore: code lint cleanup

* fix: added check for nil DevFlags in model-registry component

* fix: add nil check for dscispec.DevFlags in model-registry ReconcileComponent

* fix: remove RBAC rules for daemonsets and deploymentconfigs

* fix(chore): fix lint errors in dsc_deletion_test.go

(cherry picked from commit 112d3f1)
Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <[email protected]>
Date:   Thu Mar 7 15:43:37 2024 +0100

    chore: removes SetImageParamsMap from ComponentInterface (opendatahub-io#897)

    As it's not used by any component, acting as a simple pass-return loop.

    This makes the API contract a bit cleaner.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove the need of passing rest config (opendatahub-io#895)

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <[email protected]>
Date:   Fri Mar 8 17:40:54 2024 +0100

    chore: remove the need of passing rest config (opendatahub-io#895)

    * chore: fixes ComponentInterface docs

    By removing reference to non-existing func. This function has been in
    use outside of this component.

    * fix: removes rest config

    As we are already using client.Client interface we do not have to
    instantiate other typed clients to e.g. list resources using their own
    funcs. Generic client.Client is sufficient for these needs.

    Additionally this change adds ctx propogation for these calls.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: feat(logger): for both controller level and component level (opendatahub-io#837)

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <[email protected]>
Date:   Mon Apr 1 22:06:16 2024 +0200

    feat(logger): for both controller level and component level (opendatahub-io#837)

    * feat(logger): for both controller level and component level

    Signed-off-by: Wen Zhou <[email protected]>

    * update(logger): use logr instead of uber's zap

    Signed-off-by: Wen Zhou <[email protected]>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <[email protected]>

    * update: use zap.Options for both and tune levels

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>
    Signed-off-by: Zhou, Wen <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

update(modelregistry): rename image name (opendatahub-io#877)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit b4e4d6f)

modelregistry: partial: chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

Partial application of already applied

commit 96c85f2
Author: Wen Zhou <[email protected]>
Date:   Tue Apr 23 14:05:24 2024 +0200

    chore: cleanup duplicated functions packages and add more for godoc (opendatahub-io#981)

    * chore: cleanup duplicated functions/package and add godoc

    - move GetPlatform() from deploy package to cluster package
    - move const ManagedRhods SelfManagedRhods OpenDataHub from deploy to cluster package
    - move WaitForDeploymentAvailable() monitoring package to cluster package
    - remove monitoring package
    - move UpdatePodSecurityRolebinding() from common package to cluster package
    - deprecate GetDomain from common package, to only use GetDomain from cluster package.
    - remove gvk package, move its GVK to cluster package
    - move DeleteExistingSubscription() from deploy package to upgrade package
    - do not export getSubscription()

    Signed-off-by: Wen Zhou <[email protected]>

    * update: remove gvk into one file but under cluster package

    Signed-off-by: Wen Zhou <[email protected]>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <[email protected]>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <[email protected]>

    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat(mr): create namespace for Model Registry (opendatahub-io#930)

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <[email protected]>

* fix: rebase

Signed-off-by: Zhou, Wen <[email protected]>

* update: code review comments

Signed-off-by: Wen Zhou <[email protected]>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <[email protected]>

* update: remove label to keep namespace even opreator is uninstalled

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
Signed-off-by: Zhou, Wen <[email protected]>
(cherry picked from commit 1188ce1)

feat(mr): add model registry odh extras manifests, fixes RHOAIENG-5112 (opendatahub-io#953)

(cherry picked from commit 7c3e81b)

modelregistry: partial: chore: Open up util functions for context propagation (opendatahub-io#1033)

Partial application of already applied

commit 105adae
Author: Aslak Knutsen <[email protected]>
Date:   Tue Jun 4 15:16:21 2024 +0200

    chore: Open up util functions for context propagation (opendatahub-io#1033)

    context should be determined by the caller and propagated
    down the call chain.

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore: remove duplicated platform call in each component (opendatahub-io#1055)

Partial application of already applied

commit 1b04761
Author: Wen Zhou <[email protected]>
Date:   Fri Jun 14 14:47:33 2024 +0200

    chore: remove duplicated platform call in each component (opendatahub-io#1055)

    - get in DSC and pass into compoment

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: update api docs

run `make api-docs`
add +groupName=datasciencecluster.opendatahub.io

On backporting of
1b86e42 ("Update readme.md  (opendatahub-io#890)")

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: partial: chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <[email protected]>
Date:   Tue Jun 25 17:15:13 2024 +0200

    chore(lint): enable contextcheck and containedctx (opendatahub-io#1070)

    * chore(lint): enable contextcheck

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <[email protected]>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

refactor: dashboard with new manifests structure (opendatahub-io#1065)

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <[email protected]>
Date:   Tue Jul 2 16:56:25 2024 +0200

    refactor: dashboard with new manifests structure (opendatahub-io#1065)

    * refactor: dashboard with new manifests structure

    - change type of platform, skip convert to string
    - add more support for ApplyParam() to
      not only take ENV but also anything from ExtraParamMaps
    * update: simplify override function
    * update: add value for Unknown platform
    ---------

    Signed-off-by: Wen Zhou <[email protected]>

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add managed model registry prometheus config handling logic, part of RHOAIENG-4273 (opendatahub-io#1150)

(cherry picked from commit 72fc80f)

Adjusted Kueue and TrainingOperator rules

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: add default cert for model registry, fixes RHOAIENG-9909 (opendatahub-io#1165)

Conflicts: ApplyParams arguments due to missing:
  d84cd33 ("update: remove unnecessary param from ApplyParams() (opendatahub-io#1180)")

* feat: add default cert for model registry, fixes RHOAIENG-9909

* fix: fixed lint errors

* fix: add servicemesh feature check for MR, add MR enable check in e2e default cert test

* fix: changed MR servicemesh status check to look for Managed state

* fix: ignore missing model-registry default cert if already removed

(cherry picked from commit 4c411a6)

feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831 (opendatahub-io#1202)

* feat: add servicemeshmember for model registry namespace, fixes RHOAIENG-11831

* fix: ignore error if MR smm already exists

* code cleanup for readability

Co-authored-by: Bartosz Majsak <[email protected]>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <[email protected]>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <[email protected]>
(cherry picked from commit 8f3d013)

feat: add managed model registry prometheus job, metrics, and alering rules, fixes RHOAIENG-4273

(cherry picked from commit f811d67)

modelregistry: partial: fix: add check for all platform offering on components

Partial application of

ab7e04e ("fix: add check for all platform offering on components (opendatahub-io#1205)")

ModelRegistry related.

Signed-off-by: Yauheni Kaliuta <[email protected]>

feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335 (opendatahub-io#1221)

* feat: added shared registries namespace property in model registry dsc component, fixes RHOAIENG-12335

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <[email protected]>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <[email protected]>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <[email protected]>

* update: modelregistry with namespace

- add namespace for rhoai case
- remove omitemptry on namespace: if user does not set it, it will get default value to use.
  since its type is string

Signed-off-by: Wen Zhou <[email protected]>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <[email protected]>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <[email protected]>

* fix: make registriesNamespace immutability check dynamic in cel validation rule

* fix: refactor validation rule, set registriesNamespace to optional, add patch func in modelregistry to set default value

* fix: add defaulting webhook including envtest, remove patch from modelregistry component

* fix: add namespace name pattern for registriesNamespace, allow empty string to replace with default value

* fix: use unique webhook names

* fix: don't change existing validating webhook name to avoid upgrade issues

* feat: add model registry registriesNamespace in DSC status

* update:

- move ModelRegistryStatus from ModelReg into status
- update validation rule for namespace:
  - when update is to removed/unmanaged modelreg: regardless previous state, can change name and set to removed
  - upgrade 2.13 to 2.14 when no NS set in 2.13
  - when update is from remove/unmanaged: e.g change from removed to managed and change name at the same tie
  - keep same namespace, regardless state
- reduce print on passed allowed webhook request
- set to omitemptry so required is not add in the CSV
- fix review comments:
  - move update status after reconcile is successful
  - set to use const for caching on ModeReg namespace

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Dhiraj Bokde <[email protected]>
Signed-off-by: Wen Zhou <[email protected]>
Co-authored-by: Wen Zhou <[email protected]>
(cherry picked from commit dd3df21)

fix: only replace/set default model reg namespace by webhook if component is enabled

- when modelreg is not set in DSC
- when modelreg is set to be Removed
these two cases should not block operation, for backwards compataible

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <[email protected]>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <[email protected]>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <[email protected]>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <[email protected]>

Update config/samples/datasciencecluster_v1_datasciencecluster.yaml

Co-authored-by: Wen Zhou <[email protected]>

Update bundle/manifests/rhods-operator.clusterserviceversion.yaml

Co-authored-by: Wen Zhou <[email protected]>

modelregistry: keep registriesNamespace as odh except CSV

It makes less divergency with ODH and default does not matter as
soon as CSV has RHOAI version.

Signed-off-by: Yauheni Kaliuta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants