Skip to content

Commit

Permalink
Don't restrict the nbc image update to downstream only (opendatahub-i…
Browse files Browse the repository at this point in the history
…o#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
  • Loading branch information
jstourac authored Aug 28, 2024
1 parent e2a329b commit 39b7232
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions components/workbenches/workbenches.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 39b7232

Please sign in to comment.