-
Notifications
You must be signed in to change notification settings - Fork 161
Open
Description
问题背景:
目前在 Kruise InPlace Update 的 PreparingUpdate Hook 中,如果想知道本次更新会改哪些 containers,需要在 Hook 里自行对比 Pod 当前 containerStatuses 和 GameServerSet 模板中的 containers,重复实现 diff 逻辑。
现状:
项目中已有:
- util.IsContainersPreInplaceUpdating(pod, gss, containerNames),内部已经计算出 diff 容器名;
- GameServer 控制器在 SyncPodToGs 中同步 GameServer.Status,掌握 pod + gss;
建议:
- 在 GameServerStatus 中增加 nextUpdateContainers []string 字段,或
- 在 Pod / GameServer 上增加 game.kruise.io/next-update-containers annotation;
- 并在 GameServerManager.SyncPodToGs 或 GameServerReconciler.Reconcile 中,当 Pod 处于 LifecycleStatePreparingUpdate 时,将 diff 容器名写入该字段/annotation,避免每个 Hook 自己做 diff。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels