From 09c0785e6d5da698fcc8e5ef699f6f416d49c342 Mon Sep 17 00:00:00 2001 From: Wen Zhou Date: Thu, 2 Nov 2023 11:29:46 +0100 Subject: [PATCH] backport(workbench): support images in two path in downstream (#663) Signed-off-by: Wen Zhou --- components/workbenches/workbenches.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/components/workbenches/workbenches.go b/components/workbenches/workbenches.go index 45ceab7dd34..fc4963dc826 100644 --- a/components/workbenches/workbenches.go +++ b/components/workbenches/workbenches.go @@ -20,7 +20,7 @@ var ( DependentComponentName = "notebooks" // manifests for nbc in ODH and downstream + downstream use it for imageparams notebookControllerPath = deploy.DefaultManifestPath + "/odh-notebook-controller/odh-notebook-controller/base" - // manifests for ODH nbc + // manifests for ODH nbc + downstream use it for imageparams kfnotebookControllerPath = deploy.DefaultManifestPath + "/odh-notebook-controller/kf-notebook-controller/overlays/openshift" notebookImagesPath = deploy.DefaultManifestPath + "/notebooks/overlays/additional" notebookImagesPathSupported = deploy.DefaultManifestPath + "/jupyterhub/notebook-images/overlays/additional" @@ -134,15 +134,19 @@ func (w *Workbenches) ReconcileComponent(cli client.Client, owner metav1.Object, if enabled { if dscispec.DevFlags.ManifestsUri == "" && len(w.DevFlags.Manifests) == 0 { if platform == deploy.ManagedRhods || platform == deploy.SelfManagedRhods { + // for kf-notebook-controller image if err := deploy.ApplyParams(notebookControllerPath, w.SetImageParamsMap(imageParamMap), false); err != nil { return err } + // for odh-notebook-controller image + if err := deploy.ApplyParams(kfnotebookControllerPath, w.SetImageParamsMap(imageParamMap), false); err != nil { + return err + } } } } if platform == deploy.OpenDataHub || platform == "" { - // only for ODH after transit to kubeflow repo err = deploy.DeployManifestsFromPath(cli, owner, kfnotebookControllerPath, dscispec.ApplicationsNamespace, @@ -158,7 +162,11 @@ func (w *Workbenches) ReconcileComponent(cli client.Client, owner metav1.Object, enabled) return err } else { - err = deploy.DeployManifestsFromPath(cli, owner, notebookImagesPathSupported, dscispec.ApplicationsNamespace, ComponentName, enabled) + err = deploy.DeployManifestsFromPath(cli, owner, + notebookImagesPathSupported, + dscispec.ApplicationsNamespace, + ComponentName, + enabled) return err } }