Skip to content

feat: add companion service discovery - #2123

Open
ggrossetie wants to merge 1 commit into
yuzutech:mainfrom
ggrossetie:issue-1423-companion-discovery
Open

feat: add companion service discovery#2123
ggrossetie wants to merge 1 commit into
yuzutech:mainfrom
ggrossetie:issue-1423-companion-discovery

Conversation

@ggrossetie

Copy link
Copy Markdown
Member
  • Let a companion container not built into Kroki register itself as a new diagram type via a REST API under /services (register, heartbeat, get, list, unregister) — closes Service discovery #1423
  • Registrations are held in memory and expire without a heartbeat, since Kroki is stateless
  • Disabled by default (KROKI_ENABLE_COMPANION_DISCOVERY), and always disabled under KROKI_SAFE_MODE=SECURE (the default, including on kroki.io) regardless of that flag
  • The registration API can be gated with a bearer token (KROKI_COMPANION_REGISTRATION_TOKEN), and the host/port denylist (loopback, link-local, private addresses, cloud metadata hostnames) can be extended per deployment (KROKI_COMPANION_BLOCKED_HOSTS)
  • /health, /v1/health, /healthz and the homepage now reflect the live registry instead of a startup snapshot

Let a companion container not built into Kroki register itself as a new
diagram type via a REST API under /services (register, heartbeat, get,
list, unregister). Registrations are held in memory and expire without a
heartbeat, since Kroki is stateless.

Disabled by default (KROKI_ENABLE_COMPANION_DISCOVERY), and always
disabled under KROKI_SAFE_MODE=SECURE (the default, including on
kroki.io) regardless of that flag. The registration API can be gated
with a bearer token (KROKI_COMPANION_REGISTRATION_TOKEN), and the
host/port denylist can be extended per deployment
(KROKI_COMPANION_BLOCKED_HOSTS).

Closes yuzutech#1423

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Service discovery

1 participant