Skip to content

Commit 12253ec

Browse files
allow ingester and distributor to run on same instance (grafana#4348)
* allow ingester and distributor to run on same instance Signed-off-by: Trevor Whitney <[email protected]> * add comment around conditional distributor Push registration Co-authored-by: Ed Welch <[email protected]> * lint Co-authored-by: Ed Welch <[email protected]>
1 parent 36e8198 commit 12253ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/loki/modules.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ func (t *Loki) initDistributor() (services.Service, error) {
173173
return nil, err
174174
}
175175

176-
if !t.Cfg.isModuleEnabled(All) {
176+
// Register the distributor to receive Push requests over GRPC
177+
// EXCEPT when running with `-target=all` or `-target=` contains `ingester`
178+
if !t.Cfg.isModuleEnabled(All) && !t.Cfg.isModuleEnabled(Ingester) {
177179
logproto.RegisterPusherServer(t.Server.GRPC, t.distributor)
178180
}
179181

0 commit comments

Comments
 (0)