registerClusterAPI wires the read-only cluster-topology endpoints. It is only called when a kubernetes client is available (remote/k8s backend); the process/standalone backends have no cluster to introspect.
(r *gin.RouterGroup, client kubernetes.Interface)
| 45 | // called when a kubernetes client is available (remote/k8s backend); the |
| 46 | // process/standalone backends have no cluster to introspect. |
| 47 | func registerClusterAPI(r *gin.RouterGroup, client kubernetes.Interface) { |
| 48 | h := &clusterHandler{client: client} |
| 49 | r.GET("/cluster/nodes", h.nodes) |
| 50 | r.GET("/cluster/pods", h.pods) |
| 51 | r.GET("/cluster/events", h.events) |
| 52 | r.GET("/cluster/nodepools", h.nodepools) |
| 53 | // Aggregated cluster totals for the admin nav (shown on every page, not just |
| 54 | // the Nodes view) — computed server-side so no page needs the full pod list. |
| 55 | r.GET("/cluster/summary", h.summary) |
| 56 | } |
| 57 | |
| 58 | // --- projection types: the minimal K8s-shaped subset the node view reads --- |
| 59 |
no outgoing calls