Funk-lab/k8s/apps/finlab
2026-06-29 23:25:40 +00:00
..
deployment.yaml ci(finlab): image → sha-ff37d27 [skip ci] 2026-06-29 23:25:40 +00:00
ingress.yaml feat(finlab): dashboard web (graphiques/portefeuille/actions) + fix seed NFS (#65) 2026-06-30 00:57:23 +02:00
middleware.yaml feat(finlab): console Claude Code finance in-cluster + toolkit d'analyse (#64) 2026-06-29 23:26:09 +02:00
pvc.yaml feat(finlab): console Claude Code finance in-cluster + toolkit d'analyse (#64) 2026-06-29 23:26:09 +02:00
README.md feat(finlab): dashboard web (graphiques/portefeuille/actions) + fix seed NFS (#65) 2026-06-30 00:57:23 +02:00
service.yaml feat(finlab): dashboard web (graphiques/portefeuille/actions) + fix seed NFS (#65) 2026-06-30 00:57:23 +02:00

FinLab — dashboard + console Claude Code (in-cluster)

Deux usages, une image, un workspace partagé :

  • Dashboard (finance.lab.local/) — interface web : graphiques chandeliers (MM50/200 + volume), portefeuille (P&L, poids, secteurs), watchlists thématiques scannées, alertes du jour, actions (plan de trade R:R). Données finlab (Yahoo Finance) — aucun LLM, aucune clé.
  • Console (finance.lab.local/console/) — vraie session Claude Code dans un terminal web (ttyd), sur ton abonnement (login persisté), persona finance + outils finlab en MCP.

⚠️ La console expose un shell web → tout est derrière basicAuth Traefik. Analyse et aide à la décision uniquement : aucun ordre réel (paper trading Alpaca fictif seul).

Image & code

CI (.github/workflows/build-finlab.yml) build depuis tools/finlab/ghcr.io/alkatrazz24/funk-finlab. Le code (package finlab + backend dashboard) vit dans l'image (/opt/app) et se met à jour avec elle. Les configs éditables (portefeuille/watchlists/alertes) + la persona + le login vivent dans le workspace persistant (FINLAB_HOME=/home/finlab/workspace, sur le PVC).

Architecture du pod

Élément Rôle
initContainer seed Peuple le workspace depuis l'image (cp -rn), robuste au piège NFS (recrée le dossier si root/non-inscriptible). Tourne avant les conteneurs
container console ttyd -b /consoleclaude dans le workspace (port 7681)
container dashboard uvicorn dashboard.server:app (port 8800), lit FINLAB_HOME
PVC finlab-data (5Gi NFS) /home/finlab : ~/.claude (login) + workspace (configs + .cache)
Service finlab web:8800 + console:7681
Middleware finlab-auth basicAuth Traefik (secret htpasswd)
IngressRoute /console → 7681 · reste → 8800 (les deux derrière finlab-auth)

Pré-requis manuels (une fois)

1. Secret de pull GHCR (si absent du ns ai)

kubectl -n ai create secret docker-registry ghcr-pull \
  --docker-server=ghcr.io --docker-username=Alkatrazz24 \
  --docker-password=<GHCR_PAT_read_packages>

2. Secret basicAuth finlab-auth

kubectl -n ai create secret generic finlab-auth \
  --from-literal=users="alkatrazz:$(openssl passwd -apr1 'MOT_DE_PASSE')"

3. Premier boot — login Claude Code (pour la console)

  1. Ouvrir http://finance.lab.local/console/ (basicAuth), lancer claude, puis /login.
  2. Le dashboard est sur http://finance.lab.local/ (rien à configurer).

Configs éditables dans le workspace (portfolio.yaml…) : depuis la console, ou kubectl -n ai exec deploy/finlab -c console -- python -m finlab.cli digest.