From 29a93af3f517849b51918b0076087d7d57408c97 Mon Sep 17 00:00:00 2001 From: Zach Leslie Date: Wed, 7 Aug 2024 18:46:58 +0000 Subject: [PATCH] Fix /static object mapping on memberlist as the only consumer (#3947) --- cmd/tempo/app/modules.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/tempo/app/modules.go b/cmd/tempo/app/modules.go index 0e75a526b49..726ef4a94ff 100644 --- a/cmd/tempo/app/modules.go +++ b/cmd/tempo/app/modules.go @@ -423,8 +423,6 @@ func (t *App) initQueryFrontend() (services.Service, error) { // http endpoint to see usage stats data t.Server.HTTPRouter().Handle(addHTTPAPIPrefix(&t.cfg, api.PathUsageStats), usageStatsHandler(t.cfg.UsageReport)) - t.Server.HTTPRouter().PathPrefix("/static/").HandlerFunc(http.FileServer(http.FS(staticFiles)).ServeHTTP).Methods("GET") - // todo: queryFrontend should implement service.Service and take the cortex frontend a submodule return t.frontend, nil } @@ -494,6 +492,9 @@ func (t *App) initMemberlistKV() (services.Service, error) { t.cfg.Distributor.DistributorRing.KVStore.MemberlistKV = t.MemberlistKV.GetMemberlistKV t.cfg.Compactor.ShardingRing.KVStore.MemberlistKV = t.MemberlistKV.GetMemberlistKV + // Only the memberlist endpoint uses static files currently + t.Server.HTTPRouter().PathPrefix("/static/").HandlerFunc(http.FileServer(http.FS(staticFiles)).ServeHTTP).Methods("GET") + t.Server.HTTPRouter().Handle("/memberlist", memberlistStatusHandler("", t.MemberlistKV)) return t.MemberlistKV, nil