Skip to content

Commit

Permalink
backport(workbench): support images in two path in downstream (openda…
Browse files Browse the repository at this point in the history
…tahub-io#663)

Signed-off-by: Wen Zhou <[email protected]>
  • Loading branch information
zdtsw authored Nov 2, 2023
1 parent d356d80 commit 09c0785
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions components/workbenches/workbenches.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand All @@ -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
}
}
Expand Down

0 comments on commit 09c0785

Please sign in to comment.