-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix: pod not-ready causes webhook call failure #4280
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4280 +/- ##
==========================================
+ Coverage 79.55% 79.60% +0.04%
==========================================
Files 53 53
Lines 6252 6252
==========================================
+ Hits 4974 4977 +3
+ Misses 1085 1083 -2
+ Partials 193 192 -1
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: tao.yang <[email protected]>
fix: pod not-ready causes webhook call failure Signed-off-by: robot <[email protected]>
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.
PR 标题说明是 e2e 的 修复,否则会认为是业务代码修复
if err != nil { | ||
return err | ||
} | ||
} else if !podutils.IsPodReady(&newPod) { |
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.
不需要额外的 else , 直接都 return了
Thanks for contributing!
Notice:
"release/none"
"release/bug"
"release/feature"
What issue(s) does this PR fix:
Fixes #4277
Special notes for your reviewer:
在重启工作节点后,新的 Pod 必须先运行,才会终结旧的 spiderpool-controller Pod,而由于端口占用的问题,新的 spiderpool-controller pod 永远不会 running,一直都是 Pending 的。故将 spiderpool-controller deploy 的 maxSurge 设置为 0 后,让 Pod 先终结在运行新的 spiderpool-controller Pod 。但是它会依次重启每一个副本 Pod,在用例原本逻辑中,只检查了 worker 节点上的 Pod webhook 。导致有概率出现 control-plane 上的 Pod 还没有 1/1,而是 0/1。影响其他 case 创建 Pod。
优化 deferCleanup 和 BeforeEach,将一些代码顺序变更。