mirror of
https://github.com/luxfi/bridge.git
synced 2026-09-24 00:26:46 +00:00
The swap list answered anonymously with every swap id, the MPC signature minted for it and the signed destination tx, on the port the Ingress publishes. /metrics named the release wallets and reported which of them could not sign. The deposit poll turned an anonymous request into a source-chain RPC call with caller-chosen arguments. All three move to a second listener, BRIDGE_ADMIN_ADDR, along with the swap mutators, which still need BRIDGE_ADMIN_ROUTES on top. The edge routes a port, so a port is the thing that can be left unrouted: k8s publishes 8080 and gives the operator surface 8081, and the ServiceMonitor scrapes there. A swap read by id keeps the swap's progress and drops the signature and the raw tx; the list on the operator port carries both. The legacy proxy exposed the same list twice. `/api/swaps/*` matched the empty remainder and so forwarded GET /api/swaps to the backend's list; `+` requires a sub-path. `/v1/bridge/swaps/*` forwarded arbitrary sub-paths into /swaps/… after the prefix strip — the backend mounts its swap router at /api/swaps, so that path space holds no routes and the forwarder only ever produced a 404.
36 lines
1.3 KiB
YAML
36 lines
1.3 KiB
YAML
---
|
|
# Tells Prometheus (k8s/monitoring-prometheus.yaml) to scrape the
|
|
# bridge's /metrics endpoint. Without this, everything documented in
|
|
# docs/operator-runbook.md §6 (Metrics) and the alert rules in
|
|
# k8s/bridge-alerts.yaml have no data to evaluate against — Prometheus
|
|
# only scrapes targets a ServiceMonitor (or PodMonitor) points it at.
|
|
#
|
|
# Targets the `lux-bridge` Service's "admin" port (k8s/bridge-deployment.yaml)
|
|
# — the operator listener, which is where cmd/bridge serves /metrics. The
|
|
# series name the MPC release wallets and say which of them cannot sign, so
|
|
# the port that carries them is not the port the Ingress publishes. Lives in
|
|
# the lux-bridge namespace, not monitoring:
|
|
# ServiceMonitors are picked up cluster-wide because
|
|
# serviceMonitorNamespaceSelector: {} on the Prometheus CR matches every
|
|
# namespace, so it can sit next to the thing it's monitoring.
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: lux-bridge
|
|
namespace: lux-bridge
|
|
labels:
|
|
app: lux-bridge
|
|
app.kubernetes.io/part-of: lux-monitoring
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: lux-bridge
|
|
namespaceSelector:
|
|
matchNames:
|
|
- lux-bridge
|
|
endpoints:
|
|
- port: admin
|
|
path: /metrics
|
|
interval: 30s
|
|
scrapeTimeout: 10s
|