@@ -60,6 +60,7 @@ const (
6060 Incidents Feature = "incidents"
6161 DevConfig Feature = "dev-config"
6262 PersesDashboards Feature = "perses-dashboards"
63+ AlertManagement Feature = "alert-management-api"
6364)
6465
6566func (pluginConfig * PluginConfig ) MarshalJSON () ([]byte , error ) {
@@ -229,6 +230,12 @@ func setupRoutes(cfg *Config) (*mux.Router, *PluginConfig) {
229230
230231 router .PathPrefix ("/health" ).HandlerFunc (healthHandler ())
231232
233+ // Stub endpoint to make the intended alert-management API shape reviewable
234+ // early in the PR series, without pulling in the full router/management stack yet.
235+ if cfg .Features [AlertManagement ] {
236+ router .HandleFunc ("/api/v1/alerting/health" , alertManagementHealthStub ()).Methods (http .MethodGet )
237+ }
238+
232239 router .Path ("/plugin-manifest.json" ).Handler (manifestHandler (cfg ))
233240
234241 router .PathPrefix ("/features" ).HandlerFunc (featuresHandler (cfg ))
@@ -238,6 +245,18 @@ func setupRoutes(cfg *Config) (*mux.Router, *PluginConfig) {
238245 return router , pluginConfig
239246}
240247
248+ func alertManagementHealthStub () http.HandlerFunc {
249+ type resp struct {
250+ Error string `json:"error"`
251+ }
252+ return func (w http.ResponseWriter , _ * http.Request ) {
253+ w .Header ().Set ("Content-Type" , "application/json" )
254+ w .Header ().Set ("Cache-Control" , "no-store" )
255+ w .WriteHeader (http .StatusNotImplemented )
256+ _ = json .NewEncoder (w ).Encode (resp {Error : "alert management API not implemented yet" })
257+ }
258+ }
259+
241260func setupProxyRoutes (cfg * Config , k8sclient * dynamic.DynamicClient , kind proxy.KindType ) * mux.Router {
242261 router := mux .NewRouter ()
243262 var proxyUrl string
0 commit comments