Skip to content

Commit

Permalink
chore: Add metastore client as dep for rf1 querier & ignore auth for …
Browse files Browse the repository at this point in the history
…ListBlocks (#13786)
  • Loading branch information
benclive authored Aug 8, 2024
1 parent df61482 commit 00e686d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/loki/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ func (t *Loki) setupAuthMiddleware() {
"/grpc.health.v1.Health/Check",
"/grpc.health.v1.Health/Watch",
"/metastorepb.MetastoreService/AddBlock",
"/metastorepb.MetastoreService/ListBlocksForQuery",
"/logproto.StreamData/GetStreamRates",
"/frontend.Frontend/Process",
"/frontend.Frontend/NotifyClientShutdown",
Expand Down Expand Up @@ -724,7 +725,7 @@ func (t *Loki) setupModuleManager() error {
Store: {Overrides, IndexGatewayRing},
IngesterRF1: {Store, Server, MemberlistKV, TenantConfigs, MetastoreClient, Analytics},
Ingester: {Store, Server, MemberlistKV, TenantConfigs, Analytics},
Querier: {Store, Ring, Server, IngesterQuerier, PatternRingClient, Overrides, Analytics, CacheGenerationLoader, QuerySchedulerRing},
Querier: {Store, Ring, Server, IngesterQuerier, PatternRingClient, MetastoreClient, Overrides, Analytics, CacheGenerationLoader, QuerySchedulerRing},
QueryFrontendTripperware: {Server, Overrides, TenantConfigs},
QueryFrontend: {QueryFrontendTripperware, Analytics, CacheGenerationLoader, QuerySchedulerRing},
QueryScheduler: {Server, Overrides, MemberlistKV, Analytics, QuerySchedulerRing},
Expand Down
4 changes: 4 additions & 0 deletions pkg/loki/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -1829,12 +1829,16 @@ func (t *Loki) initMetastore() (services.Service, error) {
if err != nil {
return nil, err
}
// Service methods have tenant auth disabled in the fakeauth.SetupAuthMiddleware call since this is a shared service
metastorepb.RegisterMetastoreServiceServer(t.Server.GRPC, m)

return m, nil
}

func (t *Loki) initMetastoreClient() (services.Service, error) {
if !t.Cfg.IngesterRF1.Enabled && !t.Cfg.QuerierRF1.Enabled {
return nil, nil
}
mc, err := metastoreclient.New(t.Cfg.MetastoreClient, prometheus.DefaultRegisterer)
if err != nil {
return nil, err
Expand Down

0 comments on commit 00e686d

Please sign in to comment.