From 39b7232af026cd6a4c9540aed1a9b07577c2a205 Mon Sep 17 00:00:00 2001 From: Jan Stourac Date: Wed, 28 Aug 2024 21:28:50 +0200 Subject: [PATCH] Don't restrict the nbc image update to downstream only (#1170) This should address the [1]. With current code it wasn't possible to override the images used for the notebook controllers via env property, now it should be possible. [1] https://issues.redhat.com/browse/RHOAIENG-11134 --- components/workbenches/workbenches.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/components/workbenches/workbenches.go b/components/workbenches/workbenches.go index 5875b1e848f..a10addccf70 100644 --- a/components/workbenches/workbenches.go +++ b/components/workbenches/workbenches.go @@ -136,18 +136,16 @@ func (w *Workbenches) ReconcileComponent(ctx context.Context, cli client.Client, } l.WithValues("Path", notebookControllerPath).Info("apply manifests done NBC") - // Update image parameters for nbc in downstream + // Update image parameters for nbc if enabled { if (dscispec.DevFlags == nil || dscispec.DevFlags.ManifestsUri == "") && (w.DevFlags == nil || len(w.DevFlags.Manifests) == 0) { - if platform == cluster.ManagedRhods || platform == cluster.SelfManagedRhods { - // for kf-notebook-controller image - if err := deploy.ApplyParams(notebookControllerPath, imageParamMap); err != nil { - return fmt.Errorf("failed to update image %s: %w", notebookControllerPath, err) - } - // for odh-notebook-controller image - if err := deploy.ApplyParams(kfnotebookControllerPath, imageParamMap); err != nil { - return fmt.Errorf("failed to update image %s: %w", kfnotebookControllerPath, err) - } + // for kf-notebook-controller image + if err := deploy.ApplyParams(notebookControllerPath, imageParamMap); err != nil { + return fmt.Errorf("failed to update image %s: %w", notebookControllerPath, err) + } + // for odh-notebook-controller image + if err := deploy.ApplyParams(kfnotebookControllerPath, imageParamMap); err != nil { + return fmt.Errorf("failed to update image %s: %w", kfnotebookControllerPath, err) } } }