add tester ui, and restructure folders
This commit is contained in:
@@ -4,6 +4,22 @@
|
||||
}
|
||||
|
||||
eth.local.ar:80 {
|
||||
# API surface for the local Lambda tester (FastAPI in the lambda pod).
|
||||
# Path-based is fine for our own API — no SPA assumes ownership of `/`,
|
||||
# and a single origin means no CORS headaches with the frontend at /.
|
||||
handle_path /runner/* {
|
||||
reverse_proxy lambda:8000
|
||||
}
|
||||
|
||||
# Everything else → static docs viewer (the frontend lives here too).
|
||||
handle {
|
||||
reverse_proxy docs:80
|
||||
}
|
||||
}
|
||||
|
||||
docs.eth.local.ar:80 {
|
||||
# Serve /docs.html for the root path; everything else (graphs, viewer.html) passes through.
|
||||
rewrite / /docs.html
|
||||
reverse_proxy docs:80
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,14 @@ resources:
|
||||
- gateway.yaml
|
||||
|
||||
# Generate the gateway Caddyfile ConfigMap from the standalone file.
|
||||
# Hash suffix is on by default — when Caddyfile changes, the ConfigMap gets
|
||||
# a new hashed name, kustomize rewrites the Deployment volume reference,
|
||||
# and the gateway pod restarts automatically with the new config.
|
||||
# Hash suffix disabled so the name stays static — lets Tilt group it under
|
||||
# the 'infra' resource (no "uncategorized" pill). Trade-off: pod doesn't
|
||||
# auto-restart on Caddyfile change; the Tiltfile has a local_resource
|
||||
# 'gateway-reload' that does `kubectl rollout restart` whenever Caddyfile
|
||||
# is edited, so the experience is the same in practice.
|
||||
configMapGenerator:
|
||||
- name: gateway-config
|
||||
files:
|
||||
- Caddyfile
|
||||
options:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
@@ -16,8 +16,14 @@ spec:
|
||||
containers:
|
||||
- name: lambda
|
||||
image: eth-lambda
|
||||
command: ["sleep", "infinity"]
|
||||
# The container runs the FastAPI runner (see runner.py + Dockerfile).
|
||||
# The CMD comes from the Dockerfile (uvicorn). Container also stays
|
||||
# exec-able for `bash ctrl/seed.sh` / `bash ctrl/invoke.sh` which
|
||||
# spawn separate python processes alongside uvicorn.
|
||||
workingDir: /app
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8000
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: eth-config
|
||||
@@ -25,14 +31,33 @@ spec:
|
||||
- name: documents
|
||||
mountPath: /mnt/documents
|
||||
readOnly: true
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 5
|
||||
resources:
|
||||
requests:
|
||||
memory: 128Mi
|
||||
cpu: 100m
|
||||
limits:
|
||||
memory: 512Mi
|
||||
memory: 1Gi
|
||||
volumes:
|
||||
- name: documents
|
||||
hostPath:
|
||||
path: /mnt/documents
|
||||
type: Directory
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: lambda
|
||||
namespace: eth
|
||||
spec:
|
||||
selector:
|
||||
app: lambda
|
||||
ports:
|
||||
- name: http
|
||||
port: 8000
|
||||
targetPort: 8000
|
||||
|
||||
Reference in New Issue
Block a user