refactor: restructure project — separate tools, config, generated, provider

TOOLS/        — generators + scripts + config + ARCHITECTURE.md
  ├── yaml-generator/    (code)
  ├── resource-generator/ (code)
  ├── docs-generator/    (code)
  ├── scripts/           (← devops/*.sh)
  ├── config/            (← devops/profiles/ + devops/config/)
  │   ├── test/          profile.env, services_list.txt, operation_timeouts.json
  │   ├── prod/
  │   └── dev/
  └── ARCHITECTURE.md    (← devops/ARCHITECTURE.md)

generated/    — pipeline output only (gitignored)
  ├── test/resources_yaml/, go/, docs/, provider_build/
  ├── prod/
  └── dev/

provider/     — code only, no generated files
  resources_yaml/        — DELETED (generated)
  internal/resources_gen/ — DELETED (generated)

devops/       — removed (replaced by TOOLS/scripts + TOOLS/config + generated/)

Generators now fail if NUBES_*_DIR not set (no defaults to provider/).
Provider requires pipeline to populate resources_gen/ before build.
This commit is contained in:
“Naeel”
2026-07-06 09:06:09 +04:00
parent c34db5e5e3
commit dd56bcda83
1285 changed files with 84004 additions and 1910 deletions
@@ -0,0 +1,40 @@
# Resource nubes_template
Service ID: `2`
Service Name: Темплейт k8s
[Manual](template.md) | [Create params](template_params_create.md) | [Modify params](template_params_modify.md) | [Output params](template_outputs.md) | [Operations](template_ops.md) | [Example](template_example.md)
## Create params
**Обязательные параметры (вводимые пользователем)**
<table class="resource-table resource-table-compact resource-table-required">
<thead><tr><th>ID</th><th>Code</th><th>Type</th><th>Description</th><th>Constraints</th></tr></thead>
<tbody>
<tr><td>206</td><td><strong><code class="code-no-wrap">resource_realm</code></strong></td><td><code>string</code></td><td>Платформа для развертывания</td><td>func=getAvailableResourceRealms</td></tr>
</tbody></table>
**Параметры, имеющие значение по умолчанию, если не меняете - эти параметры не обязательно прописывать в манифесте**
<table class="resource-table resource-table-compact">
<thead><tr><th>ID</th><th>Code</th><th>Type</th><th>Default</th><th>Description</th><th>Constraints</th></tr></thead>
<tbody>
<tr><td>202</td><td><strong><code class="code-no-wrap">resource_cpu</code></strong></td><td><code>integer</code></td><td><code>100</code></td><td></td><td>minvalue=100; maxvalue=4000</td></tr>
<tr><td>203</td><td><strong><code class="code-no-wrap">resource_memory</code></strong></td><td><code>integer</code></td><td><code>200</code></td><td></td><td>minvalue=128; maxvalue=8192</td></tr>
<tr><td>204</td><td><strong><code class="code-no-wrap">resource_disk</code></strong></td><td><code>integer</code></td><td><code>1</code></td><td>Квота диска (Указывается в GIGAbytes)</td><td>minvalue=1; maxvalue=999</td></tr>
<tr><td>205</td><td><strong><code class="code-no-wrap">resource_instances</code></strong></td><td><code>integer</code></td><td><code>1</code></td><td>Количество узлов</td><td>minvalue=1; maxvalue=7</td></tr>
<tr><td>207</td><td><strong><code class="code-no-wrap">domain</code></strong></td><td><code>string</code></td><td><code>web01</code></td><td>Если будет указан FQDN, то происходят проверки DNS на валидность А-записи, или будет добавлено в зону resourceRealm</td><td>regex=^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$</td></tr>
</tbody></table>
<div class="lifecycle-note">
<strong>Параметры поведения (кратко)</strong><br/>
По умолчанию: `suspend_on_destroy = True`, `adopt_existing_on_create = False`.<br/>
При `terraform destroy` или удалении ресурса из манифеста:<br/>
- `suspend_on_destroy=true` — инстанс переводится в `Suspend` (не удаляется).<br/>
- `suspend_on_destroy=false` — Terraform удаляет ресурс только из state.<br/>
При `apply` флаг `adopt_existing_on_create` работает как авто-`import`:<br/>
- `false` — если ресурс уже есть, будет ошибка.<br/>
- `true` — Terraform может взять существующий инстанс под управление (`running` → adopt, `suspended` → resume+adopt при совпадении параметров).<br/>
Важно: один инстанс должен быть только в одном state. Иначе получите конфликт управления.
</div>