generated from mathias/template-go-web
feat(atlas): Phase B tail — live namespaces + trim inline fallback
NamespaceSummary (test-first) renders the substrate ns line from live cluster namespaces (system-filtered, sorted, capped). Handler now overlays both node specs and the ns line via a single cached liveOverlay(). Removed the inline SUBSTRATE/STAGES/NS data — /api/atlas.json is the single source; the page shows an error banner on fetch failure instead of stale data. GPU model naming intentionally NOT done: koala's node has no GPU product label (only nvidia.com/gpu count), so "1× GPU" is the API's truth — naming the RTX 5070 would need GPU-feature-discovery, out of scope. Verified: build/vet/lint(0)/test green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,9 @@ const (
|
||||
// Nodes returns the raw /api/v1/nodes JSON from the in-cluster API server.
|
||||
func Nodes() ([]byte, error) { return get("/api/v1/nodes") }
|
||||
|
||||
// Namespaces returns the raw /api/v1/namespaces JSON from the in-cluster API server.
|
||||
func Namespaces() ([]byte, error) { return get("/api/v1/namespaces") }
|
||||
|
||||
func get(path string) ([]byte, error) {
|
||||
host, port := os.Getenv("KUBERNETES_SERVICE_HOST"), os.Getenv("KUBERNETES_SERVICE_PORT")
|
||||
if host == "" || port == "" {
|
||||
|
||||
Reference in New Issue
Block a user