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:
Apply PrometheusRule with alert
Delete alert
Notice Alert wasn't recreated
Expected Behaviour:
Alert to be recreated according to the PrometheusRule.
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:
Expected Behaviour: Alert to be recreated according to the PrometheusRule.