pyrra
pyrra copied to clipboard
Delete generated PrometheusRule and rule files
Both for filesystem and Kubernetes we need to reconcile the generated files so that not only new ones are created or existing ones are updated, but no longer existing ones are deleted.
The tricky part is figuring out the difference of what's gone, but it should be doable nonetheless.
It seems there is semi-standard label
app.kubernetes.io/managed-by=
Something like
app.kubernetes.io/managed-by=pyrra
pyrra.dev/rule=nginx-api-errors
should work for managing k8s objects? This, however, doesn't cover case when pyrra is deployed multiple times into different namespaces (is that even supported?)