feat: add pod config drift detection - #488
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: nwnt The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
76e404c to
c596cca
Compare
|
@nwnt please resolve the review comments when you get free cycle, thx |
Or I can just modify this PR directly, just let me know |
|
|
||
| // findConfigDriftingPod finds the pod with the highest ordinal that has its config hash | ||
| // not matched with the expected hash. It returns nil when all pods match the hash. | ||
| func findConfigDriftingPod(pods []*corev1.Pod, expectedHash string) *corev1.Pod { |
There was a problem hiding this comment.
We should update config for the leader last to avoid moving leader multiple times.
There was a problem hiding this comment.
I have added the logic in updateConfig to detect and run this function again in case the first found drifting pod is the leader.
c596cca to
4e97369
Compare
|
please rebase this PR |
2b19e20 to
ae43756
Compare
|
Done @ahrtr |
ae43756 to
9696d94
Compare
9696d94 to
76ec509
Compare
Signed-off-by: Nont <9658731+nwnt@users.noreply.github.com>
76ec509 to
c37d0ac
Compare
Fix #411. Implement
updateConfigconfig drift detection part. After detected, the controller updates the correspondingEtcdMember's phase to Recreating. The reconciliation of Recreating logic will be implemented in phase 3.cc @ahrtr @silentred