From 6f76ecbc81bed2716bec768e2d9578b577306ca5 Mon Sep 17 00:00:00 2001 From: Naeel Date: Fri, 20 Mar 2026 21:52:49 +0300 Subject: [PATCH] =?UTF-8?q?fix(invoke):=20=D0=B7=D0=B0=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20FunctionRef=20=D0=BD=D0=B0=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=B8=D0=B7=20Function.Spec=20=E2=80=94=20Funct?= =?UTF-8?q?ionJobSpec=20=D1=81=D0=B0=D0=BC=D0=BE=D0=B4=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=82=D0=BE=D1=87=D0=B5=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/api/handler/invoke.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/internal/api/handler/invoke.go b/internal/api/handler/invoke.go index 7dc2c7b..83a165c 100644 --- a/internal/api/handler/invoke.go +++ b/internal/api/handler/invoke.go @@ -175,15 +175,22 @@ func (h *Handler) invokeFunctionJob(w http.ResponseWriter, r *http.Request, ns, jobName = jobName[:63] } + // Копируем поля из Function CRD — FunctionJob теперь самодостаточен (FunctionRef удалён). fj := &slessv1alpha1.FunctionJob{ ObjectMeta: metav1.ObjectMeta{ Name: jobName, Namespace: ns, }, Spec: slessv1alpha1.FunctionJobSpec{ - FunctionRef: name, - EventJSON: eventJSON, - RunID: time.Now().UnixNano(), + Runtime: fn.Spec.Runtime, + Entrypoint: fn.Spec.Entrypoint, + S3Bucket: fn.Spec.S3Bucket, + S3Key: fn.Spec.S3Key, + MemoryMB: fn.Spec.MemoryMB, + TimeoutSec: fn.Spec.TimeoutSec, + Env: fn.Spec.Env, + EventJSON: eventJSON, + RunID: time.Now().UnixNano(), }, } if err := h.K8s.Create(r.Context(), fj); err != nil {