From 71c68b059b9cb7bd0c04528a707447fbcc7e75a6 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Sat, 5 Sep 2026 17:51:48 +0800 Subject: [PATCH] feat(health): serve prometheus and thanos under the metricsDb service Pairs with the cubecos S[MetricsDb] check item and the cube-cos-openapi spec bump. api/docs.json is gitignored and regenerated from the submodule by 'task generateApiDocs', so only module.go and the submodule pointer move. The submodule is pinned to a34418d on cube-cos-openapi's feat/metricsdb-service; re-pin to develop once that PR merges. Verified: submodule docs.yaml carries metricsDb, yq regenerates a valid docs.json carrying it too, and CGO_ENABLED=0 go build ./api/... ./internal/... is clean with it embedded. Signed-off-by: Jim Lin Co-authored-by: Eandalf Co-authored-by: Claude Opus 5 (1M context) --- api/cube-cos-openapi | 2 +- internal/cubecos/module.go | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/api/cube-cos-openapi b/api/cube-cos-openapi index 09b7d76b..a34418d3 160000 --- a/api/cube-cos-openapi +++ b/api/cube-cos-openapi @@ -1 +1 @@ -Subproject commit 09b7d76b4a8e877b9d2560528faa68b2065fc703 +Subproject commit a34418d338c775429c3405fdb80813fd5bbda2aa diff --git a/internal/cubecos/module.go b/internal/cubecos/module.go index 8e74a20f..f0875f85 100644 --- a/internal/cubecos/module.go +++ b/internal/cubecos/module.go @@ -207,6 +207,18 @@ var ( {Name: "grafana", IsRepairable: true}, }, }, + { + // The metric persistence layer, kept separate from metrics (which is + // collection and visualisation). influxdb and kapacitor stay under + // notifications for now: kapacitor is a write proxy and alerting engine + // here, not only storage, so moving them is its own decision. + Name: "metricsDb", + Category: "infrascope", + Modules: []services.Module{ + {Name: "prometheus", IsRepairable: true}, + {Name: "thanos", IsRepairable: true}, + }, + }, { Name: "logAnalytics", Category: "infrascope",