Support "expires" time as annotation
hjacobs opened this issue ยท 6 comments
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:
- some stray resources are found in the test environment, nobody knows who owns/needs them --> send an email to the team asking about it and at the same time mark the resources as "delete in 4 days" (so the team has enough time to answer/fix and if no response --> delete)
- a project or hackathon has a fixed time frame (e.g. 1 week), i.e. the end date is known --> mark the used namespace as "delete at end of project date"
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.
I am interested, can I take this task?
@SongGithub yes, please give it a shot --- it should be straight forward.
hi guys, please have a look at PR #17 when you have time, let me know if there is any problems.
The PR #17 has been merged, so this issue can be closed.
I will cut a new release today and close the issue afterwards.