From 797f83e9926b5968c307e41345f04b2b52739348 Mon Sep 17 00:00:00 2001 From: Wen Zhou Date: Tue, 18 Jun 2024 13:41:35 +0200 Subject: [PATCH] Revert "feat: re-enable TrustyAI in downstream but set to removed (T.P)" This reverts commit 338dcb6ee138935cc4f1a64f5d3e997f35afca4f. --- Makefile | 2 +- .../rhods-operator.clusterserviceversion.yaml | 12 ++----- components/component.go | 2 -- components/trustyai/trustyai.go | 8 +++++ .../rhods-operator.clusterserviceversion.yaml | 4 --- config/manifests/description-patch.yml | 3 +- ...asciencecluster_v1_datasciencecluster.yaml | 2 -- .../datasciencecluster_controller.go | 5 +++ controllers/status/status.go | 34 ++++++++++++++----- docs/api-overview.md | 3 ++ main.go | 6 ++++ pkg/upgrade/upgrade.go | 29 +++++++++++++--- tests/e2e/helper_test.go | 2 +- 13 files changed, 78 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index 1b2a777f7d9..924eb0cdfd5 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # To re-generate a bundle for another specific version without changing the standard setup, you can: # - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) -VERSION ?= 2.11.0 +VERSION ?= 2.9.0 # IMAGE_TAG_BASE defines the opendatahub.io namespace and part of the image name for remote images. # This variable is used to construct full image tags for bundle and catalog images. # diff --git a/bundle/manifests/rhods-operator.clusterserviceversion.yaml b/bundle/manifests/rhods-operator.clusterserviceversion.yaml index 872776ec4ca..29b6d3109de 100644 --- a/bundle/manifests/rhods-operator.clusterserviceversion.yaml +++ b/bundle/manifests/rhods-operator.clusterserviceversion.yaml @@ -52,9 +52,6 @@ metadata: "trainingoperator": { "managementState": "Removed" }, - "trustyai": { - "managementState": "Removed" - }, "workbenches": { "managementState": "Managed" } @@ -160,9 +157,6 @@ metadata: "trainingoperator": { "managementState": "Removed" }, - "trustyai": { - "managementState": "Removed" - } } } } @@ -170,7 +164,7 @@ metadata: operators.operatorframework.io/internal-objects: '[dscinitialization.opendatahub.io]' operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/red-hat-data-services/rhods-operator - name: rhods-operator.v2.11.0 + name: rhods-operator.v2.9.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -244,7 +238,6 @@ spec: * Ability to use other runtimes for serving * Model Monitoring * Distributed workloads (KubeRay, CodeFlare, Kueue, Training Operator) - * XAI explanations of predictive models (TrustyAI) displayName: Red Hat OpenShift AI icon: - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI3LjQuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxvZ29zIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgODM1LjkgMjQ0IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA4MzUuOSAyNDQ7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkZGRkZGO30KCS5zdDF7ZmlsbDojRUUwMDAwO30KPC9zdHlsZT4KPGc+Cgk8Zz4KCQk8cGF0aCBkPSJNMzAxLjMsMTgzLjFjMCw1LjItMSwxMC4xLTMsMTQuN2MtMiw0LjYtNC43LDguNi04LjEsMTJjLTMuNCwzLjQtNy40LDYtMTIuMSw4Yy00LjYsMS45LTkuNiwyLjktMTQuOSwyLjkKCQkJYy01LjMsMC0xMC4yLTEtMTQuOS0yLjljLTQuNi0xLjktOC43LTQuNi0x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ywzLjd2MjAuOWMtNC4yLTIuNC05LTMuNy0xNC4yLTMuN2MtMTYuMiwwLTI4LjksMTIuNS0yOC45LDI4LjUKCQkJYzAsMTYsMTIuNSwyOC42LDI4LjQsMjguNmM1LjUsMCwxMC42LTEuNywxNC45LTQuOFYxMTEuMnogTTMyMS41LDY4LjVjNS40LDAsOS45LDMuNSwxMS43LDguOEgzMTAKCQkJQzMxMS43LDcxLjgsMzE1LjksNjguNSwzMjEuNSw2OC41IE0yOTIuOCw4My41YzAsMTYuMiwxMy4zLDI4LjgsMzAuMywyOC44YzkuNCwwLDE2LjItMi41LDIzLjItOC40bC0xMS4zLTEwCgkJCWMtMi42LDIuNy02LjUsNC4yLTExLjEsNC4yYy02LjMsMC0xMS41LTMuNS0xMy43LTguOGgzOS42Vjg1YzAtMTcuNy0xMS45LTMwLjQtMjguMS0zMC40QzMwNS42LDU0LjcsMjkyLjgsNjcuMywyOTIuOCw4My41CgkJCSBNMjYzLjUsNTMuMWM2LDAsOS40LDMuOCw5LjQsOC4zcy0zLjQsOC4zLTkuNCw4LjNoLTE3LjlWNTMuMUgyNjMuNXogTTIyNy41LDExMS4yaDE4LjFWODQuNGgxMy44bDEzLjksMjYuOGgyMC4ybC0xNi4yLTI5LjQKCQkJYzguNy0zLjgsMTMuOS0xMS43LDEzLjktMjAuN2MwLTEzLjMtMTAuNC0yMy41LTI2LTIzLjVoLTM3LjdWMTExLjJ6Ii8+Cgk8L2c+CjwvZz4KPC9zdmc+Cg== @@ -1773,11 +1766,10 @@ spec: - training - kserve - distributed-workloads - - trustyai links: - name: Red Hat OpenShift AI url: https://www.redhat.com/en/technologies/cloud-computing/openshift/openshift-ai minKubeVersion: 1.22.0 provider: name: Red Hat - version: 2.11.0 + version: 2.9.0 diff --git a/components/component.go b/components/component.go index ba50ca05bdc..97a5e23d4a0 100644 --- a/components/component.go +++ b/components/component.go @@ -132,8 +132,6 @@ func (c *Component) UpdatePrometheusConfig(_ client.Client, enable bool, compone TrainingOperatorARules string `yaml:"trainingoperator-alerting.rules"` WorkbenchesRRules string `yaml:"workbenches-recording.rules"` WorkbenchesARules string `yaml:"workbenches-alerting.rules"` - TrustyAIRRules string `yaml:"trustyai-recording.rules"` - TrustyAIARules string `yaml:"trustyai-alerting.rules"` KserveRRules string `yaml:"kserve-recording.rules"` KserveARules string `yaml:"kserve-alerting.rules"` } `yaml:"data"` diff --git a/components/trustyai/trustyai.go b/components/trustyai/trustyai.go index 31574708ffe..893b023419c 100644 --- a/components/trustyai/trustyai.go +++ b/components/trustyai/trustyai.go @@ -27,6 +27,9 @@ var ( var _ components.ComponentInterface = (*TrustyAI)(nil) // TrustyAI struct holds the configuration for the TrustyAI component. +// ## DEPRECATED ## : Installation of TrustyAI operator is deprecated in RHOAI. +// If TrustyAI operator is installed, it will be removed +// Changes in managemenstState are not supported. // +kubebuilder:object:generate=true type TrustyAI struct { components.Component `json:""` @@ -69,6 +72,11 @@ func (t *TrustyAI) ReconcileComponent(ctx context.Context, cli client.Client, lo return err } + // Return when platform is RHOAI + if platform == cluster.SelfManagedRhods || platform == cluster.ManagedRhods { + enabled = false + } + if enabled { if t.DevFlags != nil { // Download manifests and update paths diff --git a/config/manifests/bases/rhods-operator.clusterserviceversion.yaml b/config/manifests/bases/rhods-operator.clusterserviceversion.yaml index 3c185cc7051..86ae176bb64 100644 --- a/config/manifests/bases/rhods-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/rhods-operator.clusterserviceversion.yaml @@ -68,9 +68,6 @@ metadata: "trainingoperator": { "managementState": "Removed" }, - "trustyai": { - "managementState": "Removed" - } } } } @@ -154,7 +151,6 @@ spec: - training - kserve - distributed-workloads - - trustyai links: - name: Red Hat OpenShift AI url: https://www.redhat.com/en/technologies/cloud-computing/openshift/openshift-ai diff --git a/config/manifests/description-patch.yml b/config/manifests/description-patch.yml index e5fea265c94..d3c8fc4786c 100644 --- a/config/manifests/description-patch.yml +++ b/config/manifests/description-patch.yml @@ -23,5 +23,4 @@ spec: * Model Serving using ModelMesh and Kserve. * Ability to use other runtimes for serving * Model Monitoring - * Distributed workloads (KubeRay, CodeFlare, Kueue, Training Operator) - * XAI explanations of predictive models (TrustyAI) + * Distributed workloads (KubeRay, CodeFlare, Kueue) diff --git a/config/samples/datasciencecluster_v1_datasciencecluster.yaml b/config/samples/datasciencecluster_v1_datasciencecluster.yaml index 7b4e46b18b6..d230ba15fc8 100644 --- a/config/samples/datasciencecluster_v1_datasciencecluster.yaml +++ b/config/samples/datasciencecluster_v1_datasciencecluster.yaml @@ -38,5 +38,3 @@ spec: managementState: "Managed" workbenches: managementState: "Managed" - trustyai: - managementState: "Removed" diff --git a/controllers/datasciencecluster/datasciencecluster_controller.go b/controllers/datasciencecluster/datasciencecluster_controller.go index 78f510261ca..ef691b0ce71 100644 --- a/controllers/datasciencecluster/datasciencecluster_controller.go +++ b/controllers/datasciencecluster/datasciencecluster_controller.go @@ -54,6 +54,7 @@ import ( dsci "github.com/opendatahub-io/opendatahub-operator/v2/apis/dscinitialization/v1" "github.com/opendatahub-io/opendatahub-operator/v2/components" "github.com/opendatahub-io/opendatahub-operator/v2/components/datasciencepipelines" + "github.com/opendatahub-io/opendatahub-operator/v2/components/trustyai" "github.com/opendatahub-io/opendatahub-operator/v2/controllers/status" "github.com/opendatahub-io/opendatahub-operator/v2/pkg/cluster" "github.com/opendatahub-io/opendatahub-operator/v2/pkg/metadata/labels" @@ -348,6 +349,10 @@ func (r *DataScienceClusterReconciler) reconcileSubComponent(ctx context.Context } saved.Status.InstalledComponents[componentName] = enabled switch { + case enabled && componentName == trustyai.ComponentName: + saved.Status.InstalledComponents[componentName] = false + status.SetComponentCondition(&saved.Status.Conditions, componentName, status.ReconcileCompleted, + "TrustyAI is deprecated. Setting this field to Managed will not result in the deployment of TrustyAI.", corev1.ConditionTrue) case enabled: status.SetComponentCondition(&saved.Status.Conditions, componentName, status.ReconcileCompleted, "Component reconciled successfully", corev1.ConditionTrue) default: diff --git a/controllers/status/status.go b/controllers/status/status.go index 34310b562fc..f3fe26ef10c 100644 --- a/controllers/status/status.go +++ b/controllers/status/status.go @@ -23,6 +23,7 @@ import ( corev1 "k8s.io/api/core/v1" "github.com/opendatahub-io/opendatahub-operator/v2/components/datasciencepipelines" + "github.com/opendatahub-io/opendatahub-operator/v2/components/trustyai" ) // These constants represent the overall Phase as used by .Status.Phase. @@ -196,18 +197,35 @@ func SetCompleteCondition(conditions *[]conditionsv1.Condition, reason string, m // SetComponentCondition appends Condition Type with const ReadySuffix for given component // when component finished reconcile. func SetComponentCondition(conditions *[]conditionsv1.Condition, component string, reason string, message string, status corev1.ConditionStatus) { - condtype := component + ReadySuffix - conditionsv1.SetStatusCondition(conditions, conditionsv1.Condition{ - Type: conditionsv1.ConditionType(condtype), - Status: status, - Reason: reason, - Message: message, - }) + var condtype string + if component == trustyai.ComponentName { + condtype = component + "Deprecated" + conditionsv1.SetStatusCondition(conditions, conditionsv1.Condition{ + Type: conditionsv1.ConditionType(condtype), + Status: corev1.ConditionTrue, + Reason: reason, + Message: message, + }) + } else { + condtype = component + ReadySuffix + + conditionsv1.SetStatusCondition(conditions, conditionsv1.Condition{ + Type: conditionsv1.ConditionType(condtype), + Status: status, + Reason: reason, + Message: message, + }) + } } // RemoveComponentCondition remove Condition of giving component. func RemoveComponentCondition(conditions *[]conditionsv1.Condition, component string) { - condType := component + ReadySuffix + var condType string + if component == trustyai.ComponentName { + condType = component + "Deprecated" + } else { + condType = component + ReadySuffix + } conditionsv1.RemoveStatusCondition(conditions, conditionsv1.ConditionType(condType)) } diff --git a/docs/api-overview.md b/docs/api-overview.md index cf94a835bee..11c71c40004 100644 --- a/docs/api-overview.md +++ b/docs/api-overview.md @@ -265,6 +265,9 @@ Package trustyai provides utility functions to config TrustyAI, a bias/fairness TrustyAI struct holds the configuration for the TrustyAI component. +## DEPRECATED ## : Installation of TrustyAI operator is deprecated in RHOAI. +If TrustyAI operator is installed, it will be removed +Changes in managemenstState are not supported. diff --git a/main.go b/main.go index 43e2db5d272..d4fe49d5bb8 100644 --- a/main.go +++ b/main.go @@ -222,6 +222,12 @@ func main() { } } + // Remove TrustyAI for RHOAI + // TODO: Remove below check when trustyai manifests are removed in midstream + if err = upgrade.RemoveDeprecatedTrustyAI(setupClient, platform); err != nil { + setupLog.Error(err, "unable to remove trustyai from DSC") + } + var cleanExistingResourceFunc manager.RunnableFunc = func(ctx context.Context) error { if err = upgrade.CleanupExistingResource(ctx, setupClient, platform, dscApplicationsNamespace, dscMonitoringNamespace); err != nil { setupLog.Error(err, "unable to perform cleanup") diff --git a/pkg/upgrade/upgrade.go b/pkg/upgrade/upgrade.go index da9cc8c6d68..4c85d365759 100644 --- a/pkg/upgrade/upgrade.go +++ b/pkg/upgrade/upgrade.go @@ -36,7 +36,6 @@ import ( "github.com/opendatahub-io/opendatahub-operator/v2/components/modelmeshserving" "github.com/opendatahub-io/opendatahub-operator/v2/components/ray" "github.com/opendatahub-io/opendatahub-operator/v2/components/trainingoperator" - "github.com/opendatahub-io/opendatahub-operator/v2/components/trustyai" "github.com/opendatahub-io/opendatahub-operator/v2/components/workbenches" "github.com/opendatahub-io/opendatahub-operator/v2/pkg/cluster" "github.com/opendatahub-io/opendatahub-operator/v2/pkg/cluster/gvk" @@ -92,9 +91,6 @@ func CreateDefaultDSC(ctx context.Context, cli client.Client) error { TrainingOperator: trainingoperator.TrainingOperator{ Component: components.Component{ManagementState: operatorv1.Removed}, }, - TrustyAI: trustyai.TrustyAI{ - Component: components.Component{ManagementState: operatorv1.Removed}, - }, }, }, } @@ -431,6 +427,31 @@ func removOdhApplicationsCR(ctx context.Context, cli client.Client, gvk schema.G return nil } +func RemoveDeprecatedTrustyAI(cli client.Client, platform cluster.Platform) error { + existingDSCList := &dsc.DataScienceClusterList{} + err := cli.List(context.TODO(), existingDSCList) + if err != nil { + return fmt.Errorf("error getting existing DSC: %w", err) + } + + switch len(existingDSCList.Items) { + case 0: + return nil + case 1: + existingDSC := existingDSCList.Items[0] + if platform == cluster.ManagedRhods || platform == cluster.SelfManagedRhods { + if existingDSC.Spec.Components.TrustyAI.ManagementState != operatorv1.Removed { + existingDSC.Spec.Components.TrustyAI.ManagementState = operatorv1.Removed + err := cli.Update(context.TODO(), &existingDSC) + if err != nil { + return fmt.Errorf("error updating TrustyAI component: %w", err) + } + } + } + } + return nil +} + func RemoveLabel(cli client.Client, objectName string, labelKey string) error { foundNamespace := &corev1.Namespace{} if err := cli.Get(context.TODO(), client.ObjectKey{Name: objectName}, foundNamespace); err != nil { diff --git a/tests/e2e/helper_test.go b/tests/e2e/helper_test.go index 6a0d1d5edb8..6282b981961 100644 --- a/tests/e2e/helper_test.go +++ b/tests/e2e/helper_test.go @@ -143,7 +143,7 @@ func setupDSCInstance(name string) *dsc.DataScienceCluster { }, TrustyAI: trustyai.TrustyAI{ Component: components.Component{ - ManagementState: operatorv1.Removed, + ManagementState: operatorv1.Managed, }, }, TrainingOperator: trainingoperator.TrainingOperator{