Skip to content

Commit c95b8f2

Browse files
docs: update CLAUDE.md with golden install fixes
Add documentation for clean cluster installation: - ArgoCD URL changed to argo.syncjob.ru - ArgoCD ingress managed via GitOps (not Helm) - ArgoCD insecure mode requires no backend-protocol HTTPS - Cloudflare token secret key CF_API_TOKEN - Reflector annotations for secret replication - Sync-wave ordering for CRD-dependent resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 1aab010 commit c95b8f2

File tree

1 file changed

+42
-4
lines changed

1 file changed

+42
-4
lines changed

.claude/CLAUDE.md

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,62 @@
99
Основные:
1010
- `task up` — полный setup (init + bootstrap + app-of-apps)
1111
- `task destroy` — удалить инфраструктуру
12+
- `task status` — проверить статус ArgoCD приложений
13+
- `task argocd-password` — получить пароль admin
14+
- `task argocd-port-forward` — проброс порта ArgoCD UI
15+
16+
Sealed Secrets:
17+
- `task seal:openrouter` — создать SealedSecret для OpenRouter API
18+
- `task seal:github` — создать SealedSecret для GitHub репо
19+
- `task seal:postgree` — создать SealedSecret для PostgreSQL
1220

1321
## Переменные окружения
1422

1523
Хранятся в `.env` (загружается автоматически через dotenv в Taskfile):
1624
- `TF_VAR_timeweb_token` — токен Timeweb Cloud
1725
- `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` — для S3 backend
26+
- `OPENROUTER_API_KEY` — ключ OpenRouter API
27+
- `GITHUB_PAT` / `GITHUB_USERNAME` / `GITHUB_REPO_URL` — для ArgoCD Image Updater
28+
- `CLOUDFLARE_TOKEN` — токен Cloudflare API для cert-manager и external-dns
1829

1930
## Структура
2031

2132
```
2233
terraform/timeweb/ # Terraform (k8s cluster)
23-
bootstrap/argocd/ # ArgoCD Helm values
34+
bootstrap/argocd/ # ArgoCD Helm values (self-managed ArgoCD Application)
2435
scripts/ # Вспомогательные скрипты для task
36+
- argocd-status.sh # Проверка статуса ArgoCD
37+
- seal.sh # Создание SealedSecrets
2538
Taskfile.yaml # Все команды здесь
2639
```
2740

41+
## Kubeconfig
42+
43+
После `task init` kubeconfig сохраняется в `~/.kube/timeweb-config`.
44+
Taskfile автоматически использует этот путь через `KUBECONFIG` env.
45+
46+
## ArgoCD доступ
47+
48+
- URL: https://argo.syncjob.ru
49+
- User: admin
50+
- Password: `task argocd-password`
51+
52+
## Golden Install — важные настройки
53+
54+
При чистой установке с нуля учитывай следующие моменты:
55+
56+
1. **ArgoCD Ingress** — управляется через GitOps в `app-poly-gitops-k8s` (ingress-argo.yaml), не через Helm chart. В `values.yaml` отключён `server.ingress.enabled: false`.
57+
58+
2. **ArgoCD insecure mode** — сервер работает в HTTP режиме (`server.insecure: true`). Ingress НЕ должен иметь аннотацию `backend-protocol: HTTPS`.
59+
60+
3. **Cloudflare token secret** — ключ в секрете должен быть `CF_API_TOKEN` (не `cloudflare-api-token`). Используется cert-manager и external-dns.
61+
62+
4. **Reflector аннотации** — для репликации секретов между namespaces (например cloudflare-token из external-dns в cert-manager).
63+
64+
5. **Sync Waves** — критичны для CRD-зависимых ресурсов. Операторы (sync-wave: "1") должны деплоиться раньше их CR (sync-wave: "3"+).
65+
2866
## Связанные репозитории
2967

30-
- `app-poly-gitops-k8s` — GitOps манифесты (ArgoCD Applications)
31-
- `app-poly-gitops-helm` — Helm charts
32-
- `app-poly-gitops-fastapi` — FastAPI сервис
68+
- `app-poly-gitops-k8s` — GitOps манифесты (ArgoCD Applications, kustomize overlays)
69+
- `app-poly-gitops-helm` — Helm charts для приложений
70+
- `app-poly-gitops-fastapi` — FastAPI сервис (chat-api)

0 commit comments

Comments
 (0)