Vitaliy ChefanovandClaude Opus 5.5 41f9b47556 Filter infra traffic at the Hubble agents
Host-originated flows, remote-node, cilium health and DNS :53 were ~74%
of the non-reply events on a 12k-event sample and none of them map to a
workload card; streaming them all kept hubble-relay at ~400m CPU. They
are now blacklisted in the GetFlows request, so agents drop them before
the relay. The UI's "Служебный" toggle had nothing left to show and is
gone; the legend says what isn't collected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 20:26:05 +03:00

cluster-map

Topology map of the Project Chimera Deckhouse cluster.

  • Left: inventory tree in two views. Namespaces groups objects by namespace and kind; Ноды shows what is scheduled on each node. Search matches names, images and ingress hosts.
  • Centre: the selected namespace(s) or node as compact cards inside namespace boxes. Solid arrows come from configuration (Ingress → Service → workload by label selector); dashed animated arrows are real traffic from Hubble Relay over the chosen window (5 min / 15 min / 1 h), red when Cilium dropped some of it. Peers from other namespaces are drawn as dashed "ghost" cards. Kubelet probes, DNS, cilium health and node-to-node traffic are not collected (see Backend). Traffic refreshes in place every 30 s without relayout; peers that would need new cards wait for "Обновить".
  • Right: details for the selected object — overview, links (config and traffic, clickable), live YAML, pod logs.

Workloads under non-native controllers (kruise Advanced DaemonSet behind ingress-nginx, database operators, bare Jobs) are included and named the way Hubble names them, so traffic attaches to the same cards.

Backend

Go, client-go in-cluster config. The graph is built from informer caches (watch-backed, managedFields stripped), so /api/graph costs milliseconds instead of ~0.9 s of List calls.

Traffic: each Cilium agent keeps only 4095 flows in its ring buffer — at a few hundred flows/s that is ~10 s of history, so reading the buffer on request can't answer "last 15 minutes". A background follow stream from hubble-relay.d8-cni-cilium.svc:443 (TLS verified with the public part of Deckhouse's hubble CA at /etc/hubble-ca/ca.crt; relay does not ask for a client certificate) feeds per-minute buckets for the last hour. Counts are distinct connections (5-tuples), not Hubble events — one connection produces several events. new = opened by TCP SYN inside the window, dropped = tuples with a DROPPED verdict. After a restart the collector only knows what it has seen since; coveredSec says how much of the window that is.

Infra traffic is filtered at the agents (infraFilters in flows.go): host-originated flows (kubelet probes, hostNetwork pods), remote-node, cilium health and DNS :53. On a 12k-event sample they were ~74% of non-reply events, none of them attach to a workload card, and streaming them cost hubble-relay ~400m CPU.

Endpoint What
/api/graph nodes + config edges + pod placement
/api/flows?namespaces=a,b&window=300 aggregated traffic touching those namespaces
/api/resource?kind=&namespace=&name= live YAML (managedFields stripped)
/api/pods?id=wl/<ns>/<kind>/<name>&namespace= pods of a workload
/api/logs?namespace=&pod=&container= last 500 log lines
/healthz liveness/readiness

Frontend

Plain JS, no build step: static/index.html, app.css, app.js. Cytoscape.js draws, elkjs lays out in two passes (each box on its own with its unconnected groups packed in rows, then the boxes against each other). Both libraries are vendored in static/vendor/ so the page works without a CDN. Theme follows prefers-color-scheme.

Build and deploy

R=git.project-chimera.ru/fanchji/cluster-map/cluster-map-app
docker build -t $R:vX . && docker push $R:vX
docker inspect --format '{{index .RepoDigests 0}}' $R:vX

The Deployment pins the image by digest. Anonymous pull works (public Gitea user), no imagePullSecret. Manifests: 03-kubernetes/apps/cluster-map/ in project-chimera, mirrored to k8s-manifests for Argo.

S
Description
Interactive Deckhouse cluster topology map -- namespace/workload/service graph with click-through config details, live traffic overlay via Cilium Hubble
Readme Apache-2.0
1.2 MiB
Languages
Go 59.2%
JavaScript 29.1%
Go Template 4.7%
CSS 4%
HTML 1.8%
Other 1.2%