# 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. - **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. Every `/api/graph` call lists the API fresh — no cache, no watch. `/api/flows` reads recent flows from `hubble-relay.d8-cni-cilium.svc:443` (TLS, verified with the public part of Deckhouse's hubble CA mounted at `/etc/hubble-ca/ca.crt`; relay does not ask for a client certificate) and aggregates them per source → destination → port. Replies are excluded, so each connection counts once. | Endpoint | What | |---|---| | `/api/graph` | nodes + config edges + pod placement | | `/api/flows?namespaces=a,b&window=300` | aggregated Hubble traffic | | `/api/resource?kind=&namespace=&name=` | live YAML | | `/api/pods?id=wl///&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 The in-cluster registry can't be fed from inside the cluster yet (Kaniko's image lives on gcr.io, blocked here), so for now: ``` docker build -t cluster-map:vX . docker save cluster-map:vX -o cluster-map.tar scp cluster-map.tar xeon:/tmp/ ssh xeon 'sudo /opt/deckhouse/bin/ctr -n k8s.io images import /tmp/cluster-map.tar' ``` The Deployment pins `nodeSelector: xeon` + `imagePullPolicy: Never`. Manifests: `03-kubernetes/apps/cluster-map/` in `project-chimera`, mirrored to `k8s-manifests` for Argo.