-
Notifications
You must be signed in to change notification settings - Fork 137
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
Events are cleaned up if the resource is deleted #407
Conversation
bf0333e
to
179a9f4
Compare
Codecov Report
@@ Coverage Diff @@
## master #407 +/- ##
==========================================
+ Coverage 21.38% 21.40% +0.02%
==========================================
Files 24 24
Lines 2170 2191 +21
==========================================
+ Hits 464 469 +5
- Misses 1664 1679 +15
- Partials 42 43 +1
Continue to review full report at Codecov.
|
81d76f7
to
32b8737
Compare
I am still not 100% sure that this is a valuable solution. Or the solution we want. And I want to ask @invidian to help me with this. @gauravgahlot this solution as it is today has at least 1 issue. it is deleting all the events for a particular resource when it gets deleted. It also deletes the event that notifies that a resource is deleted I presume, it means that users and applications that rely on events to synchronize an external system or to build automation will have a hard time dealing with a deletion. Excluding the event kind Scenario: A user wrote an "audit logger" that tracks all the actions made via Tinkerbell with the default TTL of 1h. The extension for some reason stays offline for 30 minutes and in that hour the hardware gets created, updated, and deleted it will be impossible to reconstruct that part of the history. IMPOSSIBLE because events are not stored anywhere anymore. I still think events should be immutable with the only exception of the garbage collector having the power of removing them. How Kubernetes handle this problem for example? Do we know? Thanks |
Signed-off-by: Gaurav Gahlot <gauravgahlot0107@gmail.com>
AFAIK, if we delete a resource in Kubernetes we can still get its events using I'm glad most of the work in the PR is around tests and not the fix itself. 😄 |
171a706
to
4d7b2b2
Compare
well done @gauravgahlot but now that you said how Kubernetes works I will take it as a confirmation that this is a feature we should not implement 👍 |
IMO Documenting the TTL for Tinkerbell events (whatever it is or whatever is planned) should be sufficient to resolve #396 👍 |
Great, I will close this for now, about doc, atm I don't know where to write about it! I have to figure it out |
Description
Going forward if a resource (template, hardware, workflow, ...) is deleted, all the events for that particular resource will also be cleaned up (irrespective of configured TTL).
Why is this needed
Fixes: #396
How Has This Been Tested?
Checklist:
I have: