PrometheusRule deletion doesn't cause VMRule deletion
I'm using PrometheusRule CRs to describe alerts, and victoria-metrics-operator created shadow-VMRule CRs before configuring a vmalert pod with it.
While this seems to mostly work, it seems the operator doesn't delete the VMRule CR if the PrometheusRule gets deleted.
So if someone uses PrometheusRules exclusively, delete alerts stay persisted in the vmalert config, until someone manually removes the VMRule CRs.
Can victoria-metrics-operator also delete VMRule CRs if the PrometheusRule CRs get deleted?
It should be possible with env variable for operator:
VM_ENABLEDPROMETHEUSCONVERTEROWNERREFERENCES=true
In this case, operator creates ownerReference for each converted object and it will be removed with original CR.
Indeed! This is acessible by setting operator.enable_converter_ownership to true in the helm chart. I wonder why it's not the default though? :thinking: