Skip to content

Commit

Permalink
Fix /static object mapping on memberlist as the only consumer (#3947)
Browse files Browse the repository at this point in the history
  • Loading branch information
zalegrala authored Aug 7, 2024
1 parent c5504bd commit 29a93af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/tempo/app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 29a93af

Please sign in to comment.