hjacobs / kube-janitor

Clean up (delete) Kubernetes resources after a configured TTL (time to live)
GNU General Public License v3.0
472 stars 40 forks source link

Support "expires" time as annotation #6

Closed hjacobs closed 5 years ago

hjacobs commented 5 years ago

The current TTL annotation (janitor/ttl) always denotes a maximum time to live counted from the time of creation of the resource. Sometimes it's desired to mark resources for deletion at arbitrary times in the future. Use case example:

Proposal: support a new annotation janitor/expires which accepts an absolute timestamp in the format YYYY-MM-DDTHH:MM:SSZ (same format as Kubernetes creationTimestamp). Resources should be deleted if their janitor/expires timestamp lies in the past.

SongGithub commented 5 years ago

I am interested, can I take this task?

hjacobs commented 5 years ago

@SongGithub yes, please give it a shot --- it should be straight forward.

SongGithub commented 5 years ago

hi guys, please have a look at PR #17 when you have time, let me know if there is any problems.

SongGithub commented 5 years ago

The PR #17 has been merged, so this issue can be closed.

hjacobs commented 5 years ago

I will cut a new release today and close the issue afterwards.

hjacobs commented 5 years ago

Released in v0.4 :tada: .