diff --git a/bundle/manifests/rhods-operator.clusterserviceversion.yaml b/bundle/manifests/rhods-operator.clusterserviceversion.yaml index a42603a4395..92c37e909aa 100644 --- a/bundle/manifests/rhods-operator.clusterserviceversion.yaml +++ b/bundle/manifests/rhods-operator.clusterserviceversion.yaml @@ -108,6 +108,13 @@ metadata: certified: "False" containerImage: quay.io/opendatahub/opendatahub-operator:v2.0.0 createdAt: "2023-8-23T00:00:00Z" + features.operators.openshift.io/disconnected: "true" + features.operators.openshift.io/fips-compliant: "false" + features.operators.openshift.io/proxy-aware: "false" + features.operators.openshift.io/tls-profiles: "false" + features.operators.openshift.io/token-auth-aws: "false" + features.operators.openshift.io/token-auth-azure: "false" + features.operators.openshift.io/token-auth-gcp: "false" olm.skipRange: '>=1.0.0 <2.0.0' operatorframework.io/initialization-resource: |- { diff --git a/config/manifests/bases/rhods-operator.clusterserviceversion.yaml b/config/manifests/bases/rhods-operator.clusterserviceversion.yaml index 159f47bd1a8..5f616ce4738 100644 --- a/config/manifests/bases/rhods-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/rhods-operator.clusterserviceversion.yaml @@ -8,6 +8,13 @@ metadata: certified: "False" containerImage: quay.io/opendatahub/opendatahub-operator:v2.0.0 createdAt: "2023-8-23T00:00:00Z" + features.operators.openshift.io/disconnected: "true" + features.operators.openshift.io/fips-compliant: "false" + features.operators.openshift.io/proxy-aware: "false" + features.operators.openshift.io/tls-profiles: "false" + features.operators.openshift.io/token-auth-aws: "false" + features.operators.openshift.io/token-auth-azure: "false" + features.operators.openshift.io/token-auth-gcp: "false" olm.skipRange: '>=1.0.0 <2.0.0' operatorframework.io/initialization-resource: |- { diff --git a/controllers/datasciencecluster/datasciencecluster_controller.go b/controllers/datasciencecluster/datasciencecluster_controller.go index 4d66caedb82..e89958a7813 100644 --- a/controllers/datasciencecluster/datasciencecluster_controller.go +++ b/controllers/datasciencecluster/datasciencecluster_controller.go @@ -214,7 +214,7 @@ func (r *DataScienceClusterReconciler) Reconcile(ctx context.Context, req ctrl.R return ctrl.Result{}, nil } // Check preconditions if this is an upgrade - if instance.Status.Phase == status.PhaseReady { + if instance.Status.Phase == status.PhaseReady || instance.Status.Phase == status.PhaseError { // Check for existence of Argo Workflows if DSP is if instance.Spec.Components.DataSciencePipelines.ManagementState == v1.Managed { if err := datasciencepipelines.UnmanagedArgoWorkFlowExists(ctx, r.Client); err != nil { @@ -455,7 +455,7 @@ func (r *DataScienceClusterReconciler) SetupWithManager(mgr ctrl.Manager) error Owns(&admv1.MutatingWebhookConfiguration{}). Owns(&admv1.ValidatingWebhookConfiguration{}, builder.WithPredicates(modelMeshwebhookPredicates)). Owns(&corev1.ServiceAccount{}, builder.WithPredicates(saPredicates)). - Watches(&source.Kind{Type: &dsci.DSCInitialization{}}, handler.EnqueueRequestsFromMapFunc(r.watchDataScienceClusterResources)). + Watches(&source.Kind{Type: &dsci.DSCInitialization{}}, handler.EnqueueRequestsFromMapFunc(r.watchDataScienceClusterForDSCI)). Watches(&source.Kind{Type: &corev1.ConfigMap{}}, handler.EnqueueRequestsFromMapFunc(r.watchDataScienceClusterResources), builder.WithPredicates(configMapPredicates)). Watches(&source.Kind{Type: &apiextensionsv1.CustomResourceDefinition{}}, handler.EnqueueRequestsFromMapFunc(r.watchDataScienceClusterResources), builder.WithPredicates(argoWorkflowCRDPredicates)). @@ -464,6 +464,29 @@ func (r *DataScienceClusterReconciler) SetupWithManager(mgr ctrl.Manager) error Complete(r) } +func (r *DataScienceClusterReconciler) watchDataScienceClusterForDSCI(a client.Object) []reconcile.Request { + instanceList := &dsc.DataScienceClusterList{} + err := r.Client.List(context.TODO(), instanceList) + if err != nil { + return nil + } + var requestName string + switch { + case len(instanceList.Items) == 1: + requestName = instanceList.Items[0].Name + case len(instanceList.Items) == 0: + requestName = "default-dsc" + default: + return nil + } + // When DSCI CR gets created, trigger reconcile function + if a.GetObjectKind().GroupVersionKind().Kind == "DSCInitialization" || a.GetName() == "default-dsci" { + return []reconcile.Request{{ + NamespacedName: types.NamespacedName{Name: requestName}, + }} + } + return nil +} func (r *DataScienceClusterReconciler) watchDataScienceClusterResources(a client.Object) []reconcile.Request { instanceList := &dsc.DataScienceClusterList{} err := r.Client.List(context.TODO(), instanceList) @@ -480,7 +503,7 @@ func (r *DataScienceClusterReconciler) watchDataScienceClusterResources(a client return nil } - if a.GetObjectKind().GroupVersionKind().Kind == "CustomResourceDefinition" { + if a.GetObjectKind().GroupVersionKind().Kind == "CustomResourceDefinition" || a.GetName() == datasciencepipelines.ArgoWorkflowCRD { return []reconcile.Request{{ NamespacedName: types.NamespacedName{Name: requestName}, }} @@ -491,7 +514,6 @@ func (r *DataScienceClusterReconciler) watchDataScienceClusterResources(a client if err != nil { return nil } - if a.GetNamespace() == operatorNs { labels := a.GetLabels() if val, ok := labels[upgrade.DeleteConfigMapLabel]; ok && val == "true" { @@ -501,6 +523,14 @@ func (r *DataScienceClusterReconciler) watchDataScienceClusterResources(a client } return nil } + + // Trigger reconcile function when DSCInitialization from Missing to Valid + if a.GetObjectKind().GroupVersionKind().Kind == "DSCInitialization" { + return []reconcile.Request{{ + NamespacedName: types.NamespacedName{Name: requestName}, + }} + } + return nil } diff --git a/get_all_manifests.sh b/get_all_manifests.sh index 76ea3f7b666..215911c10e7 100755 --- a/get_all_manifests.sh +++ b/get_all_manifests.sh @@ -8,18 +8,18 @@ MANIFEST_ORG="red-hat-data-services" # component: notebook, dsp, kserve, dashbaord, cf/ray, trustyai, modelmesh. # in the format of "repo-org:repo-name:branch-name:source-folder:target-folder". declare -A COMPONENT_MANIFESTS=( - ["codeflare"]="red-hat-data-services:codeflare-operator:rhoai-2.8:config:codeflare" - ["ray"]="red-hat-data-services:kuberay:rhoai-2.8:ray-operator/config:ray" - ["kueue"]="red-hat-data-services:kueue:rhoai-2.8:config:kueue" - ["data-science-pipelines-operator"]="red-hat-data-services:data-science-pipelines-operator:rhoai-2.8:config:data-science-pipelines-operator" - ["kf-notebook-controller"]="red-hat-data-services:kubeflow:rhoai-2.8:components/notebook-controller/config:odh-notebook-controller/kf-notebook-controller" - ["odh-notebook-controller"]="red-hat-data-services:kubeflow:rhoai-2.8:components/odh-notebook-controller/config:odh-notebook-controller/odh-notebook-controller" - ["notebooks"]="red-hat-data-services:notebooks:rhoai-2.8:manifests:/jupyterhub/notebooks" - ["trustyai"]="red-hat-data-services:trustyai-service-operator:rhoai-2.8:config:trustyai-service-operator" - ["model-mesh"]="red-hat-data-services:modelmesh-serving:rhoai-2.8:config:model-mesh" - ["odh-model-controller"]="red-hat-data-services:odh-model-controller:rhoai-2.8:config:odh-model-controller" - ["kserve"]="red-hat-data-services:kserve:rhoai-2.8:config:kserve" - ["odh-dashboard"]="red-hat-data-services:odh-dashboard:rhoai-2.8:manifests:dashboard" + ["codeflare"]="red-hat-data-services:codeflare-operator:rhoai-2.9:config:codeflare" + ["ray"]="red-hat-data-services:kuberay:rhoai-2.9:ray-operator/config:ray" + ["kueue"]="red-hat-data-services:kueue:rhoai-2.9:config:kueue" + ["data-science-pipelines-operator"]="red-hat-data-services:data-science-pipelines-operator:rhoai-2.9:config:data-science-pipelines-operator" + ["kf-notebook-controller"]="red-hat-data-services:kubeflow:rhoai-2.9:components/notebook-controller/config:odh-notebook-controller/kf-notebook-controller" + ["odh-notebook-controller"]="red-hat-data-services:kubeflow:rhoai-2.9:components/odh-notebook-controller/config:odh-notebook-controller/odh-notebook-controller" + ["notebooks"]="red-hat-data-services:notebooks:rhoai-2.9:manifests:/jupyterhub/notebooks" + ["trustyai"]="red-hat-data-services:trustyai-service-operator:rhoai-2.9:config:trustyai-service-operator" + ["model-mesh"]="red-hat-data-services:modelmesh-serving:rhoai-2.9:config:model-mesh" + ["odh-model-controller"]="red-hat-data-services:odh-model-controller:rhoai-2.9:config:odh-model-controller" + ["kserve"]="red-hat-data-services:kserve:rhoai-2.9:config:kserve" + ["odh-dashboard"]="red-hat-data-services:odh-dashboard:rhoai-2.9:manifests:dashboard" ) # Allow overwriting repo using flags component=repo