Files
userbot/panel/README.md
T
forust 96de2d2573 feat(userbot): add Kubernetes control panel
Manage Telegram instances through Kubernetes with legacy adoption for forust and anna. Build and deploy the panel image alongside the runtime.
2026-07-26 19:39:09 +02:00

44 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Userbot Control Panel
Локальная панель управляет userbot-инстансами напрямую через Kubernetes API.
Новые аккаунты создаются в namespace `userbot`; существующие `forust` и `anna`
остаются в `default` и принимаются под управление только через metadata labels.
## Первый запуск
Скопировать общий Secret в новый namespace, не печатая его значения:
```bash
kubectl create namespace userbot --dry-run=client -o yaml | kubectl apply -f -
kubectl get secret userbot-common-secrets -n default -o json \
| jq 'del(.metadata.annotations,.metadata.creationTimestamp,.metadata.resourceVersion,.metadata.uid,.metadata.managedFields) | .metadata.namespace = "userbot"' \
| kubectl apply -f -
```
Затем применить манифесты:
```bash
kubectl apply -f userbot/k8s/base/panel.yaml
kubectl apply -f userbot/k8s/base/userbots.yaml
kubectl rollout status deployment/userbot-panel -n userbot
```
Панель доступна только через внутренний Traefik route:
`https://userbot.workstation.internal`.
## Локальная разработка
```bash
cd userbot/panel/frontend
npm install
npm run dev
```
Backend использует in-cluster config, а вне кластера — текущий kubeconfig:
```bash
cd userbot/panel/backend
uv run --with-requirements requirements-dev.txt \
uvicorn app.main:app --reload --port 8080
```