Skip to content

Add support for DynamoDB TimeToLive #911

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

Closed
rbranche opened this issue Aug 20, 2021 · 10 comments · Fixed by aws-controllers-k8s/dynamodb-controller#45
Closed

Add support for DynamoDB TimeToLive #911

rbranche opened this issue Aug 20, 2021 · 10 comments · Fixed by aws-controllers-k8s/dynamodb-controller#45
Assignees
Labels
kind/enhancement Categorizes issue or PR as related to existing feature enhancements. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@rbranche
Copy link

rbranche commented Aug 20, 2021

Is your feature request related to a problem?
There doesn't seem to be a way through ACK to create a TimeToLiveSpecification on a DynamoDB table.

Describe the solution you'd like
Add a new CRD to update TimeToLiveSpecifications

https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTimeToLive.html

apiVersion: dynamodb.services.k8s.aws/v1alpha1
kind: TableTimeToLive
metadata:
  name: service-timetolive
spec:
    tableName: "service_table_name"
    timeToLiveSpecification:
        attributeName: "TTL"
        enabled: true

Note: the dynamodb-controller types.go already includes the TimeToLiveSpecification, but it needs to be updated to include the "Enabled" key.

https://github.com/aws-controllers-k8s/dynamodb-controller/blob/d25c74aadb1fde6b17f93c7121230f0550cd19aa/apis/v1alpha1/types.go#L652

Describe alternatives you've considered
This specification could also be in Table itself as TimeToLiveSpecification.

@rbranche rbranche added the kind/enhancement Categorizes issue or PR as related to existing feature enhancements. label Aug 20, 2021
@RedbackThomson
Copy link
Contributor

The TimeToLiveSpecification was not included as part of the Spec, by default, because it is not included as a parameter in the CreateTable method. I see that there are two methods for setting and describing this value, on tables:

This will need to be supported through custom hooks, probably in the same way S3 supports the additional Put* fields. That is, after describing a Table, a custom hook for describing the TTL and putting it into the Spec. Also, when updating a Table, checking the diff for TTL and calling the Update SDK.

@RedbackThomson
Copy link
Contributor

@a-hilaly Have any updates on this?

@a-hilaly
Copy link
Member

a-hilaly commented Sep 9, 2021

I will have to support update operations before adding this one - also some changes in the e2e tests.

@ack-bot
Copy link
Collaborator

ack-bot commented Apr 28, 2022

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-bot ack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 28, 2022
@a-hilaly
Copy link
Member

/lifecycle frozen

@ack-bot ack-bot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 28, 2022
@fbozic
Copy link

fbozic commented Jun 29, 2022

Hi team,

Do you maybe have any info when this is going to be released? This is the last feature we are missing before we can start using ACK in production.

Also I would be happy to help by contributing if that is okay.

@trajakovic
Copy link

Well, TTL is show stopper for us as well, so wondering if it possible to add this

@RedbackThomson RedbackThomson moved this to In Progress in ACK Core Team Jul 8, 2022
@RedbackThomson RedbackThomson added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Jul 8, 2022
@RedbackThomson
Copy link
Contributor

@fbozic Looking into it in this sprint. If it is straightforward I should have something out soon

ack-bot pushed a commit to aws-controllers-k8s/dynamodb-controller that referenced this issue Jul 12, 2022
Closes aws-controllers-k8s/community#911

Description of changes:
Adds custom code to support the `TimeToLive` specification for the `Table` custom resource

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Repository owner moved this from In Progress to Done in ACK Core Team Jul 12, 2022
@RedbackThomson
Copy link
Contributor

@fbozic @trajakovic Added support in v0.1.3

@fbozic
Copy link

fbozic commented Jul 13, 2022

@RedbackThomson thank you very much, this was fast 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Categorizes issue or PR as related to existing feature enhancements. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

8 participants