Local stack: Mermin + OpenSearch (k8s/mermin-stack-values.yaml, embedded in k8s/bootstrap.yaml) and Kaytoo (../helm/kaytoo) with harness overrides in k8s/kaytoo-values.yaml.
| Command | Purpose |
|---|---|
npm run e2e:up |
kind cluster, image build/load, bootstrap Job, port-forwards |
npm run e2e:down |
Stop forwards, delete cluster, remove image + e2e/.generated/ |
npm run e2e:verify |
Smoke: rollout, /health, /chat, OpenSearch-backed checks |
npm run e2e:status |
URLs + quick pod list |
npm run e2e:logs |
Tail Kaytoo in-cluster |
npm run e2e:dev |
Run Kaytoo on the host against forwarded OpenSearch |
Host Helm is not required - the bootstrap Job runs Helm in-cluster.
| Cluster | kind name kaytoo-e2e |
| Namespace | elastiflow |
| Kaytoo | Helm release; HTTP chat svc/kaytoo-chat:8080 (forwarded to 18080) |
| Image | kaytoo-e2e:local from repo Dockerfile |
| LLM | Real API; credentials from .env via generated Helm fragment (below) |
Source of truth: repo-root .env (see .env.example). Optional: E2E_ENV_FILE.
| Variable | e2e:up |
Notes |
|---|---|---|
OPENSEARCH_PASSWORD |
required | Mermin/OpenSearch admin; also baked into rendered Kaytoo values |
LLM_BASE_URL |
required | OpenAI-compatible URL |
LLM_API_KEY |
required | |
LLM_MODEL |
optional |
For e2e:verify / e2e:dev against host forwards, set e.g. OPENSEARCH_URL=https://127.0.0.1:9200, OPENSEARCH_USERNAME=admin, OPENSEARCH_TLS_INSECURE=true, OPENSEARCH_INDEX_PATTERN=elastiflow-flow-codex-*.
Interactive e2e:up: if LLM_* is missing, the script prompts once and appends to .env (or E2E_ENV_FILE when used).
Created during e2e:up (and by npm run e2e:llm-overlay for the LLM file only). Do not commit.
| Artifact | Role |
|---|---|
kubeconfig-kind-kaytoo-e2e |
Host / kind CLI - API server https://127.0.0.1:... |
kubeconfig-kind-kaytoo-e2e.docker |
Docker kubectl port-forward sidecars - same cluster, API host host.docker.internal |
kaytoo-values.rendered.yaml |
k8s/kaytoo-values.yaml + real OPENSEARCH_PASSWORD -> copied to node as kaytoo-values.yaml (secrets) |
values-e2e.llm.local.json |
LLM Helm -f from .env via e2e/write-e2e-llm-overlay.mjs |
Legacy e2e/.kubeconfig-kind-* at the e2e/ root is moved into .generated/ on first use.
npm run e2e:up- kind cluster
kaytoo-e2e(prompts if it already exists). docker build->kaytoo-e2e:local->kind load.- Writes
.generated/(LLM JSON, rendered Kaytoo values), copies chart + those files to the control-plane node (/kaytoo-chart/), applies bootstrap Job. - Job: metrics-server, Mermin stack,
helm upgrade -i kaytoo ... -f kaytoo-values.yaml -f values-e2e.llm.local.json. - Docker-based port-forwards: OpenSearch 9200, Dashboards 5601, chat 18080 ->
8080.
URLs after up: OpenSearch https://127.0.0.1:9200, Dashboards http://localhost:5601, chat http://127.0.0.1:18080.
kubectl (from repo root):
export KUBECONFIG="$(pwd)/e2e/.generated/kubeconfig-kind-kaytoo-e2e"
kubectl -n elastiflow get pods
kubectl -n elastiflow logs deploy/kaytoo -c kaytoo -fWith forwards up and OpenSearch reachable on the host:
export KUBECONFIG="$(pwd)/e2e/.generated/kubeconfig-kind-kaytoo-e2e"
npm run e2e:verifyverify starts a temporary chat port-forward if needed.
After e2e:up:
npm run e2e:devUses the same .env; point OpenSearch at the forwards (e.g. OPENSEARCH_URL=https://127.0.0.1:9200).
npm run e2e:downRemoves forwards, cluster, kaytoo-e2e:local image, e2e/.generated/, and stale e2e/.kubeconfig-kind-*.
| What | Where |
|---|---|
| Mermin / OpenSearch | k8s/mermin-stack-values.yaml + embedded key mermin-stack-values.yaml in k8s/bootstrap.yaml |
| Kaytoo chart | ../helm/kaytoo |
| Kaytoo e2e overrides | k8s/kaytoo-values.yaml (placeholders only; secrets only in .generated/ at deploy) |
Helm preview (no secrets in base -f):
helm template kaytoo ./helm/kaytoo -n elastiflow -f ./e2e/k8s/kaytoo-values.yamlWith LLM overlay (after set -a && source .env && set +a, run npm run e2e:llm-overlay if the JSON is not already there):
helm template kaytoo ./helm/kaytoo -n elastiflow \
-f ./e2e/k8s/kaytoo-values.yaml \
-f ./e2e/.generated/values-e2e.llm.local.jsonTo regenerate only the LLM fragment: set -a && source .env && set +a then npm run e2e:llm-overlay.