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 {