feat(httpapi): return replica docker install commands on speaker create
quality / commitlint (push) Skipped
quality / changes (push) Successful in 8s
quality / docker-check (push) Skipped
quality / openapi (push) Failing after 21s
quality / web (push) Successful in 55s
quality / go (push) Successful in 1m2s
quality / bird2 (push) Successful in 16s
CD / quality (push) Failing after 2m49s
CD / publish (push) Skipped
quality / commitlint (push) Skipped
quality / changes (push) Successful in 8s
quality / docker-check (push) Skipped
quality / openapi (push) Failing after 21s
quality / web (push) Successful in 55s
quality / go (push) Successful in 1m2s
quality / bird2 (push) Successful in 16s
CD / quality (push) Failing after 2m49s
CD / publish (push) Skipped
После создания реплики 201 отдаёт agent_secret, node_token и install.docker_commands (bird2 + agent + Traefik DNS-01). UI показывает шаг установки вместо закрытия диалога, чтобы секрет больше не терялся. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
+52
-6
@@ -1801,11 +1801,55 @@ components:
|
||||
type: string
|
||||
description: URL agent или https://AGENT_DOMAIN
|
||||
meta_json:
|
||||
oneOf:
|
||||
- type: string
|
||||
- type: object
|
||||
description: >
|
||||
JSON-объект (строка или object). Ключи node_ipv4, bird_bgp_source_ipv4
|
||||
(default = node_ipv4), agent_domain, agent_secret (генерируется при создании если пуст).
|
||||
letsencrypt_email:
|
||||
type: string
|
||||
description: Email ACME для Traefik на ноде. Только для генерации install.docker_commands, не сохраняется.
|
||||
cf_dns_api_token:
|
||||
type: string
|
||||
description: Cloudflare DNS API token (Zone:DNS:Edit) для LE DNS-01. Только для install-сниппета, не сохраняется.
|
||||
panel_ip_whitelist:
|
||||
type: string
|
||||
description: CIDR/IP панели для Traefik ipallowlist. Только для install-сниппета, не сохраняется.
|
||||
control_plane_url:
|
||||
type: string
|
||||
format: uri
|
||||
description: Публичный HTTPS URL панели (EVOBGP_CONTROL_PLANE_URL на реплике). Если пуст — из Origin / X-Forwarded-Host.
|
||||
additionalProperties: true
|
||||
|
||||
SpeakerInstall:
|
||||
type: object
|
||||
description: Одноразовый пакет установки реплики (только POST /v1/speakers 201).
|
||||
properties:
|
||||
docker_commands:
|
||||
type: string
|
||||
description: >
|
||||
JSON-объект. Ключи node_ipv4, bird_bgp_source_ipv4 (default = node_ipv4),
|
||||
agent_domain, agent_secret (генерируется при создании если пуст).
|
||||
additionalProperties: true
|
||||
Bash: sysctl, heredoc docker-compose.yaml (bird2 + agent + Traefik DNS-01) и docker compose up -d.
|
||||
compose_yaml:
|
||||
type: string
|
||||
description: Тело docker-compose.yaml без heredoc (превью).
|
||||
|
||||
BgpSpeakerCreated:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/BgpSpeaker"
|
||||
- type: object
|
||||
properties:
|
||||
agent_secret:
|
||||
type: string
|
||||
description: Bearer для Panel→Node (EVOBGP_AGENT_SECRET). Только в 201.
|
||||
node_token:
|
||||
type: string
|
||||
description: API-ключ role=node (EVOBGP_NODE_TOKEN). Только в 201.
|
||||
bundle_pubkey_base64:
|
||||
type: string
|
||||
description: Ed25519 pubkey для verify-bundle на ноде.
|
||||
install:
|
||||
$ref: "#/components/schemas/SpeakerInstall"
|
||||
|
||||
BgpSpeakerPatch:
|
||||
type: object
|
||||
@@ -3360,7 +3404,9 @@ paths:
|
||||
post:
|
||||
tags: [Speakers]
|
||||
summary: Зарегистрировать спикер
|
||||
description: Реплика, canary и т.д.
|
||||
description: >
|
||||
Реплика или master. Для replica 201 содержит agent_secret, node_token и
|
||||
install.docker_commands (bird2 + agent + Traefik LE DNS-01) — один раз.
|
||||
operationId: createSpeaker
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/TenantId"
|
||||
@@ -3373,11 +3419,11 @@ paths:
|
||||
$ref: "#/components/schemas/BgpSpeakerCreate"
|
||||
responses:
|
||||
"201":
|
||||
description: Ресурс создан.
|
||||
description: Ресурс создан. Для replica — одноразовый install-сниппет.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/BgpSpeaker"
|
||||
$ref: "#/components/schemas/BgpSpeakerCreated"
|
||||
default:
|
||||
$ref: "#/components/responses/DefaultProblem"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user