add tester ui, and restructure folders

This commit is contained in:
2026-05-13 17:00:00 -03:00
parent 7c5aa14409
commit 6652cb26e6
17 changed files with 2656 additions and 1251 deletions

View File

@@ -23,9 +23,16 @@ docker_build(
dockerfile='Dockerfile.lambda',
ignore=['.git', 'def', '.venv', 'docs', '__pycache__', '.pytest_cache'],
live_update=[
sync('../lambda_function.py', '/app/lambda_function.py'),
# Whole functions/ directory — new files appear in the tester's
# function list automatically; edits to existing files cause uvicorn
# to drop them from the warm-cache so the next invoke is cold (the
# `reset_modules` endpoint also lets you force it manually).
sync('../functions', '/app/functions'),
sync('../invoke.py', '/app/invoke.py'),
sync('../seed.py', '/app/seed.py'),
# runner.py change → uvicorn --reload restarts the process → all
# function modules drop out of the cache, next invocation cold.
sync('../runner.py', '/app/runner.py'),
],
)
@@ -45,7 +52,18 @@ k8s_resource('lambda', resource_deps=['minio'])
k8s_resource('docs')
k8s_resource('gateway', resource_deps=['docs', 'minio'])
# Hot-reload gateway Caddy on Caddyfile edit. configMapGenerator uses
# disableNameSuffixHash so the Deployment template doesn't change → kustomize
# won't roll the pod on its own. This local_resource closes the loop.
local_resource(
'gateway-reload',
cmd='kubectl --context kind-eth -n eth rollout restart deployment/gateway',
deps=['k8s/base/Caddyfile'],
resource_deps=['gateway'],
auto_init=False,
)
k8s_resource(
objects=['eth:namespace', 'eth-config:configmap'],
objects=['eth:namespace', 'eth-config:configmap', 'gateway-config:configmap'],
new_name='infra',
)