Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loki: allow for multiple targets #3807

Merged
merged 1 commit into from
Jun 7, 2021

Conversation

dannykopping
Copy link
Contributor

Signed-off-by: Danny Kopping danny.kopping@grafana.com

What this PR does / why we need it:
Allows for multiple targets to be defined. A "target" is a module inside Loki (querier, ingester, etc), and currently we can only target a single one. If no -target argument is provided, all modules are loaded, so there should be no reason to not allow multiple targets (i.e. a subset of modules) to be defined.

Which issue(s) this PR fixes:
Fixes #3801

Special notes for your reviewer:
Cortex already implements this; I stole the implementation wholesale.

I also tried for a good couple hours to write tests for this, but unfortunately it's made rather difficult since a lot of the fields and functions in this package are unexported. However, Cortex does test this package well so I'm confident in the implementation.

I don't think the documentation needs updating, but I have modified the flag description.

Checklist

  • Documentation added
  • Tests updated

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM however it should be noted that compactor should be ran as a singleton. The issue this closed can't run the compactor on multiple nodes.

@cyriltovena cyriltovena merged commit 3642fac into grafana:main Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possiblity to run a selection of services instead of just "all" or "single"
2 participants