Skip to content

Commit 6c5cf09

Browse files
TheoBrigittemarctc
authored andcommitted
Fix mimir.rules.kubernetes panic on non-leader debug info retrieval (#3451)
* Fix mimir.rules.kubernetes to only return eventProcessor state if it exists * update CHANGELOG
1 parent e2f97f8 commit 6c5cf09

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Main (unreleased)
4545
### Bugfixes
4646

4747
- Fix `otelcol.receiver.filelog` documentation's default value for `start_at`. (@petewall)
48+
- Fix `mimir.rules.kubernetes` panic on non-leader debug info retrieval (@TheoBrigitte)
4849

4950
### Other changes
5051

internal/component/mimir/rules/kubernetes/debug.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ type DebugMimirNamespace struct {
2323
func (c *Component) DebugInfo() interface{} {
2424
var output DebugInfo
2525

26+
if c.eventProcessor == nil {
27+
return output
28+
}
29+
2630
currentState := c.eventProcessor.getMimirState()
2731
for namespace := range currentState {
2832
if !isManagedMimirNamespace(c.args.MimirNameSpacePrefix, namespace) {

0 commit comments

Comments
 (0)