stage-topo-d topology-export: CLI fed-topology + SW v10
This commit is contained in:
@@ -13,7 +13,7 @@ import httpx
|
|||||||
import typer
|
import typer
|
||||||
|
|
||||||
from psyc import db, log
|
from psyc import db, log
|
||||||
from psyc.lines import discovery, federation, network_view, pulse, translog
|
from psyc.lines import discovery, federation, network_view, pulse, topology_export, translog
|
||||||
from psyc.result import Err, Ok
|
from psyc.result import Err, Ok
|
||||||
|
|
||||||
|
|
||||||
@@ -326,6 +326,18 @@ def register(typer_app: typer.Typer) -> None:
|
|||||||
for k, v in view.stats.items():
|
for k, v in view.stats.items():
|
||||||
typer.echo(f" {k:<32} {v}")
|
typer.echo(f" {k:<32} {v}")
|
||||||
|
|
||||||
|
@typer_app.command("fed-topology")
|
||||||
|
def fed_topology() -> None:
|
||||||
|
"""Print the sanitized docker topology JSON published at /federation/topology.
|
||||||
|
|
||||||
|
Useful for auditing what gets exposed to peers — pipe through `jq` to
|
||||||
|
confirm no env vars / volume mounts / IPs leak. On a dev box where
|
||||||
|
the docker-socket-proxy isn't running the export will be empty.
|
||||||
|
"""
|
||||||
|
db.init_db()
|
||||||
|
export = topology_export.build_export()
|
||||||
|
typer.echo(json.dumps(export.model_dump(mode="json"), indent=2))
|
||||||
|
|
||||||
@typer_app.command("fed-log-verify")
|
@typer_app.command("fed-log-verify")
|
||||||
def fed_log_verify() -> None:
|
def fed_log_verify() -> None:
|
||||||
"""Re-walk the chain locally and report verification status."""
|
"""Re-walk the chain locally and report verification status."""
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
// This makes the cockpit installable as a PWA and survives flaky connections,
|
// This makes the cockpit installable as a PWA and survives flaky connections,
|
||||||
// without serving stale operational data behind the operator's back.
|
// without serving stale operational data behind the operator's back.
|
||||||
|
|
||||||
const CACHE_VERSION = "psyc-v9";
|
const CACHE_VERSION = "psyc-v10";
|
||||||
const STATIC_ASSETS = [
|
const STATIC_ASSETS = [
|
||||||
"/static/cockpit.css",
|
"/static/cockpit.css",
|
||||||
"/static/psyc-tokens.css",
|
"/static/psyc-tokens.css",
|
||||||
|
|||||||
Reference in New Issue
Block a user