Skip to content

Conversation

@fighterhit
Copy link

Fix pod oom events cannot be emitted due to regular expression error and lack of kernel-monitor rule whose reason is PodOOMKilling.

matched := l.buffer.Match(rule.Pattern)
if len(matched) == 0 {
continue
}
status := l.generateStatus(matched, rule)

message := generateMessage(logs)
if rule.Reason == OOMREASON && k8sClient != nil {
uuid := string(uuidRegx.Find([]byte(message)))

Because this is based on whether the reason is PodOOMKilling, so there has to be such a rule that can both be matched by the uuidRegx regular expression in the code.

…and lack of kernel-monitor rule whose reason is PodOOMKilling
@KeyOfSpectator KeyOfSpectator requested review from KeyOfSpectator and ringtail and removed request for ringtail November 28, 2024 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant