feat: add gs-updating-containers annotation to track in-place update …#317
feat: add gs-updating-containers annotation to track in-place update …#317NickPak wants to merge 1 commit intoopenkruise:masterfrom
Conversation
…diff (openkruise#303) When a Pod enters the PreparingUpdate lifecycle state, automatically compute the container names whose images differ between the current Pod and the GameServerSet spec, and write them as a comma-separated list to the `game.kruise.io/gs-updating-containers` annotation on the Pod. During the Updating state the annotation is kept as-is so that hooks can consume it. Once the update completes (any other state), the annotation is removed via strategic-merge-patch with a null value. - Add GameServerUpdatingContainersKey constant - Extract GetDiffContainerNames utility from IsContainersPreInplaceUpdating - Pass GameServerSet into SyncGsToPod for image diff computation - Use map[string]interface{} for newAnnotations to support null (deletion) - Add unit tests for GetDiffContainerNames and the annotation lifecycle Signed-off-by: NickPak <bc92@foxmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
|
Welcome @NickPak! It looks like this is your first PR to openkruise/kruise-game 🎉 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #317 +/- ##
==========================================
+ Coverage 40.29% 40.46% +0.17%
==========================================
Files 112 112
Lines 12518 12532 +14
==========================================
+ Hits 5044 5071 +27
+ Misses 7067 7051 -16
- Partials 407 410 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…diff (#303)
When a Pod enters the PreparingUpdate lifecycle state, automatically compute the container names whose images differ between the current Pod and the GameServerSet spec, and write them as a comma-separated list to the
game.kruise.io/gs-updating-containersannotation on the Pod. During the Updating state the annotation is kept as-is so that hooks can consume it. Once the update completes (any other state), the annotation is removed via strategic-merge-patch with a null value.