feat(db): FleetDecky table mirrors decnet-state.json into the DB
Adds a fleet_deckies table so DB-only consumers (orchestrator, web dashboard, REST API) can see unihost / MACVLAN / IPVLAN deckies without reading the JSON state file. Mirrors DeckyShard field-for-field. Composite PK (host_uuid, name) future-proofs for a mothership that runs both a local fleet and acts as a swarm master. host_uuid defaults to the "local" sentinel — no FK to swarm_hosts because the local mothership isn't enrolled as a worker. Repo additions: upsert_fleet_decky, delete_fleet_decky, list_fleet_deckies, list_running_fleet_deckies, update_fleet_decky_state, plus list_running_deckies which unions topology + fleet + shard sources for the orchestrator. Smoke-tested round-trip against MySQL: upsert, list_running, union view (source="fleet"), delete.
This commit is contained in:
@@ -49,6 +49,10 @@ from .deploy import (
|
||||
MutateIntervalRequest,
|
||||
PurgeResponse,
|
||||
)
|
||||
from .fleet import (
|
||||
LOCAL_HOST_SENTINEL,
|
||||
FleetDecky,
|
||||
)
|
||||
from .health import (
|
||||
ComponentHealth,
|
||||
HealthResponse,
|
||||
@@ -182,6 +186,9 @@ __all__ = [
|
||||
"DeployResponse",
|
||||
"MutateIntervalRequest",
|
||||
"PurgeResponse",
|
||||
# fleet
|
||||
"LOCAL_HOST_SENTINEL",
|
||||
"FleetDecky",
|
||||
# health
|
||||
"ComponentHealth",
|
||||
"HealthResponse",
|
||||
|
||||
Reference in New Issue
Block a user