From 3908a7d9d62be58ad557d7763eae336f41e923e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20St=C3=A4bler?= Date: Tue, 3 Feb 2026 15:47:15 +0100 Subject: [PATCH] Only update middleware when function is deployed already --- internal/controller/function_controller.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/controller/function_controller.go b/internal/controller/function_controller.go index c694039..0944966 100644 --- a/internal/controller/function_controller.go +++ b/internal/controller/function_controller.go @@ -233,12 +233,8 @@ func (r *FunctionReconciler) ensureDeployment(ctx context.Context, function *v1a } if !deployed { - logger.Info("Function is not deployed. Deploying now") - if err := r.deploy(ctx, function, repo); err != nil { - function.MarkDeployNotReady("DeployFailed", "Deployment failed: %s", err.Error()) - return fmt.Errorf("failed to deploy function: %w", err) - } - function.MarkDeployReady() + logger.Info("Function is not deployed") + function.MarkDeployNotReady("NotDeployed", "Function not deployed yet") return nil }