From 0ee69d2f9d5afb3e4861b72dd477119a8634cae0 Mon Sep 17 00:00:00 2001 From: Wen Zhou Date: Mon, 6 Nov 2023 10:47:54 +0100 Subject: [PATCH] cleanup: modelmesh monitoring logic (#703) Signed-off-by: Wen Zhou (cherry picked from commit 023d6c4f4ffc83f3c2cc9b67bb88bbf1c305bbe6) --- components/modelmeshserving/modelmeshserving.go | 12 +++--------- controllers/dscinitialization/utils.go | 1 + get_all_manifests.sh | 3 +-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/components/modelmeshserving/modelmeshserving.go b/components/modelmeshserving/modelmeshserving.go index 7cd9b12b69d..220845ad5bf 100644 --- a/components/modelmeshserving/modelmeshserving.go +++ b/components/modelmeshserving/modelmeshserving.go @@ -17,9 +17,8 @@ import ( ) var ( - ComponentName = "model-mesh" - Path = deploy.DefaultManifestPath + "/" + ComponentName + "/overlays/odh" - // monitoringPath = deploy.DefaultManifestPath + "/" + "modelmesh-monitoring/base" + ComponentName = "model-mesh" + Path = deploy.DefaultManifestPath + "/" + ComponentName + "/overlays/odh" DependentComponentName = "odh-model-controller" DependentPath = deploy.DefaultManifestPath + "/" + DependentComponentName + "/base" ) @@ -144,12 +143,6 @@ func (m *ModelMeshServing) ReconcileComponent(cli client.Client, owner metav1.Ob if err != nil { return err } - // var monitoringNamespace string - // if dscInit.Spec.Monitoring.Namespace != "" { - // monitoringNamespace = dscInit.Spec.Monitoring.Namespace - // } else { - // monitoringNamespace = dscispec.ApplicationsNamespace - // } // CloudService Monitoring handling // TODO: cleanup logic in rhods-2.5 @@ -170,6 +163,7 @@ func (m *ModelMeshServing) ReconcileComponent(cli client.Client, owner metav1.Ob } } return nil + } func (m *ModelMeshServing) DeepCopyInto(target *ModelMeshServing) { diff --git a/controllers/dscinitialization/utils.go b/controllers/dscinitialization/utils.go index ff692924182..a9ff8f0af7e 100644 --- a/controllers/dscinitialization/utils.go +++ b/controllers/dscinitialization/utils.go @@ -273,6 +273,7 @@ func (r *DSCInitializationReconciler) reconcileDefaultNetworkPolicy(ctx context. Name: name, Namespace: name, }, foundNetworkPolicy) + if err != nil { if apierrs.IsNotFound(err) { // Set Controller reference diff --git a/get_all_manifests.sh b/get_all_manifests.sh index fe6b0ae3e31..4c370590087 100755 --- a/get_all_manifests.sh +++ b/get_all_manifests.sh @@ -10,7 +10,7 @@ MANIFESTS_TARBALL_URL="${GITHUB_URL}/${MANIFEST_ORG}/odh-manifests/tarball/${MAN # component: dsp, kserve, dashbaord, cf/ray. in the format of "repo-org:repo-name:branch-name:source-folder:target-folder" -# TODO: kserve, mm, trustyai, dashbaord, nbc,odh-mm-monitoring, etc + declare -A COMPONENT_MANIFESTS=( ["codeflare"]="red-hat-data-services:codeflare-operator:rhods-2.4:config:codeflare" ["ray"]="red-hat-data-services:kuberay:rhods-2.4:ray-operator/config:ray" @@ -50,7 +50,6 @@ if [ "$#" -ge 1 ]; then done fi -<<<<<<< HEAD # pre-cleanup local env rm -fr ./odh-manifests/* ./.odh-manifests-tmp/