services -> domains
This commit is contained in:
30
CLAUDE.md
30
CLAUDE.md
@@ -12,8 +12,8 @@ Wild Central is the networking and coordination platform for the Wild product fa
|
||||
- **Tunnels** (cloudflared) — outbound-only public exposure via Cloudflare
|
||||
- **DDNS** (Cloudflare) — A record + CNAME management
|
||||
- **Security** (CrowdSec) — intrusion detection
|
||||
- **NATS JetStream** — coordination bus for service registration, presence, and events
|
||||
- **Service Registration** — the contract API for Wild Cloud and Wild Works
|
||||
- **NATS JetStream** — coordination bus for domain registration, presence, and events
|
||||
- **Domain Registration** — the contract API for Wild Cloud and Wild Works
|
||||
|
||||
## Architecture
|
||||
|
||||
@@ -21,7 +21,7 @@ Wild Central is a Go service that manages Linux networking daemons via config fi
|
||||
|
||||
**Consumers:**
|
||||
- **Wild Cloud** — registers k8s instance domains for L4 SNI passthrough
|
||||
- **Wild Works** — registers services for L7 HTTP reverse proxy with TLS termination
|
||||
- **Wild Works** — registers domains for L7 HTTP reverse proxy with TLS termination
|
||||
|
||||
Both connect to Central's NATS (port 4222) or use the HTTP API (port 5055) to register services.
|
||||
|
||||
@@ -52,23 +52,23 @@ make check # Lint + test
|
||||
Runtime state is persisted in `{WILD_CENTRAL_DATA_DIR}/`:
|
||||
- `state.yaml` — operator, domain, firewall, DDNS, DHCP settings (managed via API)
|
||||
- `secrets.yaml` — API tokens and credentials
|
||||
- `services/` — per-domain service registration files
|
||||
- `domains/` — per-domain registration files
|
||||
- `nats/` — embedded NATS JetStream data
|
||||
- `instances/` — Wild Cloud instance configs
|
||||
|
||||
## Service Registration API
|
||||
## Domain Registration API
|
||||
|
||||
The key abstraction. Services register with Central to get DNS, proxy, TLS, and public exposure.
|
||||
The key abstraction. Domains register with Central to get DNS, gateway routing, TLS, and public exposure.
|
||||
|
||||
```
|
||||
POST /api/v1/services Register a service
|
||||
GET /api/v1/services List all services
|
||||
GET /api/v1/services/{name} Get service details
|
||||
PATCH /api/v1/services/{name} Update service
|
||||
DELETE /api/v1/services/{name} Deregister service
|
||||
POST /api/v1/domains Register a domain
|
||||
GET /api/v1/domains List all domains
|
||||
GET /api/v1/domains/{domain} Get domain details
|
||||
PATCH /api/v1/domains/{domain} Update domain
|
||||
DELETE /api/v1/domains/{domain} Deregister domain
|
||||
```
|
||||
|
||||
### Service payload
|
||||
### Domain payload
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -87,10 +87,10 @@ DELETE /api/v1/services/{name} Deregister service
|
||||
### Backend types
|
||||
|
||||
- `tcp-passthrough` — L4, SNI routing, backend handles TLS (Wild Cloud k8s)
|
||||
- `http` — L7, Central terminates TLS with wildcard cert (Wild Works services)
|
||||
- `static` — L7, static file serving (Wild Works frontends)
|
||||
- `http` — L7, Central terminates TLS with wildcard cert (Wild Works)
|
||||
- `dns-only` — DNS resolution only, no gateway routing (SSH, game servers, etc.)
|
||||
|
||||
### Public
|
||||
|
||||
- `false` (default) — LAN-visible only (DNS + proxy + TLS)
|
||||
- `false` (default) — LAN-visible only (DNS + gateway + TLS)
|
||||
- `true` — internet-visible (+ DDNS or tunnel exposure)
|
||||
|
||||
Reference in New Issue
Block a user