Skip to content

Commit

Permalink
kserve: call ApplyParams only for enabled case
Browse files Browse the repository at this point in the history
Unify the logic with other components.

Looks like
7afb0cf ("fix(DSCI): change serviceMesh and trustCAbundle to pointer type (#885)")
by accident took the snippet out of the condition.

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
  • Loading branch information
ykaliuta committed Aug 15, 2024
1 parent 4d3ed37 commit 49d5cd4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions components/kserve/kserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,11 @@ func (k *Kserve) ReconcileComponent(ctx context.Context, cli client.Client,
return err
}
}
}

// Update image parameters only when we do not have customized manifests set
if (dscispec.DevFlags == nil || dscispec.DevFlags.ManifestsUri == "") && (k.DevFlags == nil || len(k.DevFlags.Manifests) == 0) {
if err := deploy.ApplyParams(Path, imageParamMap, false); err != nil {
return fmt.Errorf("failed to update image from %s : %w", Path, err)
// Update image parameters only when we do not have customized manifests set
if (dscispec.DevFlags == nil || dscispec.DevFlags.ManifestsUri == "") && (k.DevFlags == nil || len(k.DevFlags.Manifests) == 0) {
if err := deploy.ApplyParams(Path, imageParamMap, false); err != nil {
return fmt.Errorf("failed to update image from %s : %w", Path, err)
}
}
}

Expand Down

0 comments on commit 49d5cd4

Please sign in to comment.