GitAuto: [网络]SpiderPool当子网不对等,创建应用时,需要给workload手动添加节点亲和性,并且匹配子网的节点亲和的信息 #5948
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.
Resolves #3220
为什么会出现这个bug
当子网配置不匹配时,SpiderPool在创建应用程序时未能自动为workload添加节点亲和性。这导致新创建的应用无法正确调度到与子网对应的节点上,影响应用的正常运行和资源分配。
如何复现
如何修复
在SpiderPool的应用创建流程中,添加逻辑以自动检测子网配置的匹配情况。当发现子网不对应时,自动为workload附加相应的节点亲和性规则。这包括:
通过以上修改,SpiderPool将在创建应用时自动处理节点亲和性,避免手动添加,提升用户体验并确保应用的正常调度。
Test these changes locally