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

feat: add support for disabling alert rules forwarding #490

Merged
merged 8 commits into from
Feb 10, 2025

Conversation

lucabello
Copy link
Contributor

@lucabello lucabello commented Feb 6, 2025

Issue

Partially addresses canonical/grafana-agent-operator#154

Solution

Allow charm authors to pass forward_alert_rules=False to both LokiPushApiConsumer and LogForwarder (pebble log forwarding).

When the flag is True, the alert rules information is simply not put in relation data.

Testing Instructions

Pack and deploy both this charm and grafana-agent from canonical/grafana-agent-operator#252 , and test the new config option.

@lucabello lucabello requested a review from a team as a code owner February 6, 2025 17:05
Copy link
Contributor

@sed-i sed-i left a comment

Choose a reason for hiding this comment

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

Add a utest here too?

@lucabello
Copy link
Contributor Author

lucabello commented Feb 7, 2025

@sed-i The unit test has to live in grafana-agent (and any charm that implements it), we can discuss why if we need to!

This test is what you're looking for :)

@lucabello lucabello merged commit 91b0540 into main Feb 10, 2025
12 checks passed
@lucabello lucabello deleted the feature/disable-alerts branch February 10, 2025 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants