From 49d5cd45e59eb3cd48da977e202f7aba1dfa90cf Mon Sep 17 00:00:00 2001 From: Yauheni Kaliuta Date: Thu, 15 Aug 2024 10:31:24 +0300 Subject: [PATCH] kserve: call ApplyParams only for enabled case Unify the logic with other components. Looks like 7afb0cf9989f ("fix(DSCI): change serviceMesh and trustCAbundle to pointer type (#885)") by accident took the snippet out of the condition. Signed-off-by: Yauheni Kaliuta --- components/kserve/kserve.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/components/kserve/kserve.go b/components/kserve/kserve.go index 72fb0b1e9fa..2134b0aeb06 100644 --- a/components/kserve/kserve.go +++ b/components/kserve/kserve.go @@ -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) + } } }