Web dashboard for KubeLB — a cloud-native multi-tenant load balancer solution.
Prerequisites: Node.js 22+, pnpm (via corepack enable), a kubeconfig for KubeLB Management cluster.
export KUBECONFIG=/path/to/your/kubeconfig
pnpm run setup # dashboard + api deps + git hooks
pnpm run devThis starts the frontend (Vite on :5173) and the API proxy (Fastify on :3001) concurrently. The Vite dev server proxies /api/ requests to the API server.
pnpm run dev:mockUses MSW v2 to intercept fetch() in the browser with realistic mock data captured from a live cluster. CRUD mutations persist within the browser session; page refresh resets to seed data. Runs in EE mode (WAF policies visible). MSW is tree-shaken from production builds.
OIDC authentication is optional. Set all four env vars to enable:
| Variable | Required | Default | Description |
|---|---|---|---|
OIDC_ISSUER |
Yes* | — | OIDC provider issuer URL (e.g. https://dex.example.com) |
OIDC_CLIENT_ID |
Yes* | — | OIDC client ID |
OIDC_CLIENT_SECRET |
Yes* | — | OIDC client secret |
SESSION_SECRET |
Yes* | — | 32+ char secret for encrypting session cookies |
OIDC_REDIRECT_URI |
No | http://localhost:{PORT}/auth/callback |
Callback URL registered with IdP |
OIDC_SCOPES |
No | openid email profile groups offline_access |
Space-separated scopes |
SESSION_MAX_AGE |
No | 86400 (24h) |
Session cookie max age in seconds |
*All four must be set together. Partial config exits with an error. If none are set, the dashboard runs without authentication.
Apache License 2.0 — see LICENSE for details.