unified-storage: setup distributor module option A (#104737)

* setup distributor module

* move lifecycler into resource server provider

* remove ring/client pool setup from distributor module and use the same ring/client pool between storage server module and distributor module

* implement resourcestore server methods

* make healthcheck fail if ring is not running
This commit is contained in:
Will Assis
2025-05-19 08:46:03 -03:00
committed by GitHub
parent 98c9bc5028
commit bdae4424e8
17 changed files with 458 additions and 541 deletions

View File

@ -21,7 +21,7 @@ import (
func NewResourceServer(db infraDB.DB, cfg *setting.Cfg,
tracer trace.Tracer, reg prometheus.Registerer, ac types.AccessClient,
searchOptions resource.SearchOptions, storageMetrics *resource.StorageMetrics,
indexMetrics *resource.BleveIndexMetrics, features featuremgmt.FeatureToggles, distributor *resource.Distributor) (resource.ResourceServer, error) {
indexMetrics *resource.BleveIndexMetrics, features featuremgmt.FeatureToggles) (resource.ResourceServer, error) {
apiserverCfg := cfg.SectionWithEnvOverrides("grafana-apiserver")
opts := resource.ResourceServerOptions{
Tracer: tracer,
@ -68,7 +68,6 @@ func NewResourceServer(db infraDB.DB, cfg *setting.Cfg,
opts.Lifecycle = store
opts.Search = searchOptions
opts.IndexMetrics = indexMetrics
opts.Distributor = distributor
rs, err := resource.NewResourceServer(opts)
if err != nil {