Delete notification
angelbarrera92 opened this issue · 7 comments
Hi thanks for this awesome project.
I am thinking in some notification mechanism when a resource is going to be deleted soon.
Is this possible? Something like a webhooks or callbacks to an specific endpoint. Make sense for you?
This could make sense, easiest would be to emit a Kubernetes event and use some other mechanism to notify on Kubernetes events.
Sounds good if a custom event could be sent from this project. Then, other components would be able to make some actions. Maybe notify via email, twitter, telegram...
The event could be parametrized with the amount of time before expire an object will expire.
So, if you configure a expiration time in a namespace to be deleted at 08:00, and the event is configured to notify 1h before, the event must be sent at 07:00 :)
It could be interesting!
I think i can implement it. Are you (@hjacobs) open to integrate this feature?
@angelbarrera92 yes, but it should be optional (opt-in)
Hi, thanks for merge the pull request. Are you thinking in publishing a new release whit this feature?
Thanks!
Example events:
2m32s Normal DeleteNotification ReplicaSet ReplicaSet nginx-dbddb74b8 will be deleted at 2019-03-23T22:24:30Z (annotation janitor/ttl is set)
2m32s Normal DeleteNotification Deployment Deployment nginx will be deleted at 2019-03-23T22:24:30Z (annotation janitor/ttl is set)