Naeel
d87981713d
test: полный прогон POSTGRES example — changes, delete/recreate, new function
2026-03-19 18:45:18 +03:00
Naeel
d286d92a05
fix: invoke.go — forward Content-Length to proxied request (form POST fix)
...
Without ContentLength, Python BaseHTTPRequestHandler read 0 bytes from body.
operator v0.1.37, python runtime v0.1.4, pg-table-writer HTML form
2026-03-19 08:58:35 +03:00
Naeel
a04dfb2d0c
fix+docs: FunctionJob label bugfix, job ErrAlreadyExists, python str→text/plain, operator.yaml v0.1.33, progress.md
...
- controllers/functionjob_controller.go:
- PodTemplate labels: functionjob=, function= (k8s 1.27+ удалил job-name=)
- getJobPodOutput принимает labelSelector вместо jobName
- захват stderr при Failed job; truncateForStatus() helper
- terraform/provider/internal/client/client.go: ErrJobAlreadyExists (409 Conflict)
- terraform/provider/internal/resources/job_resource.go: при конфликте создания — читаем существующий job
- runtimes/python3.11/server.py: str return → text/plain
- internal/builder/context.go: python runtime base image → v0.1.3
- deployments/k8s/operator.yaml: image → v0.1.33
- doc/progress.md: добавлены секции FunctionJob bugfix, str→text/plain, web-console v0.2.0
2026-03-18 17:41:44 +03:00
Naeel
e8cd62e171
feat: funcs as global Go service (sless-funcs-service:v0.1.1)
...
- services/funcs/main.go: standalone Go HTTP server
extracts JWT sub -> SHA256[:8] -> namespace -> calls operator API
returns plain text list, sorted active first, /health probe endpoint
- services/funcs/Dockerfile: multi-stage Go build -> alpine
- deployments/k8s/funcs-service.yaml: Deployment+Service+Ingress in sless ns
ingress path /funcs -> sless-funcs-service:8090, reuses sless-operator-tls
- examples/POSTGRES/resources.tf: removed funcs_list function+trigger+output
Image: naeel/sless-funcs-service:v0.1.1
2026-03-18 15:58:08 +03:00
Naeel
9bc91841c8
feat: NodeJS pg-info function; funcs endpoint: filter + created_at/last_built_at; operator v0.1.32
2026-03-18 11:03:58 +03:00
Naeel
6010649e7b
feat: add funcs endpoint — list all functions with triggers for UI
2026-03-18 10:05:15 +03:00
Naeel
ba0375d47e
feat: POSTGRES example — add pg-table-reader HTTP function
2026-03-18 09:23:13 +03:00
Naeel
cca3a8cdc1
fix: migrate sless endpoint from sless-api.kube5s.ru to sless.kube5s.ru (new cluster ingress 185.247.187.147)
2026-03-18 08:48:50 +03:00
Naeel
8f841e8c81
fix: remove all prod endpoint references from examples (test stand only)
2026-03-18 08:08:20 +03:00
Naeel
5d9045babc
docs: E2E results 2026-03-17 — all 4 examples PASS on test stand
2026-03-18 06:27:57 +03:00
“Naeel”
1294ad993f
0
2026-03-15 09:38:27 +04:00
Naeel
8dd5b676c0
feat: demo managed functions with harbor-backed operator setup
2026-03-14 18:16:53 +03:00
Naeel
cbd2c8c44c
chore: ignore *.tfvars in examples, remove ai_hint_level from pg-list-python
2026-03-12 09:21:20 +03:00
Naeel
2798f3b896
chore: provider v0.1.18, update examples (harbor branch)
2026-03-12 09:19:17 +03:00
“Naeel”
0011bd0f39
chore: terraform.tfvars.change — инструкция по переименованию
2026-03-11 18:38:51 +04:00
“Naeel”
20fb5f6539
chore: добавлены terraform.tfvars.change — шаблоны для токена (переименовать в terraform.tfvars)
2026-03-11 18:38:07 +04:00
“Naeel”
57193536f3
fix: ModifyPlan — terraform plan теперь видит изменения в source_dir (provider v0.1.16)
2026-03-11 18:27:46 +04:00
“Naeel”
d3c54eb521
security: убраны реальные токены из terraform.tfvars + инструкция в README
2026-03-11 17:41:34 +04:00
“Naeel”
e5e6d273d2
docs: README для примера pg-list-python
2026-03-11 17:24:34 +04:00
“Naeel”
d6a2e224ca
fix: восстановлен requirements.txt после теста
2026-03-11 16:54:53 +04:00
“Naeel”
000d45ad6f
test: невалидный requirements.txt
2026-03-11 16:53:01 +04:00
“Naeel”
5c6a37313b
docs: переработан examples/README.md + комментарии function.tf
2026-03-11 16:48:01 +04:00
“Naeel”
81be52f6ef
fix: Decimal→float для JSON сериализации price
2026-03-11 16:39:56 +04:00
“Naeel”
2ca3137c0b
feat: пример pg-list-python — список из PostgreSQL без джоба
2026-03-11 16:37:22 +04:00
“Naeel”
64bd495cf9
chore: удалён отладочный push-sample (Harbor интеграция закончена)
2026-03-11 16:33:26 +04:00
“Naeel”
c4559dd365
fix: go1.23 build context — COPY . /app/handler/ вместо COPY handler/
2026-03-11 16:14:42 +04:00
“Naeel”
78d11aeb26
refactor: rename handler.go→greeting.go, buildGreeting() in hello-go example
2026-03-11 16:02:49 +04:00
“Naeel”
a709b38f6b
feat: go1.23 runtime support
...
- runtimes/go1.23/server.go: HTTP-wrapper + job-runner (SLESS_MODE=job)
- runtimes/go1.23/go.mod: module sless/fn (изолирует от корневого go.mod)
- runtimes/go1.23/Dockerfile: multi-stage build (golang:1.23-alpine → alpine:3.20)
- internal/builder/context.go: go1.23 в runtimeBaseImage + generateDockerfile
- controllers/functionjob_controller.go: go1.23 runner (nil cmd + SLESS_MODE=job env)
- api/v1alpha1/function_types.go: enum go1.21 → go1.23
- config/crd/bases/...: CRD обновлён
- terraform/provider: OneOf обновлён
- examples/hello-go: HTTP + job примеры на go1.23
- deployments/k8s/operator.yaml: v0.1.25
2026-03-11 15:40:47 +04:00
“Naeel”
869d728684
chore: staged files from prev session (gitignore, examples, harbor guide)
2026-03-11 14:36:32 +04:00
“Naeel”
6c6040d8f8
test: E2E скрипт run_e2e_tests.sh + fix provider token/version в примерах
2026-03-11 10:49:36 +04:00
“Naeel”
a1774e178f
refactor: SoC — EnsureNamespace в namespace.go, маршрут /ensure, client.EnsureNamespace, fix secrets в .gitignore
...
- handler.go: убраны бизнес-логика и k8s-типы (corev1/k8serrors/metav1)
handler.go теперь только инфраструктура: Handler struct + helpers
- namespace.go: новый файл — EnsureNamespace хендлер живёт здесь
SoC: создание namespace — отдельная ответственность, не смешивается с CRUD
- router.go: добавлен маршрут POST /v1/namespaces/{namespace}/ensure
- client.go: добавлен метод EnsureNamespace(ctx, ns) → POST /ensure
- provider.go: Configure() вызывает c.EnsureNamespace(ctx, namespace) после создания Client
Namespace создаётся ОДИН РАЗ при инициализации провайдера
Resource-хендлеры (Function, Trigger, Job) namespace не трогают
- .gitignore: добавлена директория secrets/ (токены, ключи)
- provider v0.1.13, operator v0.1.21
Operator: naeel/sless-operator:v0.1.21
Provider: terra.k8c.ru/naeel/sless v0.1.13
2026-03-11 08:37:33 +04:00
“Naeel”
5ae2ee7f85
feat: JWT auth in operator + hello-node example updated
...
- operator: auth middleware теперь валидирует JWT (sub+exp), не статический токен
- operator: ensureNamespace идемпотентен при race condition (IsAlreadyExists)
- operator: NewRouter убран параметр apiToken — больше не нужен
- examples/hello-node: prod.token + nubes_endpoint + версия провайдера 0.1.12
- протестировано: namespace sless-cdd874dfa31ba6ca создан автоматически
2026-03-11 07:51:06 +04:00
“Naeel”
80991d2aab
docs: update progress.md, errors/log.md; add gitignore for dist/ and tfstate backups
...
- doc/progress.md: обновлена версия до operator v0.1.18 / provider v0.1.11,
добавлен блок source_dir + fix destroy cleanup (2026-03-09),
уточнены комментарии к контроллерам и trigger_resource
- doc/errors/log.md: добавлены две записи — source_dir/hashicorp/archive,
destroy route cleanup bug (три причины + решения)
- .gitignore: добавлены examples/*/dist/ и terraform.tfstate.*.backup
- examples/: удалены dist/ zip и tfstate.*.backup из трекинга
2026-03-09 20:29:27 +04:00
“Naeel”
26dce8f996
docs: clarify sless_function description
2026-03-09 20:24:59 +04:00
“Naeel”
f4c03481e5
docs: remove informal tone from README
2026-03-09 20:24:23 +04:00
“Naeel”
30e34fde8e
docs: add project description and resource types to examples README
2026-03-09 20:23:31 +04:00
“Naeel”
0b0a50d03a
fix: restore token in provider blocks (dev-token-change-me is the real token)
2026-03-09 19:51:27 +04:00
“Naeel”
42645f3967
chore: remove hardcoded token from examples, use SLESS_API_TOKEN env
2026-03-09 19:25:52 +04:00
“Naeel”
1676bf3c5a
fix: destroy route cleanup bug — delete Service+Ingress on trigger/function deletion
...
- controllers/trigger_controller.go: handleTriggerDeletion теперь удаляет Service
и Ingress из sless-fn-{ns} при удалении HTTP-триггера
- controllers/function_controller.go: handleDeletion теперь удаляет Service и Ingress
(имена совпадают с fn.Name); добавлен импорт netv1
- terraform/provider trigger_resource.go: Delete ждёт пока GetTrigger вернёт 404
(до 90с) — провайдер не возвращает успех раньше чем cleanup завершён
- examples: версия провайдера обновлена до ~> 0.1.11
Operator: naeel/sless-operator:v0.1.17
Provider: v0.1.11
Fixes DESTROY_ROUTE_CLEANUP_BUG.md
2026-03-09 19:23:28 +04:00
“Naeel”
9b4ec729b5
chore: удалён пример pg-query
2026-03-09 17:46:52 +04:00
“Naeel”
5f913e9f25
feat: provider v0.1.10 — source_dir (zip внутри провайдера), убран archive провайдер из всех примеров
2026-03-09 17:45:45 +04:00
“Naeel”
6e236e5998
docs: examples/README.md — порядок simple-first, без токена, без pg-query
2026-03-09 15:57:29 +04:00
“Naeel”
5faec45a04
feat: provider v0.1.9 — namespace hardcoded in client, removed from provider schema and all examples
2026-03-09 15:27:55 +04:00
“Naeel”
17d32fcb39
feat: provider v0.1.9 — namespace removed from resources, moved to provider block
2026-03-09 15:12:07 +04:00
“Naeel”
0aaeb47b3b
feat: operator v0.1.16 — job stdout -> status.Message (feature B)
...
- FunctionJobReconciler: added KubeClient field (kubernetes.Interface)
- getJobPodOutput(): reads pod logs via typed client after job succeeds
- main.go: inject kubernetes.NewForConfigOrDie into FunctionJobReconciler
- rbac.yaml: add pods/pods/log get/list/watch permissions
- examples/simple-python/: job->function chain demo (Python)
- examples/simple-node/: job->function chain demo (Node.js)
sless_job.X.message now contains the return value of the function
2026-03-09 14:50:06 +04:00
“Naeel”
53d9fa6e74
feat: outputs — статус init-джобов для пользователя без kubectl
2026-03-09 14:09:55 +04:00
“Naeel”
cefef54936
refactor: уникальные имена функций-обработчиков
...
handle() → run_sql() (sql_runner.py, entrypoint: sql_runner.run_sql)
handle() → crud() (notes_crud.py, entrypoint: notes_crud.crud)
handle() → list_notes() (notes_list.py, entrypoint: notes_list.list_notes)
2026-03-09 10:14:36 +04:00
“Naeel”
7dffc61c84
refactor: notes-python — описательные имена файлов/ресурсов + комментарии
...
Python файлы:
- handler.py → sql_runner.py (entrypoint: sql_runner.handle)
- handler.py → notes_crud.py (entrypoint: notes_crud.handle)
- handler.py → notes_list.py (entrypoint: notes_list.handle)
TF ресурсы переименованы:
- sless_function.notes → sless_function.notes_crud
- sless_trigger.notes_http → sless_trigger.notes_crud_http
- sless_job.create_table → sless_job.notes_table_init
- sless_job.create_index → sless_job.notes_index_init
- archive_file.notes → archive_file.notes_crud_zip
- archive_file.sql_runner → archive_file.sql_runner_zip
- archive_file.notes_list → archive_file.notes_list_zip
Добавлены подробные комментарии во все .tf файлы
2026-03-09 10:10:43 +04:00
“Naeel”
88a0fb9db6
feat: notes-python CRUD example + runtime path/query forwarding
...
- invoke.go: forward sub-path and query string to function pods
- server.js v0.1.2: add _path, _query, _method to event
- server.py v0.1.1: add _path, _query, _method to event
- upload.go: bump runtime versions (nodejs20:v0.1.2, python3.11:v0.1.1)
- examples/notes-python: CRUD notes via sub-path routing
- sql-runner: generic SQL executor for DDL jobs
- notes: CRUD router (/add, /update, /delete)
- notes-list: SELECT all notes
- init.tf: create TABLE + INDEX on apply
2026-03-09 09:51:56 +04:00
“Naeel”
0066d9c0f9
refactor: pg-query — ресурсы вынесены в pg-query.tf, main.tf только провайдеры
2026-03-09 09:11:31 +04:00