Repository navigation
Conversation
Tamas-Biro1
left a comment
There was a problem hiding this comment.
Thanks for the contribution for Static Route operator!
I added some comments and suggestions, also i'm open for further discussion on this issue. Thanks!
97ac59f to
c6aad97
Compare
Hi, @Tamas-Biro1. Could you review the last iteration? My point is that node-controller can miss graceful node shutdown in this case all but one node's status can be deleted later because only staticroute-operator from current node can remove node status from list. I agreed that we shouldn't reconcile by period, but we should double-check status for node statuses from absent nodes. Also it's nice to distinguish 2 cases: we have already deleted status from our node, but other statuses exist -> "AlreadyDeleted" and case when controller tries to delete node status and there are no statuses at all, so we should allow to proceed deletion. Could You re-check and inform if there are still some doubts? From my point of view - there are outdated StaticRoute CR-s which are left after previous operations and now have deletionTimestamp with statues from node which are no longer exist. Maybe it's some non-graceful flow of node-management, but we face side-effects of it. So probably it wouldn't be expensive to double-check status on delete event. |
Tamas-Biro1
left a comment
There was a problem hiding this comment.
Thanks for the update @FilatovM ! I added one major and few smaller (easy-fix) comments, otherwise your changes looks good. I do not see other concerns with your changes, so once you address these i'll approve. Thanks again for you contribution.
3dc25bf to
b1bd7f1
Compare
|
Thanks for comments @Tamas-Biro1! I agree with all provided suggestions, already closed these conversations but if I missed something or misinterpreted something, let me know. I've checked my problematic case again, still seems good. |
|
@Tamas-Biro1 , kindly asking to double-check PR after applied changes when you have an opportunity. Thanks in advance! |
Thanks @FilatovM, as i see suggestions are addressed and the PR looks good to me. I'll approve, but one small thing: could you update the PR description? It still mentions the periodic reconcile that you've already removed. |
Tamas-Biro1
left a comment
There was a problem hiding this comment.
Please update the PR description, otherwise it looks good to me. Thanks!
I merged a PR to update Gosec version, please rebase this branch on master and the PR tests here will succeed. |
Signed-off-by: Mikhail Filatov <misha.filat@gmail.com>
b1bd7f1 to
256f079
Compare
@Tamas-Biro1 - Done. Thanks! |
|
Hi, @Tamas-Biro1, looks we are ready to go. If you can approve workflow, let's check this out. Thanks! |
Fix for raised issue - #129
When a Kubernetes node disappears unexpectedly, its corresponding entry can remain in StaticRoute.Status.NodeStatus indefinitely. This can leave outdated status information and interfere with the cleanup of StaticRoute resources.
Changes:
Remove stale node statuses: On delete event compare StaticRoute.Status.NodeStatus entries with existing Kubernetes nodes and remove entries for nodes that no longer exist.
Support hostname matching: Match node statuses against both Kubernetes node names and the kubernetes.io/hostname label.
Improve deletion handling: Allow finalizer cleanup to proceed when a deleting StaticRoute has no remaining node statuses.
Handle errors: Propagate failures when listing Kubernetes nodes or updating the StaticRoute status.
Add test coverage: Update controller mocks and tests to cover stale status cleanup and the associated reconciliation behavior.