Per docs/INVIOLABLE-PRINCIPLES.md #4 (never hardcode), the catalyst-ui nginx config now flows from values.yaml at chart-render time: - routing.basePath (/sovereign) — also drives ingress strip-prefix - routing.catalystApi.serviceDNS — in-cluster reverse-proxy target - routing.catalystApi.port — upstream port - dns.resolverIP — CoreDNS for proxy-time resolution (avoids stale ClusterIP after catalyst-api restarts) - ingress.host / ingress.priority / ingress.className Files: - products/catalyst/chart/values.yaml — new, documents every default - products/catalyst/chart/templates/ui-configmap.yaml — new, nginx reverse-proxies /api/* to catalyst-api Service DNS - products/catalyst/chart/templates/ui-deployment.yaml — mounts the ConfigMap at /etc/nginx/conf.d/default.conf - products/catalyst/chart/templates/ingress.yaml — values-driven host + path + priority + class - tests/e2e/sovereign-routing/* — Playwright smoke for the routing Captured from stalled agent /tmp/agent-sovereign-route-finish — agent stream watchdog timed out after the work was authored but before commit.
1.5 KiB
1.5 KiB
Sovereign wizard routing smoke test
Closes #142.
Verifies that the chart-rendered routing for https://console.openova.io/sovereign/
wires together end-to-end:
GET /sovereign/returns the wizard SPA shell (200, HTML).- SPA fallback works —
GET /sovereign/wizard/credentialsalso returns the shell so the wizard's React-Router can take over client-side. POST /sovereign/api/v1/subdomains/checkround-trips through Traefik'sstrip-sovereignmiddleware → catalyst-ui nginx/api/reverse-proxy → catalyst-api Service (DNS sourced fromvalues.routing.catalystApi.serviceDNS, never hardcoded — seedocs/INVIOLABLE-PRINCIPLES.md§4).
Run modes
Mock (CI default, no cluster needed)
cd tests/e2e/sovereign-routing
npm install
npx playwright install chromium
USE_MOCK=1 npm test
USE_MOCK=1 intercepts every network call with canned responses that mirror
the real chart-rendered nginx + catalyst-api behaviour. Fast, deterministic,
and proves the SPA's wiring (basename, API_BASE) without depending on a
deployed environment.
Live cluster (post-Group-C cutover)
SOVEREIGN_BASE_URL=https://console.openova.io \
SOVEREIGN_BASE_PATH=/sovereign \
npx playwright test
Or against a Sovereign:
SOVEREIGN_BASE_URL=https://console.omantel.omani.works \
npx playwright test
URLs flow from env vars per the never-hardcode rule. The defaults match the
chart's values.yaml (ingress.host + routing.basePath).