feat(siren): Go server that serves Siren's UI in front of Alertmanager #103
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Replace Siren (~83 MB, TanStack Start on Node) with one small Go binary (~10 MB target) that serves Siren's UI and passes the Alertmanager API through. It takes over
alertmanager.dcunha.ioand makes both the separate Siren deployment and Alertmanager's own web UI unnecessary.Why this is small
All of Siren's Alertmanager traffic is in one file,
src/lib/alertmanager/alertmanager-client.ts(Siren 1.4.40): three TanStackcreateServerFncalls plus a health check:src/lib/health/health-check.ts)Everything else is client-side React.
Plan
fetchcalls to/api/v2/..., and build it as a static SPA instead of SSR./api/v2and/-/tohttp://alertmanager.observability.svc.cluster.local:9093, serve/livezand/readyz.apps/likeapps/komfgo(UI built in one stage, Go in the next).Alertmanager has no setting for loading a custom UI, so the switch has to happen in front of it.
Open decision (blocks the cutover)
internal-gateway; Siren is onedge-gatewaywith a Pocket-ID OIDC client. Pick one for the merged hostname, and decide who can create silences.Constraints
/-/healthymust keep reaching Alertmanager: Gatus checkshttps://alertmanager.dcunha.io/-/healthy.Cheaper fallback (no memory win)
Split by path on the HTTPRoute:
/api/v2and/-/go to Alertmanager, everything else to Siren. About 30 minutes, no code.