Naeel
6447f17aca
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
24c32423f6
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
cd18d33f4c
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
fa07b3230f
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
8b69adc882
feat: add funcs endpoint — list all functions with triggers for UI
2026-03-18 10:05:15 +03:00
Naeel
420b6ae650
feat: POSTGRES example — add pg-table-reader HTTP function
2026-03-18 09:23:13 +03:00
Naeel
3d6535f08d
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
3e8d07766e
fix: remove all prod endpoint references from examples (test stand only)
2026-03-18 08:08:20 +03:00
Naeel
b88df78ee5
docs: E2E results 2026-03-17 — all 4 examples PASS on test stand
2026-03-18 06:27:57 +03:00
“Naeel”
44d72a9d21
0
2026-03-15 09:38:27 +04:00
Naeel
e9d45884ef
feat: demo managed functions with harbor-backed operator setup
2026-03-14 18:16:53 +03:00
Naeel
b7bf75038c
chore: ignore *.tfvars in examples, remove ai_hint_level from pg-list-python
2026-03-12 09:21:20 +03:00
Naeel
c4606e5d05
chore: provider v0.1.18, update examples (harbor branch)
2026-03-12 09:19:17 +03:00
“Naeel”
ad77f5a021
chore: terraform.tfvars.change — инструкция по переименованию
2026-03-11 18:38:51 +04:00
“Naeel”
f674023116
chore: добавлены terraform.tfvars.change — шаблоны для токена (переименовать в terraform.tfvars)
2026-03-11 18:38:07 +04:00
“Naeel”
19b245bdab
fix: ModifyPlan — terraform plan теперь видит изменения в source_dir (provider v0.1.16)
2026-03-11 18:27:46 +04:00
“Naeel”
27731ee5f7
security: убраны реальные токены из terraform.tfvars + инструкция в README
2026-03-11 17:41:34 +04:00
“Naeel”
987a58fb03
docs: README для примера pg-list-python
2026-03-11 17:24:34 +04:00
“Naeel”
09a955af5c
fix: восстановлен requirements.txt после теста
2026-03-11 16:54:53 +04:00
“Naeel”
2fec2dad18
test: невалидный requirements.txt
2026-03-11 16:53:01 +04:00
“Naeel”
d084cb5fed
docs: переработан examples/README.md + комментарии function.tf
2026-03-11 16:48:01 +04:00
“Naeel”
0d97da1faf
fix: Decimal→float для JSON сериализации price
2026-03-11 16:39:56 +04:00
“Naeel”
62bf905a6d
feat: пример pg-list-python — список из PostgreSQL без джоба
2026-03-11 16:37:22 +04:00
“Naeel”
863a2b1b06
chore: удалён отладочный push-sample (Harbor интеграция закончена)
2026-03-11 16:33:26 +04:00
“Naeel”
5ed8f07c2e
fix: go1.23 build context — COPY . /app/handler/ вместо COPY handler/
2026-03-11 16:14:42 +04:00
“Naeel”
e381c00bec
refactor: rename handler.go→greeting.go, buildGreeting() in hello-go example
2026-03-11 16:02:49 +04:00
“Naeel”
1d022a6fa1
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”
dcf2f68fd2
chore: staged files from prev session (gitignore, examples, harbor guide)
2026-03-11 14:36:32 +04:00
“Naeel”
a3c1632cee
test: E2E скрипт run_e2e_tests.sh + fix provider token/version в примерах
2026-03-11 10:49:36 +04:00
“Naeel”
2362745aa2
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”
dbb10b2658
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”
5955a62d99
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”
6c11ebd1e1
docs: clarify sless_function description
2026-03-09 20:24:59 +04:00
“Naeel”
a914d60826
docs: remove informal tone from README
2026-03-09 20:24:23 +04:00
“Naeel”
b6bb1a01cd
docs: add project description and resource types to examples README
2026-03-09 20:23:31 +04:00
“Naeel”
58e9e6119b
fix: restore token in provider blocks (dev-token-change-me is the real token)
2026-03-09 19:51:27 +04:00
“Naeel”
50100040e8
chore: remove hardcoded token from examples, use SLESS_API_TOKEN env
2026-03-09 19:25:52 +04:00
“Naeel”
1c063797f9
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”
6aa01978ad
chore: удалён пример pg-query
2026-03-09 17:46:52 +04:00
“Naeel”
94ed02f631
feat: provider v0.1.10 — source_dir (zip внутри провайдера), убран archive провайдер из всех примеров
2026-03-09 17:45:45 +04:00
“Naeel”
addce19cfe
docs: examples/README.md — порядок simple-first, без токена, без pg-query
2026-03-09 15:57:29 +04:00
“Naeel”
a309c72146
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”
d0ef085705
feat: provider v0.1.9 — namespace removed from resources, moved to provider block
2026-03-09 15:12:07 +04:00
“Naeel”
c4837b193e
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”
d075a7c0f6
feat: outputs — статус init-джобов для пользователя без kubectl
2026-03-09 14:09:55 +04:00
“Naeel”
662710713e
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”
9a48a6fcec
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”
b90b1bd7a6
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”
360f136989
refactor: pg-query — ресурсы вынесены в pg-query.tf, main.tf только провайдеры
2026-03-09 09:11:31 +04:00
“Naeel”
dabb290b7c
refactor: pg-query — code/ исходники, dist/ zip, archive_file datasource
2026-03-09 09:07:57 +04:00