fix: pod not-ready causes webhook call failure #4280
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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,将一些代码顺序变更。