Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Model Registry component #775

Closed
dhirajsb opened this issue Dec 5, 2023 · 4 comments
Closed

Add Model Registry component #775

dhirajsb opened this issue Dec 5, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@dhirajsb
Copy link
Contributor

dhirajsb commented Dec 5, 2023

Is your feature request related to a problem? Please describe.
Extend the DSC api to include ModelRegistry as a component. This component will be responsible for deployment of model-registry-operator.

Describe the solution you'd like
Expected DSC CR to enable ModelRegistry (Removed by default in samples):

spec:
  components:
    modelregistry:
      managementState: "Managed"

Describe alternatives you've considered
None

Additional context
ModelRegistry Manifests: https://github.com/opendatahub-io/model-registry-operator

@dhirajsb dhirajsb added the enhancement New feature or request label Dec 5, 2023
dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Dec 5, 2023
dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Dec 5, 2023
@zdtsw
Copy link
Member

zdtsw commented Dec 5, 2023

I think the normal process is to first get any new component to TA then to GA in ODH with Removed first then Managed.

dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Dec 5, 2023
@dhirajsb
Copy link
Contributor Author

dhirajsb commented Dec 5, 2023

@zdtsw the sample in config/samples/dscinitialization_v1_dscinitialization.yaml uses managementState: "Removed". The description is talking about how to enable it.

@zdtsw
Copy link
Member

zdtsw commented Dec 7, 2023

@dhirajsb you mind transferring this issue to jira?

@VaishnaviHire
Copy link
Member

Added epic for this one - https://issues.redhat.com/browse/RHOAIENG-442

dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Dec 20, 2023
dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Jan 8, 2024
dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Jan 15, 2024
dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Jan 17, 2024
dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Jan 18, 2024
dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Jan 23, 2024
dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Jan 23, 2024
dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Jan 25, 2024
dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Jan 30, 2024
dhirajsb added a commit to dhirajsb/opendatahub-operator that referenced this issue Feb 1, 2024
zdtsw pushed a commit that referenced this issue Feb 1, 2024
* 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
VaishnaviHire added a commit that referenced this issue 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 <ykaliuta@redhat.com>

* 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 <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

* Fix cherry-pick for dsci

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* Fix the KF deployment:

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

