docs: visual guides with platform screenshots (Gitea, ArgoCD, Grafana, Prometheus)
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
# ArgoCD: приложения test-контура
|
||||
|
||||
ArgoCD — GitOps UI: следит за `sova-deploy` и `sova-mocks`, раскатывает Helm charts в кластер.
|
||||
|
||||
Краткая теория: [sova-root и data-test](../argocd-apps).
|
||||
|
||||
## 1. Вход
|
||||
|
||||
http://argocd.sova.local — логин **admin**, пароль:
|
||||
|
||||
```bash
|
||||
kubectl -n argocd get secret argocd-initial-admin-secret \
|
||||
-o jsonpath='{.data.password}' | base64 -d && echo
|
||||
```
|
||||
|
||||

|
||||
|
||||
## 2. Список Applications
|
||||
|
||||
На главной — все приложения test-контура:
|
||||
|
||||
| Application | Что деплоит | Есть URL? |
|
||||
|-------------|-------------|-----------|
|
||||
| `backend-test` | Symfony API | api.test.sova.local |
|
||||
| `adminpanel-test` | React admin | admin.test.sova.local |
|
||||
| `cabinet-test` | Symfony ЛК | cabinet.test.sova.local |
|
||||
| `docs-test` | VitePress docs | docs.sova.local |
|
||||
| `mocks-test` | WireMock, Mailpit | internal |
|
||||
| `data-test` | PostgreSQL, MySQL, Redis | нет (БД) |
|
||||
| `sova-root` | другие Application CR | нет (meta) |
|
||||
|
||||

|
||||
|
||||
**Sync Status `Unknown`** часто нормален для local — смотрите **Health** и pod'ы в namespace.
|
||||
|
||||
## 3. Пользовательское приложение: `backend-test`
|
||||
|
||||
Откройте карточку → дерево ресурсов: Deployment, Service, Ingress, CronJob, Secret.
|
||||
|
||||

|
||||
|
||||
### Sync вручную
|
||||
|
||||
Кнопка **Sync** → **Synchronize** — подтянуть последний `main` из Gitea.
|
||||
|
||||
### Terminal в pod (миграции, отладка)
|
||||
|
||||
1. Deployment `backend` → Pod
|
||||
2. Container **php-fpm** → иконка **Terminal**
|
||||
3. Пример: `php bin/console cache:clear --env=prod`
|
||||
|
||||
Exec включён в `platform/argocd/values-test.yaml` (`exec.enabled: true`).
|
||||
|
||||
### CronJob в UI
|
||||
|
||||
Фильтр по label `app.kubernetes.io/component: console` — видны `backend-sync-doctors`, `backend-clear-schedule-cache` и т.д.
|
||||
|
||||
## 4. `sova-root` — app-of-apps
|
||||
|
||||
**Не приложение с URL.** Только создаёт/обновляет другие Application из `argocd/apps/`.
|
||||
|
||||

|
||||
|
||||
«Войти» сюда нельзя — открывайте дочерние apps (`backend-test`, `docs-test`, …).
|
||||
|
||||
## 5. `data-test` — слой данных
|
||||
|
||||
PostgreSQL (backend + cabinet), MySQL Bitrix, Redis. **Без Ingress.**
|
||||
|
||||

|
||||
|
||||
Подключение из pod'ов приложений:
|
||||
|
||||
```
|
||||
postgresql-test.sova-data-test.svc.cluster.local:5432
|
||||
mysql-bitrix-test.sova-data-test.svc.cluster.local:3306
|
||||
redis-test-master.sova-data-test.svc.cluster.local:6379
|
||||
```
|
||||
|
||||
Инициализация schema/seed — Job `db-init` (отдельный чарт), не через браузер.
|
||||
|
||||
## 6. Типичный цикл после CI
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Dev as Разработчик
|
||||
participant Gitea as Gitea tag
|
||||
participant CI as Actions
|
||||
participant Deploy as sova-deploy
|
||||
participant Argo as ArgoCD
|
||||
participant K8s as Kubernetes
|
||||
|
||||
Dev->>Gitea: release-test-tag.sh
|
||||
Gitea->>CI: push tag
|
||||
CI->>Deploy: bump values-test.yaml
|
||||
Argo->>Deploy: poll main
|
||||
Argo->>K8s: helm upgrade
|
||||
```
|
||||
|
||||
1. Push тега в Gitea
|
||||
2. CI обновляет `apps/backend/values-test.yaml`
|
||||
3. ArgoCD auto-sync (или Sync вручную)
|
||||
4. Новый pod с образом из registry
|
||||
|
||||
Дальше: [Grafana, Prometheus, Loki](./monitoring).
|
||||
Reference in New Issue
Block a user