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

support setting integration name for alert #167

Conversation

alexandermarston
Copy link
Contributor

We'd like to start pushing some of our PrometheusRule evaluations through Coralogix, but at the moment we can't seem to natively setup the notification integration without using a Coralogix specific Kubernetes resource.

It would be nice if we could add an additional annotation to our already existing PrometheusRules to specify the name of the Notification Integration we would like to use.

Looking for some feedback on this approach.

@alexandermarston alexandermarston requested a review from a team as a code owner October 9, 2024 11:38
@CLAassistant
Copy link

CLAassistant commented Oct 9, 2024

CLA assistant check
All committers have signed the CLA.

@OrNovo
Copy link
Contributor

OrNovo commented Oct 10, 2024

Hi @alexandermarston.
Thank you for your contribution. Please take into account that this may create a conflict with future support of alert-manger (ie alert-manager controller will override the logic you suggested).
Please resolve the conflict and I'll approve your PR.

@alexandermarston
Copy link
Contributor Author

Hi @alexandermarston. Thank you for your contribution. Please take into account that this may create a conflict with future support of alert-manger (ie alert-manager controller will override the logic you suggested). Please resolve the conflict and I'll approve your PR.

Thank you for the feedback.

Would ignoring the cxNotificationName annotation if the PrometheusRule is labelled with coralogix.com/managed-by-alertmanger-config be enough?

Just as some added context, the Alert Manager integration looks neat but as it currently stands it wouldn't be compatible with our Alert Manager implementation. We use the Alertmanager resource, but define our routes and receivers in a configuration secret not in the resource itself.

@OrNovo
Copy link
Contributor

OrNovo commented Oct 10, 2024

Hi @alexandermarston. Thank you for your contribution. Please take into account that this may create a conflict with future support of alert-manger (ie alert-manager controller will override the logic you suggested). Please resolve the conflict and I'll approve your PR.

Thank you for the feedback.

Would ignoring the cxNotificationName annotation if the PrometheusRule is labelled with coralogix.com/managed-by-alertmanger-config be enough?

Just as some added context, the Alert Manager integration looks neat but as it currently stands it wouldn't be compatible with our Alert Manager implementation. We use the Alertmanager resource, but define our routes and receivers in a configuration secret not in the resource itself.

Yes. But we will deal with it separately.

Got it. Guess that will be handled separately when we get all the necessary information.

@alexandermarston
Copy link
Contributor Author

Thanks for the approval @OrNovo . I am still happy to add the additional check now, if you'd like?

I can see some tests are failing, but I don't believe they're related to my change.

@alexandermarston alexandermarston changed the title draft: support setting integration name for alert support setting integration name for alert Oct 11, 2024
@assafad1
Copy link
Contributor

@OrNovo regarding failing tests, I see on the e2e-test logs:

2024/10/13 15:21:42 Warning: teamLevelAPIKey was not provided. Some functionality will not be available.
2024/10/13 15:21:42 Warning: userLevelAPIKey was not provided. Some functionality will not be available.

I think there is no access to the repo secrets, because the tests run from @alexandermarston's fork. I think we can merge this PR.

@assafad1
Copy link
Contributor

@alexandermarston can you please sign your commit?

@alexandermarston alexandermarston force-pushed the support-prometheus-rule-integration-name branch from ed96c52 to 16e7352 Compare October 13, 2024 15:56
@alexandermarston alexandermarston force-pushed the support-prometheus-rule-integration-name branch from ae455fa to 04142f4 Compare October 14, 2024 14:38
@alexandermarston
Copy link
Contributor Author

@assafad1 is there any chance for a review?

@assafad1 assafad1 merged commit 6e4097a into coralogix:main Oct 22, 2024
3 checks passed
@assafad1
Copy link
Contributor

@alexandermarston thanks for your contribution!

@alexandermarston alexandermarston deleted the support-prometheus-rule-integration-name branch October 22, 2024 10:39
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.

4 participants