hjacobs/kube-janitor

Support for delete notifications

asoni90 opened this issue · 4 comments

Kube-janitor is a very good tool to remove dangling resources. It would be good if it can integrate resource deletion notifications feature also. for ex. If kube-janitor deletes a namespace then user should get a notification for the same.
Start with notification channels like Email, Slack. Later more channels can be added.

I am also thinking the same ..it will be good if we have some notifications feature also

That would be helpful.
Looking at this flag --resource-context-hook it seems to run each cycle while some objects are annotated with a ttl.
Is it possible to know that now items have been deleted and something could be done with those items? then it'd be already possible to do a lot

I haven't tried it yet, but this seems like a feature that might already be in place (although I see no mention of it in the README...).

#24

I didn’t write back here but I use a hook in janitor to check the events, if entries with the delete notification have been created by janitor then some external APIs are called to cleanup non k8s resources which are related (in our case vault roles for a namespace)