Skip to content

Commit

Permalink
fix(distributor): validate partition ring is kafka is enabled (#14303)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyriltovena authored Oct 4, 2024
1 parent c76ff14 commit 8438d41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/loki/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@ func (t *Loki) initTenantConfigs() (_ services.Service, err error) {
func (t *Loki) initDistributor() (services.Service, error) {
t.Cfg.Distributor.KafkaConfig = t.Cfg.KafkaConfig

if t.Cfg.Distributor.KafkaEnabled && !t.Cfg.Ingester.KafkaIngestion.Enabled {
return nil, errors.New("kafka is enabled in distributor but not in ingester")
}

var err error
logger := log.With(util_log.Logger, "component", "distributor")
t.distributor, err = distributor.New(
Expand Down

0 comments on commit 8438d41

Please sign in to comment.