From 11a10bda345c2fb12a0b6116682e7ea9e62d7320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20St=C3=A4bler?= Date: Thu, 5 Feb 2026 10:49:37 +0100 Subject: [PATCH] Only update middleware when function is deployed already (#13) --- 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 }