Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
docs(minikube): correct the pages that still tell contributors to build images
Jose Ramireza738ee346790
diff --git a/docs/deploy/minikube.md b/docs/deploy/minikube.mdindex 424c37cd8..e31b05b01 100644--- a/docs/deploy/minikube.md+++ b/docs/deploy/minikube.md@@ -175,7 +175,8 @@ profile; run them explicitly with `E2E_RUN_SOFTWARE_CREATION=1`.```bashmake minikube-setup # Full setup; rebuilds the DB from scratch every run-make minikube-setup ARGS="--skip-build" # Re-deploy without rebuilding images (~1 min)+make minikube-setup-local # Same, building every image instead of pulling+make minikube-setup ARGS="--skip-build" # Re-deploy without re-acquiring images (~1 min)make minikube-setup REUSE_DB=true # Preserve the existing postgres DB volumemake minikube-setup ARGS="--reset-db" # Force a DB rebuild (already the default; also fixes WAL corruption)make minikube-setup ARGS="--force-keys" # Regenerate all JWT signing keys@@ -199,10 +200,18 @@ make minikube-apply-namespaces # 2. Create namespaces (gen-keys writes Secretsmake minikube-deploy-crds # 3. Install CRDs (Helm chart + CRD YAML)make minikube-gen-keys # 4. Generate/keep JWT keys + auto-sync public keymake minikube-apply-secrets # 5. Apply the remaining secrets-make minikube-build-images # 6. Build Docker images+make minikube-pull-images # 6. Acquire images — pull (default mode)+make minikube-build-images # ...or build them, in local mode onlymake minikube-deploy-all # 7. Deploy via kustomize```+Step 6 is one or the other, never both: run `minikube-pull-images` on a default+cluster and `minikube-build-images` only when you set it up with+`make minikube-setup-local`. Whichever you run records the mode in+`deploy/minikube/.image-manifest.json`, and `minikube-deploy-all` reads that+file to pick the matching overlay (`minikube-ghcr` or `minikube`). Running the+wrong one leaves the cluster deploying refs it never acquired.+Steps 2 and 3 are not optional on a fresh cluster: `minikube-gen-keys` applies Secretsand ConfigMaps into `control-plane`, `sandbox-recipes`, `rpc-proxy` and `profiles`, whichmust already exist, and the deploy is meaningless without the CRDs.@@ -344,30 +353,63 @@ Desktop App opens SSE stream with token T1 (TTL=300s)## Rebuild and Update a Service-### rpc-proxy (example)+**Which image ref you have to produce depends on the cluster's mode.** On the+default cluster every pod runs a `ghcr.io/evenfire-ai/...` ref, so building+`clerum/rpc-proxy:test` changes nothing: no pod references that name and the+rollout silently keeps running the release image. Check the mode first — it is+recorded in `deploy/minikube/.image-manifest.json`, not decided by your shell:++```bash+scripts/minikube/image-mode.sh --image-source # ghcr | local+scripts/minikube/image-mode.sh --image-tag # the ghcr tag (empty in local mode)+```++### The one-command path (both modes)++```bash+make minikube-pre-gate-sync GATE=<gate-name>+```++In ghcr mode this shadow-builds: it builds only the services your tree changed+and tags each build with the exact `ghcr.io/evenfire-ai/...` ref the Deployment+already references, which `imagePullPolicy: IfNotPresent` then picks up with no+manifest edit. Everything else stays on the release digest, and the run prints a+`SHADOWED:` list of what is local and what is not. The next `make minikube-setup`+re-pulls and discards the shadow set. In local mode it rebuilds the changed+services under their `clerum/*:test` refs, falling back to the full build when+the changed set cannot be derived. Either way it also re-applies CRDs,+manifests, generated config and secrets, and restarts the affected rollouts.++To go back to building everything from source permanently, re-run setup as+`make minikube-setup-local` (equivalently `IMAGE_SOURCE=local`). Every pod then+runs `clerum/*:test` and a plain local build is what the cluster picks up.++### rpc-proxy by hand (example)```bash# Run from the repo root — the build context below is repo-root relative.-# 1. Compile TypeScript+# 1. Point Docker at minikube's daemon so the build lands where kubelet looks+eval $(minikube -p clerum-test docker-env)++# 2. Compile TypeScriptnpm run build --prefix rpc-proxy-# 2. Build Docker image+# 3. Build under the ref THIS cluster runs.+# ghcr mode — shadow the release ref (substitute the tag printed above):+docker build -t ghcr.io/evenfire-ai/rpc-proxy:<tag> rpc-proxy/+# local mode:docker build -t clerum/rpc-proxy:test rpc-proxy/-# 3. Transfer to minikube node-docker save clerum/rpc-proxy:test > /tmp/rpc-proxy.tar-minikube cp /tmp/rpc-proxy.tar /tmp/rpc-proxy.tar --profile clerum-test-minikube ssh --profile clerum-test "docker rmi clerum/rpc-proxy:test 2>/dev/null; docker load -i /tmp/rpc-proxy.tar"-# 4. Restart deploymentkubectl rollout restart deployment/rpc-proxy -n rpc-proxy --context clerum-testkubectl rollout status deployment/rpc-proxy -n rpc-proxy --timeout=60s--# Or simpler with the Makefile:-make minikube-build-images # rebuild everything```+> A multi-node profile (`MINIKUBE_MULTI_NODE=true`) has no shared daemon to+> build into. Build on the host, then `minikube -p clerum-test image load <ref>`+> so every node holds it.+### Update a ConfigMap and Have the Pod Pick It Up```bash@@ -473,16 +515,25 @@ there) cannot read the public key and all workflow JWTs fail with `401 Invalid t| `CLERUM_WRC_SERVICE_NAME` | not set (code fallback `workflow-recipes`) | Service name for coordinator DNS callbacks |The first two are set in `deploy/base/control-plane/workflow-recipes.yaml` (lines-133-136). `CLERUM_WRC_SERVICE_NAME` is **not** in any manifest — it is an optional+153-156). `CLERUM_WRC_SERVICE_NAME` is **not** in any manifest — it is an optionaloverride read from the process environment, with the fallback `workflow-recipes`hardcoded in `workflow-recipes/src/reconciler/workflowRecipeReconciler.ts:622`.-The base manifest pins the two images to the release tag; the minikube overlay-rewrites them to `:test` through the `images:` block in-`deploy/overlays/minikube/kustomization.yaml` (see-`deploy/overlays/minikube/patches/dynamic-images.yaml` for why they are not-patched by value), so in a minikube cluster the running values are-`clerum/workflow-coordinator:test` and `clerum/mcp-host:test`.+These are env-var values, not container images, so the plain `images:` block+would not see them. `deploy/overlays/minikube/kustomizeconfig/imagetags.yaml`+extends the image transformer to Deployment env-var values, which is what makes+the rewrite apply (see `deploy/overlays/minikube/patches/dynamic-images.yaml`+for why they are not patched by value). The running values therefore depend on+the cluster's mode:++| Mode | `CLERUM_COORDINATOR_IMAGE` | `CLERUM_MCP_HOST_IMAGE` |+| ------------------------------- | ------------------------------------------------ | ------------------------------------ |+| ghcr (default, `minikube-ghcr`) | `ghcr.io/evenfire-ai/workflow-coordinator:<tag>` | `ghcr.io/evenfire-ai/mcp-host:<tag>` |+| local (`minikube-setup-local`) | `clerum/workflow-coordinator:test` | `clerum/mcp-host:test` |++`<tag>` is the pin in `deploy/components/ghcr-images/kustomization.yaml`, or+whatever `MINIKUBE_IMAGE_TAG` overrode it with for that run. Read it back with+`scripts/minikube/image-mode.sh --image-tag`.> **Bug fixed**: previously `clerum-operator` was used as the service name. The coordinator could> not reach the WRC REST endpoint and all status updates returned `ECONNREFUSED`.@@ -493,10 +544,11 @@ patched by value), so in a minikube cluster the running values areCONTEXT_MAPPER_STDIO_BRIDGE_IMAGE: clerum/stdio-bridge:0.9.5```-Like the coordinator/mcp-host images above, the base manifest pins the release tag-and the minikube overlay rewrites it to `:test` via the `images:` block in-`deploy/overlays/minikube/kustomization.yaml`, so the running value in a minikube-cluster is `clerum/stdio-bridge:test`. That image is built with+Like the coordinator/mcp-host images above, the base manifest pins the release+tag and the overlay rewrites it, so the running value follows the cluster's+mode: `ghcr.io/evenfire-ai/stdio-bridge:<tag>` on a default (ghcr) cluster,+`clerum/stdio-bridge:test` after `make minikube-setup-local`. The ghcr ref is+pulled by `make minikube-pull-images`; the local one is built by`make minikube-build-images`.### E2E Workflow Tests@@ -845,7 +897,7 @@ make minikube-verify-images # Reports the mode and every ref the cluster is mi``````bash-# imageSource=ghcr: re-pull the release set at the recorded tag.+# imageSource=ghcr: re-pull the release set at the tag this cluster runs.make minikube-pull-imagesmake minikube-restart-all@@ -854,8 +906,20 @@ make minikube-build-imagesmake minikube-restart-all```+`minikube-pull-images` resolves the tag in one order: `MINIKUBE_IMAGE_TAG` if+you set it, otherwise the tag recorded in `deploy/minikube/.image-manifest.json`+by the last acquisition, otherwise the committed pin in+`deploy/components/ghcr-images/kustomization.yaml`. So a cluster bootstrapped+with `MINIKUBE_IMAGE_TAG=latest` re-pulls `latest` here without you repeating+the override, and the run prints which of the three the tag came from. Check it+ahead of time with `scripts/minikube/image-mode.sh --image-tag`.++It re-pulls tags already present rather than skipping them, which is what+discards a lingering shadow build.+`make minikube-pre-gate-sync GATE=image-refresh ARGS="--force-cluster-sync"`-does the right one for you, then re-applies the manifests.+does the right one for you, at the tag the cluster actually runs, then+re-applies the manifests.### Postgres CrashLoopBackOff (WAL corruption)@@ -894,7 +958,7 @@ make minikube-restart-all # Restart all pods to pick up new keys| `401: "Missing runtime edge caller context"` from chatllm | Call reached mcp-host without a valid `x-clerum-edge-caller` (must be `rpc-proxy`, `channel-reader` or `workflow-approval-request-reader`) | Call through rpc-proxy instead of hitting mcp-host directly || `401: "Invalid token"` in rpc-proxy when opening stream | Session token expired in Desktop App | Close and reopen the app, do logout/login || `403: "Forbidden: user cannot access this host"` | hostRef does not match what is authorized in control-api, or the Host CRD does not exist | Verify `kubectl get host chatllm -n mcp-host`, verify host assignment to team |-| Pod in `ImagePullBackOff` | Image not loaded in minikube | `make minikube-build-images` |+| Pod in `ImagePullBackOff` | The cluster does not hold an image it was told to run | `make minikube-verify-images` to see the mode and the missing refs, then `make minikube-pull-images` (ghcr) or `make minikube-build-images` (local). See the section above. || Port forward dropped after pod restart | Kubernetes closes the tunnel when the pod restarts | `make minikube-pf-desktop` || `409 Conflict` on first setup | Previous data in postgres | `make minikube-db-reset` || SSE stream closes with `"auth-expired"` | mcp-host rejected 3 consecutive `/v1/runtime/status` polls with 401/403. Those polls carry only `x-clerum-edge-*` headers (no bearer token), so this is an edge-guard/host-access rejection, not RPC-token expiry. | The Desktop App clears its token cache and reconnects automatically. If it repeats, check chatllm logs for `Missing runtime edge caller context` / `Runtime edge host mismatch`. |diff --git a/docs/deploy/workflow-recipes-guide.md b/docs/deploy/workflow-recipes-guide.mdindex 717127ea0..910a6999d 100644--- a/docs/deploy/workflow-recipes-guide.md+++ b/docs/deploy/workflow-recipes-guide.md@@ -832,11 +832,18 @@ kubectl -n sandbox-recipes get networkpolicies```bashmake minikube-gen-keys # Generate RSA-4096 keys (WRC signing + JWT)make minikube-apply-secrets # Apply secrets + configmaps-make minikube-build-images # Build + load coordinator + mcp-host images-make minikube-deploy-all # Deploy all services via the Kustomize minikube overlay+make minikube-pull-images # Pull coordinator + mcp-host images (default mode)+make minikube-deploy-all # Deploy all services via the Kustomize overlay for this cluster's modemake minikube-deploy-instances # Apply CRD instances (context, host)```+On a cluster set up with `make minikube-setup-local`, swap+`minikube-pull-images` for `make minikube-build-images`. The coordinator and+mcp-host images the reconciler spawns follow the same mode: they run as+`ghcr.io/evenfire-ai/...` on a default cluster and `clerum/*:test` on a local+one. See+[minikube.md § Workflow Env Vars](minikube.md#workflow-env-vars).+### Workflow-specific troubleshooting#### `OwnerRefInvalidNamespace` in Pod eventsdiff --git a/docs/get-started/minikube.md b/docs/get-started/minikube.mdindex ee51bf7d7..a1b376afa 100644--- a/docs/get-started/minikube.md+++ b/docs/get-started/minikube.md@@ -25,10 +25,26 @@ git clone https://github.com/evenfire-ai/evenfire.git && cd evenfirecp .env.example .env# edit .env: set ADMIN_PASSWORD (required — no default ships) and ONE LLM key# (setup infers the matching provider)-make minikube-setup # first run ~5–10 min (image builds dominate); re-run safe-make minikube-status # wait for every deployment READY+MINIKUBE_IMAGE_TAG=latest make minikube-setup # first run ~15 min (pulling images dominates); re-run safe+make minikube-status # wait for every deployment READY```+**You do not build images.** `make minikube-setup` pulls all 23 service images+from `ghcr.io/evenfire-ai`, published for `linux/amd64` and `linux/arm64`, so an+Apple Silicon Mac pulls a native image rather than compiling anything. MCP+servers stay out of the cluster and are installed on demand from the evenfire+registry.++`MINIKUBE_IMAGE_TAG=latest` is required today: the manifests pin the next+release tag, and its images only exist once that release is promoted. Without+the override the pull fails with a message naming this variable. Drop it after+the release is cut. If minikube itself fails to start, add+`MINIKUBE_MEMORY=9216` — the 10240 MB default exceeds a stock Docker Desktop+ceiling.++To build every image from source instead, use `make minikube-setup-local`+(equivalently `IMAGE_SOURCE=local`), which needs no tag override.+## Say hello (desktop app)The UIs run from your workstation, so install their dependencies once, then rundiff --git a/docs/get-started/quickstart.md b/docs/get-started/quickstart.mdindex 347158b40..c3c81a872 100644--- a/docs/get-started/quickstart.md+++ b/docs/get-started/quickstart.md@@ -6,7 +6,7 @@ named `chatllm` you can message immediately.> **What you get:** the real platform — operators, approvals, Control UI,> desktop app, network isolation. Nothing is mocked or weakened.-> **Time:** ~5–10 minutes on first run (image builds dominate).+> **Time:** roughly 15 minutes on a cold cache (pulling images dominates).## Prerequisites@@ -55,12 +55,27 @@ CLERUM_MODEL_PROVIDER=openai # optional with one key: openai | claude | zai## 2. Set up the cluster (one command)```bash-make minikube-setup+MINIKUBE_IMAGE_TAG=latest make minikube-setup # see the override note below```This runs an idempotent 12-step setup: minikube cluster (Calico) → namespaces →-CRDs → JWT signing keys → secrets from `.env` → service images built in-minikube's Docker → deploy → readiness wait with auto-recovery → seed → verify.+CRDs → JWT signing keys → secrets from `.env` → service images pulled from+`ghcr.io/evenfire-ai` → deploy → readiness wait with auto-recovery → seed →+verify.++**You do not build images.** The 23 service images are published for+`linux/amd64` and `linux/arm64`, so an Apple Silicon Mac pulls a native image+instead of compiling anything. MCP servers are not loaded into the cluster at+all — they are installed on demand from the evenfire registry.++`MINIKUBE_IMAGE_TAG=latest` is required today. The cluster manifests pin the+next release tag, whose images are created by promotion _on_ that tag, so the+pin currently names something that does not exist yet. Without the override the+pull fails with a message naming the image, the tag, and this variable. Drop the+override once that release is tagged and promoted.++To build every image from source instead, use `make minikube-setup-local`+(equivalently `IMAGE_SOURCE=local`). That path needs no tag override.It seeds for you:@@ -156,13 +171,13 @@ Details: [Connect Telegram](../how-to/connect-telegram.md).## Troubleshooting-| Symptom | Fix |-| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| Agent never replies | No real LLM key in `.env`; with several keys, set `CLERUM_MODEL_PROVIDER` explicitly (see step 1) |-| `minikube start` fails on memory | Raise Docker Desktop to ≥10 GB RAM / 6 CPUs — or, if you can't spare it, `MINIKUBE_MEMORY=9216 make minikube-setup` (stock Docker Desktop's ~9.9 GB is just under the 10 GB default) |-| Pods `Pending` early on | Calico is still coming up — wait, then `make minikube-status` |-| postgres CrashLoopBackOff after cold start | `make minikube-setup ARGS="--reset-db --skip-build"` |-| Port-forwards die | re-run `make minikube-pf-all` (it holds them open; Ctrl-C stops) |+| Symptom | Fix |+| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| Agent never replies | No real LLM key in `.env`; with several keys, set `CLERUM_MODEL_PROVIDER` explicitly (see step 1) |+| `minikube start` fails on memory | Raise Docker Desktop to ≥10 GB RAM / 6 CPUs — or, if you can't spare it, `MINIKUBE_MEMORY=9216 MINIKUBE_IMAGE_TAG=latest make minikube-setup` (stock Docker Desktop's ~9.9 GB is just under the 10 GB default) |+| Pods `Pending` early on | Calico is still coming up — wait, then `make minikube-status` |+| postgres CrashLoopBackOff after cold start | `make minikube-setup ARGS="--reset-db --skip-build"` |+| Port-forwards die | re-run `make minikube-pf-all` (it holds them open; Ctrl-C stops) |## Next stepsdiff --git a/docs/testing/e2e-guide.md b/docs/testing/e2e-guide.mdindex 26d6a3c07..e54e2a2b4 100644--- a/docs/testing/e2e-guide.md+++ b/docs/testing/e2e-guide.md@@ -45,15 +45,27 @@ minikube start -p clerum-test \### 2. Bootstrap infrastructureThe canonical setup is the Makefile path — it starts the `clerum-test`-profile, installs CRDs, creates secrets/config, builds images in minikube's-Docker daemon, deploys manifests, waits for rollouts, and seeds local test-data (12 idempotent steps):+profile, installs CRDs, creates secrets/config, acquires images, deploys+manifests, waits for rollouts, and seeds local test data (12 idempotent steps):```bash-make minikube-setup+MINIKUBE_IMAGE_TAG=latest make minikube-setupmake minikube-status```+Setup builds nothing by default: it pulls the 23 published service images from+`ghcr.io/evenfire-ai`. `MINIKUBE_IMAGE_TAG=latest` is required until the next+release is tagged and promoted, because the manifests pin that not-yet-cut tag.+`make minikube-setup-local` (equivalently `IMAGE_SOURCE=local`) builds every+image in minikube's Docker daemon instead and needs no override. Which mode a+cluster is in is recorded in `deploy/minikube/.image-manifest.json`, and it+decides which image refs the pods run — see+[`../deploy/minikube.md`](../deploy/minikube.md).++For the E2E fixture set (test user, `e2e-*` recipes, demo MCP servers), use+`make minikube-setup-e2e`. In ghcr mode that pulls the published images and then+builds the two unpublished E2E coordinator fixtures locally.+> `scripts/bootstrap-cluster.sh` is an older, partial bootstrap (no full JWT> chain, UIs, or user seed). E2E suites need the full setup above — do not use> the script for E2E runs.@@ -264,7 +276,7 @@ Common test-related issues:- **409 on first-time setup** → `make minikube-setup ARGS="--reset-db --skip-build"`- **Postgres WAL corruption after cold start** → `make minikube-setup ARGS="--reset-db --skip-build"` (auto-detected)-- **Pod `ImagePullBackOff`** → `make minikube-setup` (rebuilds images with `:test` tag and `imagePullPolicy: IfNotPresent`)+- **Pod `ImagePullBackOff`** → `make minikube-verify-images` reports the cluster's mode and every missing ref; then re-pull with `make minikube-pull-images` (ghcr mode, which reuses the tag the cluster recorded) or rebuild with `make minikube-build-images` (local mode), and `make minikube-restart-all`. Every pod runs `imagePullPolicy: IfNotPresent`, so the ref only has to be present in the daemon.- **`401: "Invalid token"` from chatllm** → `make minikube-gen-keys` followed by `make minikube-sync-auth-key` (auto-syncs + restarts). See the JWT auth chain notes at the top of the root `Makefile`.- **Port-forward drops after pod restart** → re-run `make minikube-pf-desktop`- **Desktop app shows no agents after login** → `scripts/minikube/seed-test-data.sh`