Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add annotation to delay TTL #96

Closed
hiddenmarten opened this issue Dec 5, 2024 · 2 comments
Closed

Add annotation to delay TTL #96

hiddenmarten opened this issue Dec 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@hiddenmarten
Copy link
Contributor

hiddenmarten commented Dec 5, 2024

Describe the feature request

I propose adding an additional annotation, such as k8s-ttl-controller.twin.sh/updateTimestamp. The purpose of this annotation is straightforward: it serves as an alternative to metadata.creationTimestamp for cases where a user wants to control the object's deletion timing based on a redeployment, rather than delaying deletion after the initial creation.

The logic is straightforward: if the annotation exists, it is used as the starting point. If not, metadata.creationTimestamp is used by default.

Why do you personally want this feature to be implemented?

This feature would be helpful for my project. I'm happy to contribute to its implementation. I think it would be nice to discuss the details of this functionality beforehand.

How long have you been using this project?

No response

Additional information

No response

@TwiN TwiN added the enhancement New feature or request label Dec 6, 2024
@TwiN
Copy link
Owner

TwiN commented Dec 6, 2024

Something like k8s-ttl-controller.twin.sh/refreshed-at would be a great idea, I agree, and your suggested implementation (check annotation first then fallback to metadata.creationTimestamp makes sense!

@TwiN
Copy link
Owner

TwiN commented Dec 8, 2024

Implemented by #97

@TwiN TwiN closed this as completed Dec 8, 2024
@TwiN TwiN changed the title Delete after update Add annotation to delay TTL Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants