grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1k stars 101 forks source link

[loki.rules.kubernetes] add support for clustered mode #976

Open ToonTijtgat2 opened 1 month ago

ToonTijtgat2 commented 1 month ago

Request

Dear

Could it please be possible to do the same changes for loki.rules.kubernetes as there are done for mimir.rules.kubernetes to make the component usefull in cluster mode?

I found the changes are done with https://github.com/grafana/alloy/pull/669 for mimir.

Thanks in advance.

Use case

using loki.rules.kubernetes in clustered mode

ToonTijtgat2 commented 1 month ago

@56quarters @rfratto Thanks for checking this Feature request. I think it might be a small fix since the same has happened for the parallel component.

Thanks Toon Tijtgat

tpaschalis commented 1 month ago

Hey there @ToonTijtgat2 👋 Thanks for opening an issue.

Would you be willing to try and contribute this as a PR? As you said, the blueprint is already there in #669, we'll be able to help you with reviews and hints if you find any difficulties.

ToonTijtgat2 commented 1 month ago

Dear @tpaschalis

Thanks for giving me the opportunity to become a contributor in the alloy code. I tried to start a New PR: https://github.com/grafana/alloy/pull/978

However the code is very different between mimir.ruler.kubernetes and loki.rules.kuberentes. I tried to align the code a little and tried to add the cluster mode to the component. Although I think I'm going to need a lot of help with the code. So thanks for checking the current PR and giving some hints, and do some tests.

Toon Tijtgat

tpaschalis commented 3 weeks ago

Thank you for opening a PR 🙌 Apologies for the belated response, I'll try to make time and review this!

ToonTijtgat2 commented 3 weeks ago

@tpaschalis Thanks for your reply. I might have opened https://github.com/grafana/alloy/pull/1057 as duplicate PR of https://github.com/grafana/alloy/pull/978, but I had to recreate the PR from a feature branch because I opened a second PR, and it's not possible to do it from the same Main branch. (https://github.com/grafana/alloy/pull/1058)