pyrra icon indicating copy to clipboard operation
pyrra copied to clipboard

Delete generated PrometheusRule and rule files

Open metalmatze opened this issue 4 years ago • 2 comments

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.

metalmatze avatar Oct 22 '21 10:10 metalmatze

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?)

rlex avatar Oct 31 '21 00:10 rlex