coralogix / coralogix-operator

Coralogix Operator for integration with Kubernetes clusters.
https://coralogix.com
Apache License 2.0
0 stars 7 forks source link

Alerts, RecordingRuleGroupSet and OutboundWebhook that are owned should be reconciled #176

Open assafad1 opened 2 hours ago

assafad1 commented 2 hours ago

Currently, when deleting or updating Alert/RecordingRuleGroupSet that were created from a PrometheusRule, the operator does nothing, and there is misalignment between the existing PrometheusRule and the cluster actual state. If Alerts and RecordingRuleGroupSet (which are owned by a PrometheusRule) gets deleted/updated, the operator should reconcile them and restore the resources as they are defined in the PrometheusRule. PrometheusRule should be the single source of truth for its underlying resources, same as other object owners in k8s.

Note: This is relevant for AlertmanagerConfig and OutboundWebhook as well.

Steps to reproduce:

  1. Apply PrometheusRule with alert
  2. Delete alert
  3. Notice Alert wasn't recreated

Expected Behaviour: Alert to be recreated according to the PrometheusRule.

assafad1 commented 2 hours ago

@OrNovo WDYT? does it make sense to fix?