-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Attach a label to servers with their desired deletion date #29
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #29 +/- ##
==========================================
+ Coverage 92.30% 93.10% +0.79%
==========================================
Files 3 3
Lines 78 87 +9
==========================================
+ Hits 72 81 +9
Misses 6 6
☔ View full report in Codecov by Sentry. |
README.md
Outdated
It's up to the user to scan for VMs where the `delete_vm_after` points to a | ||
past timestamp and delete them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a normal workflow VMs are deleted right? Only where the was some timeout are they not deleted? It's mentioned in the first sentence, but perhaps worth to make it explicit here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. I rephrased it so it's hopefully more clear.
README.md
Outdated
You can modify the default of an hour by setting the `BEAKER_HCLOUD_DELETE_VM_AFTER` | ||
environment variable to any positive integer. It will be interpreted as hours. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd consider making it seconds, so there is a bit more fine grained control. The delete_vm_after
is also in seconds (since it's a UNIX timestamp), so it'd be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switched to seconds.
2b7d477
to
5afc510
Compare
cfcde91
to
a3416b1
Compare
This requires tonobo/hcloud-ruby#84 |
I do see failing tests. Perhaps split up the PR? |
This then enables us to periodically scan for images with a unix timestamp in the label that's smaller than now() and delete them. Co-authored-by: Ewoud Kohl van Wijngaarden <[email protected]>
This then enables us to periodically scan for images with a unix timestamp in the label that's smaller than now() and delete them.