| .. | ||
| deployment.yaml | ||
| ingress.yaml | ||
| middleware.yaml | ||
| pvc.yaml | ||
| README.md | ||
| service.yaml | ||
FinLab — console Claude Code finance (in-cluster)
Une vraie session Claude Code (sur l'abonnement d'Alkatrazz, login persisté) servie
dans un terminal web (ttyd), spécialisée analyse de marché via la persona CLAUDE.md et
la boîte à outils finlab (Yahoo Finance, exposée en MCP). Esprit OpenAlice, mais c'est
Claude Code + le toolkit maison — aucune facturation API, aucun broker, analyse seule.
⚠️ La console expose un shell web → protégée par basicAuth Traefik. Analyse et aide à la décision uniquement : aucun ordre réel (seul le paper trading Alpaca fictif existe).
Image
Pas d'image publique : la CI (.github/workflows/build-finlab.yml) build depuis
tools/finlab/ (notre code) → ghcr.io/alkatrazz24/funk-finlab, tag sha-<court>, bump du
manifest sur main.
Architecture du déploiement
| Composant | Détail |
|---|---|
| Deployment | 1 réplica, Recreate (volume RWO), PodSecurity restricted (uid 1000, fsGroup 1000) |
PVC finlab-data |
5Gi NFS → /home/finlab : ~/.claude (login abonnement) + workspace (code finlab seedé, portfolio.yaml/watchlists.yaml/alerts.yaml éditables, .cache) |
Service finlab |
web:7681 (ttyd) |
Middleware finlab-auth |
basicAuth Traefik (secret finlab-auth, htpasswd) |
| IngressRoute | finance.lab.local → 7681 (via finlab-auth) |
Le workspace est seedé depuis l'image au 1er boot (cp -rn, no-clobber) puis vit sur le
PVC : tes edits (portefeuille, etc.) et ton login persistent ; une nouvelle image n'apporte que
les fichiers manquants.
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 de la console (finlab-auth)
# htpasswd (paquet apache2-utils). Remplace <user>/<pass>.
htpasswd -nbB <user> '<pass>' > /tmp/finlab.htpasswd
kubectl -n ai create secret generic finlab-auth \
--from-file=users=/tmp/finlab.htpasswd
rm -f /tmp/finlab.htpasswd
3. Premier boot — login Claude Code (abonnement)
- Ouvrir http://finance.lab.local (basicAuth → identifiants de l'étape 2).
- Dans le terminal, lancer
claude, puis/login→ suivre l'OAuth (ouvrir l'URL sur ta machine, autoriser, coller le code). Persisté dans~/.claudesur le PVC. - À l'invite, FinLab a déjà sa persona (
CLAUDE.md) et les outils finlab (MCPfinlab, auto-activé). Essaie : « résume mon portefeuille », « plan de trade pour Micron ».
Le workspace
/home/finlab/workspacecontientportfolio.yamletc. — éditables directement (par toi ou par Claude à ta demande). Pour une vue rapide hors console :kubectl -n ai exec deploy/finlab -- python -m finlab.cli digest.
Accès depuis le terminal (sans navigateur)
kubectl -n ai exec -it deploy/finlab -- bash -lc 'cd "$WORKSPACE" && claude'