From 249513f4090fa56f1780b3a9e0361651bf1f8759 Mon Sep 17 00:00:00 2001 From: Daniele Date: Wed, 19 Jun 2024 18:23:22 +0200 Subject: [PATCH] inferenceservice controller: fix error check in Serverless mode (#3753) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniele Trifirò --- pkg/controller/v1beta1/inferenceservice/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/v1beta1/inferenceservice/controller.go b/pkg/controller/v1beta1/inferenceservice/controller.go index d4d383d4bf7..dfdce7dd119 100644 --- a/pkg/controller/v1beta1/inferenceservice/controller.go +++ b/pkg/controller/v1beta1/inferenceservice/controller.go @@ -170,7 +170,7 @@ func (r *InferenceServiceReconciler) Reconcile(ctx context.Context, req ctrl.Req // Abort early if the resolved deployment mode is Serverless, but Knative Services are not available if deploymentMode == constants.Serverless { ksvcAvailable, checkKsvcErr := utils.IsCrdAvailable(r.ClientConfig, knservingv1.SchemeGroupVersion.String(), constants.KnativeServiceKind) - if err != nil { + if checkKsvcErr != nil { return reconcile.Result{}, checkKsvcErr }