Files
gooseek/docs/RUNBOOK.md
home cd6b7857ba feat: default locale Russian, geo determines language for other countries
- localization-svc: defaultLocale ru, resolveLocale only by geo
- web-svc: DEFAULT_LOCALE ru, layout lang=ru, embeddedTranslations fallback ru
- countryToLocale: default ru when no country or unknown country

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-23 15:10:38 +03:00

96 lines
2.4 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.
# Runbook оператора GooSeek
**docs/architecture: 05-gaps-and-best-practices.md §9**
---
## 1. Проверка здоровья (K8s)
```bash
# Поды
kubectl get pods -n gooseek
# Health через port-forward (пример для chat-svc)
kubectl port-forward svc/chat-svc 3005:3005 -n gooseek &
curl -s http://localhost:3005/health
```
Или через Ingress: `curl -s https://gooseek.ru/api/health` (если web-svc проксирует).
Readiness: заменить `/health` на `/ready`.
---
## 2. Redis
```bash
redis-cli ping # PONG
redis-cli KEYS "discover:*" # ключи discover
redis-cli KEYS "finance:*" # ключи finance
```
---
## 3. Cache-worker (pre-compute)
В K3s: CronJob выполняются по расписанию. Логи Jobs:
```bash
kubectl get cronjobs -n gooseek
kubectl get jobs -n gooseek
kubectl logs job/<job-name> -n gooseek
```
---
## 4. Типичные сбои
| Симптом | Причина | Действие |
|---------|---------|----------|
| Discover пусто | Redis нет discover:*, Ghost/GHOST_CONTENT_API_KEY | Проверить cache-worker CronJob, .env в ConfigMap |
| Finance stub | FMP_API_KEY отсутствует или 429 | Добавить ключ, проверить лимиты FMP |
| Search 429 | Лимит SearXNG | Настроить свой инстанс, SEARXNG_URL |
| Chat зависает | LLM недоступен (Ollama/OpenAI) | Проверить OLLAMA_BASE_URL / OPENAI_API_KEY |
---
## 5. Масштабирование (K3s)
```bash
kubectl scale deployment chat-svc -n gooseek --replicas=4
```
HPA настроен в `deploy/k3s/hpa.yaml`. Требуется metrics-server.
---
## 6. Метрики Prometheus
Сервисы отдают `/metrics`. Аннотации на Pod: `prometheus.io/scrape`, `prometheus.io/port`, `prometheus.io/path`.
---
## 7. SSL (HTTPS для gooseek.ru)
См. **deploy/k3s/ssl/README.md** — получение сертификата, бэкап в `deploy/k3s/ssl/backup/`, создание Secret, применение ingress-production.yaml.
---
## 8. Порты
| Сервис | Порт |
|--------|------|
| web-svc | 3000 |
| search-svc | 3001 |
| discover-svc | 3002 |
| finance-svc | 3003 |
| travel-svc | 3004 |
| chat-svc | 3005 |
| projects-svc | 3006 |
| billing-svc | 3008 |
| library-svc | 3009 |
| memory-svc | 3010 |
| create-svc | 3011 |
| notifications-svc | 3013 |
| auth-svc | 3014 |