API Service
Overview
Section titled “Overview”The Kubernetes API image hosts the standard Flow-Like API router plus deployment-specific health probes and a separate metrics listener. It does not add a second /jobs/* API.
HTTP surfaces
Section titled “HTTP surfaces”| Surface | Default port | Purpose |
|---|---:|---|
| /api/v1/* | 8080 | Standard Flow-Like hub, app, event, execution, registry, sink, and administration routes |
| /health/live | 8080 | Kubernetes liveness probe |
| /health/ready | 8080 | Kubernetes readiness probe |
| /health/startup | 8080 | Kubernetes startup probe |
| /swagger-ui | 8080 | Interactive API documentation |
| /api-doc/openapi.json | 8080 | Generated OpenAPI document |
| /r/* and /m/* | 8080 | Registered inbound REST and MCP routes; each registration enforces its own authorization |
| /metrics | 9090 | Prometheus metrics listener |
The main router's /api/v1/execution/* routes report and query runs. Workflow invocation is exposed through app and event routes, then dispatched through the configured execution backend.
Runtime dependencies
Section titled “Runtime dependencies”| Dependency | Role | |---|---| | PostgreSQL or CockroachDB | Durable API state, apps, events, runs, and registry metadata | | Redis | Shared queue/cache coordination used by the configured backend | | Object storage | Content, metadata, and registry artifacts | | Executor pool | Runs workflows through the implemented HTTP executor path | | Compiler, when enabled | Builds platform-specific WASM artifacts |
The API constructs the shared Flow-Like router, starts the run sweeper, and initializes object storage before it begins listening.
The API can create Kubernetes Job objects, but the checked-in executor's
job-once entrypoint is a placeholder that exits. Treat kubernetes_job as an
incomplete dispatch path, not an alternative runtime dependency.
Source code
Section titled “Source code”| Component | Location |
|---|---|
| Kubernetes entry point | apps/backend/kubernetes/api/src/main.rs |
| Environment configuration | apps/backend/kubernetes/api/src/config.rs |
| Kubernetes probe handlers | apps/backend/kubernetes/api/src/health.rs |
| Metrics listener | apps/backend/kubernetes/api/src/metrics.rs |
| Object-store adapter | apps/backend/kubernetes/api/src/storage.rs |
| Shared API router | packages/api/src/lib.rs |
| Execution dispatch | packages/api/src/execution/ |
Configuration
Section titled “Configuration”The Helm chart injects:
DATABASE_URLandREDIS_URL;- storage provider settings and credentials;
- execution JWT keys;
- execution-backend and executor settings;
PORT=8080andMETRICS_PORT=9090.
PORT is configurable in the binary, but the chart intentionally fixes the container HTTP port at 8080 and maps the API Service to it. Storage-specific requirements are covered in Storage Configuration.
Access the service locally
Section titled “Access the service locally”kubectl port-forward service/flow-like-api 8083:8080 -n flow-likeIn another terminal:
curl -fsS http://localhost:8083/health/livecurl -fsS http://localhost:8083/api/v1/healthPort forwarding is for operator access and development. Use an authenticated Ingress or another controlled edge for persistent external access.
Scaling
Section titled “Scaling”The chart defaults to one API replica with autoscaling disabled.
| Value | Default |
|---|---:|
| api.replicaCount | 1 |
| api.autoscaling.enabled | false |
| api.autoscaling.minReplicas | 1 |
| api.autoscaling.maxReplicas | 10 |
| CPU target | 70% |
| Memory target | 80% |
When autoscaling is enabled, the chart omits the Deployment replica count and creates an HPA. Confirm that the cluster metrics API is available before enabling it.
Logs and rollout status
Section titled “Logs and rollout status”kubectl logs deployment/flow-like-api -n flow-like --tail=100kubectl logs deployment/flow-like-api -n flow-like --followkubectl rollout status deployment/flow-like-api -n flow-like