-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update vs/vsr status when IC becomes the leader #996
Conversation
I've implemented your suggestions @pleshakov @LorcanMcVeigh let me know your thoughts, thanks |
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.
@Rulox thanks for the updates.
The new code doesn't compile ;) Could you fix that?
There is another bug. Unfortunately, I didn't see it during the first review :(
In OnStartedLeading
handler before you call updateVirtualServersStatusFromEvents
or updateVirtualServerRoutessStatusFromEvents
, you need to check if lbc.areCustomResourcesEnabled
is set. Otherwise, the code like this lbc.virtualServerRouteLister.List()
will result into panic: runtime error: invalid memory address or nil pointer dereference
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.
🚀
Proposed changes
When updating VS and VSR statuses of created resources during a leading election process, those resources won't have their status updated until they're synced again and the KIC instance has become the leader.
With this change, KIC will trigger an update of all VS/VSR statuses based on their last event when the KIC becomes the leader.