feat(topology): thread per-service config overrides through compose
MazeNET phase 2 step 2. Mirrors the flat-fleet service_config pattern
(DeckyConfig.service_config → composer → svc.compose_fragment) into the
topology compose pipeline, so a hand-authored decky can carry overrides
like {"ssh": {"password": "megapassword"}} and the ssh fragment reads
them just like the flat path does.
- _PlannedDecky gains service_config: dict[str, dict].
- persist() stores it under decky_config["service_config"].
- topology/compose.py passes cfg.get("service_config", {}).get(svc, {})
to svc.compose_fragment(service_cfg=...).
Schema unchanged — service_config lives inside the existing
decky_config JSON blob. Zero changes in decnet/services/*.
This commit is contained in:
@@ -69,6 +69,10 @@ class _PlannedDecky:
|
||||
# Mapping LAN-name → assigned IP within that LAN's subnet.
|
||||
ips_by_lan: dict[str, str] = field(default_factory=dict)
|
||||
forwards_l3: bool = False # only meaningful when present on ≥2 LANs
|
||||
# Per-service config overrides: {service_name: {field: value}}.
|
||||
# Mirrors ``DeckyConfig.service_config`` from the flat-fleet path;
|
||||
# services read these via ``compose_fragment(service_cfg=...)``.
|
||||
service_config: dict[str, dict] = field(default_factory=dict)
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user