-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 restore finalizer to clean up external resources #6479
Conversation
31ee73b
to
8ff4b21
Compare
Codecov Report
@@ Coverage Diff @@
## main #6479 +/- ##
==========================================
- Coverage 60.31% 60.04% -0.27%
==========================================
Files 229 229
Lines 24319 24552 +233
==========================================
+ Hits 14667 14742 +75
- Misses 8647 8791 +144
- Partials 1005 1019 +14
|
@allenxu404 Does this PR cover the upgrade case? What will happen to the existing |
@ywk253100 "The existing restores will not have a finalizer added and they will be deleted directly the way it was. |
@allenxu404 Current changes that filter based on different events are complicated, how about that we handle the restore directly without considering the event type as follows:
An example is https://github.com/kubernetes-sigs/cluster-api/blob/main/internal/controllers/machine/machine_controller.go |
And please also the new code is covered by the unit test |
8e49629
to
3b0db77
Compare
@ywk253100 Yeah, make sense. I made an enhancement to the code and it functions following the procedures outlined aboved. |
} | ||
} | ||
|
||
fmt.Println("Waiting for resource with finalizer attached to be deleted") |
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.
Let's replace resource with finalizer attached
with restores
as the finalizer is the internal mechanism
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.
if we output "Waiting for restore to be deleted" to the users, users might be confused about the need for an additional operation to delete the restores. What's your thought?
83a6895
to
b034880
Compare
Signed-off-by: allenxu404 <[email protected]>
Thank you for contributing to Velero!
Please add a summary of your change
Does your change fix a particular issue?
Fixes #2697
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.