* fix(monitoring): typo (#101)

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

* revert: label changes made in upgrade PR

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: add statefulset

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

* chore

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Vaishnavi Hire <vhire@redhat.com>
Co-authored-by: Dimitri Saridakis <dimitri.saridakis@gmail.com>
Co-authored-by: Edson Tirelli <ed.tirelli@gmail.com>
(cherry picked from commit 81ebc87)
(cherry picked from commit 7525f99)

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(cherry picked from commit 60f0419)
(cherry picked from commit 5e3731b)

* chore: typo (#141)

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>

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 <wenzhou@redhat.com>

Revert "Remove modelmesh monitoring"

This reverts commit 91dd78f.

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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 <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>

* update: add supported value for serverless and servicemesh

- currently removed and unmanaged are the same logic

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: do not remove resources if it has label

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(cherry picked from commit 3a672d4)

* Fix lint

* fix: rebase incubation

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: CSV

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: linter

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <23639005+israel-hdez@users.noreply.github.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

* Update components/kserve/kserve.go

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* 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 <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>
Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: change label name (#790)

- use a more generaic label than bind to namespace name

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

---------

Co-authored-by: Wen Zhou <wenzhou@redhat.com>

* 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 <bartosz.majsak@gmail.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>

* 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 <bartosz.majsak@gmail.com>

* 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 <bartosz.majsak@gmail.com>

* 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 <bartosz.majsak@gmail.com>

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

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* 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 <23639005+israel-hdez@users.noreply.github.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <ykaliuta@redhat.com>

* 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 <ykaliuta@redhat.com>

* 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 <ykaliuta@redhat.com>

* 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 <wenzhou@redhat.com>
Co-authored-by: Dimitri Saridakis <dimitri.saridakis@gmail.com>

* 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 <wenzhou@redhat.com>

* 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 <ykaliuta@redhat.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com>
Co-authored-by: Ajay Jaganathan <36824134+AjayJagan@users.noreply.github.com>
Co-authored-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Edgar Hernández <ehernand@redhat.com>
Co-authored-by: Landon LaSmith <2432396+LaVLaS@users.noreply.github.com>
Co-authored-by: Aslak Knutsen <aslak.tux@gmail.com>
Co-authored-by: Cameron Garrison <cgarriso@redhat.com>
Co-authored-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>
Co-authored-by: Rui Vieira <ruidevieira@googlemail.com>
Co-authored-by: Ajay Pratap <ajay.pratap233@gmail.com>
Co-authored-by: Dimitri Saridakis <dimitri.saridakis@gmail.com>
Co-authored-by: Mark Campbell <markcampbell114@gmail.com>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

modelregistry: update api docs

run `make api-docs`

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

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(cherry picked from commit 8f3d013)
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 <ykaliuta@redhat.com>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 <ykaliuta@redhat.com>

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 <dhirajsb@users.noreply.github.com>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* 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 <wenzhou@redhat.com>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

---------

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(cherry picked from commit 03f6c0b)
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 <ykaliuta@redhat.com>

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 <dhirajsb@users.noreply.github.com>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* 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 <wenzhou@redhat.com>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

---------

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 <ykaliuta@redhat.com>

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 <dhirajsb@users.noreply.github.com>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* 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 <wenzhou@redhat.com>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

---------

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 <ykaliuta@redhat.com>

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 <dhirajsb@users.noreply.github.com>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* 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 <wenzhou@redhat.com>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

---------

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 <ykaliuta@redhat.com>

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 <dhirajsb@users.noreply.github.com>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* 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 <wenzhou@redhat.com>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

---------

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 <ykaliuta@redhat.com>

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 <dhirajsb@users.noreply.github.com>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* 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 <wenzhou@redhat.com>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

---------

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 <ykaliuta@redhat.com>

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 <dhirajsb@users.noreply.github.com>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* 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 <wenzhou@redhat.com>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

---------

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

Update config/samples/datasciencecluster_v1_datasciencecluster.yaml

Co-authored-by: Wen Zhou <wenzhou@redhat.com>

Update bundle/manifests/rhods-operator.clusterserviceversion.yaml

Co-authored-by: Wen Zhou <wenzhou@redhat.com>
ykaliuta pushed a commit to ykaliuta/opendatahub-operator that referenced this issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 <ykaliuta@redhat.com>

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 <dhirajsb@users.noreply.github.com>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* 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 <wenzhou@redhat.com>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

---------

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

Update config/samples/datasciencecluster_v1_datasciencecluster.yaml

Co-authored-by: Wen Zhou <wenzhou@redhat.com>

Update bundle/manifests/rhods-operator.clusterserviceversion.yaml

Co-authored-by: Wen Zhou <wenzhou@redhat.com>

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 <ykaliuta@redhat.com>
openshift-merge-bot bot pushed a commit to red-hat-data-services/rhods-operator that referenced this issue 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 <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d10a764
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit ca7fa98
Author: Bartosz Majsak <bartosz.majsak@gmail.com>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit d8a83a2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: do not log error only print

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move setting into common function

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>
    Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

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

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: rename variable, removing GVK from it

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    * update: move gvk into a sub package under cluster

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

    ---------

    Signed-off-by: Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

* feat(mr): create namespace for smm

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix: rebase

Signed-off-by: Zhou, Wen <wenzhou@redhat.com>

* update: code review comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* fix(doc): wrong comments

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

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

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
(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 <aslak@4fs.no>
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 <ykaliuta@redhat.com>

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

Partial application of already applied

commit 1b04761
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 06e21a4
Author: Luca Burgazzoli <lburgazzoli@users.noreply.github.com>
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 <lburgazzoli@gmail.com>

    * chore(lint): enable containedctx

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

    * Fix PR review findings

    * Fix rebase

    ---------

    Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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

Partial application of already applied:

commit 438f4c2
Author: Wen Zhou <wenzhou@redhat.com>
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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

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 <ykaliuta@redhat.com>

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 <bartosz.majsak@gmail.com>

* Avoid shadowing package name in variable

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>

* chore: rename createServicemeshMember to enrollToServiceMesh, add log messages

---------

Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(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 <ykaliuta@redhat.com>

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 <dhirajsb@users.noreply.github.com>

* fix: added registriesNamespace property in references to model registry component in docs, samples, etc.

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: updated api-overview.md

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add missing field in setupDSCInstance()

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: added debug log for failing e2e test

* debug: added log messages in test dsc creation

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* debug: make registriesNamespace omitempty so apiserver will set the default value, clean testDSCCreation with more log messages

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* 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 <wenzhou@redhat.com>

* fix: test need to update for modelreg namespace

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* update: cleanup debug info in test cases

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

* 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 <wenzhou@redhat.com>

---------

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
(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 <wenzhou@redhat.com>
(cherry picked from commit 03f6c0b)

Update autogenerated files

run  `make generate manifests api-docs`

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

modelregistry: replace odh-model-registries with rhoai-model-registries

Fix names of default registries namespace treewide.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

tests: e2e: disable modelregistry

It is not GA yet, disable for now to avoid possible problems.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

get_all_manifests.sh: modelregistry: use rhoai-2.14 branch

Use versioned branch/tag like other components.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

Update config/samples/datasciencecluster_v1_datasciencecluster.yaml

Co-authored-by: Wen Zhou <wenzhou@redhat.com>

Update bundle/manifests/rhods-operator.clusterserviceversion.yaml

Co-authored-by: Wen Zhou <wenzhou@redhat.com>

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 <ykaliuta@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

3 participants