-
Notifications
You must be signed in to change notification settings - Fork 772
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
Support inplace-update restart count #1097
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1097 +/- ##
==========================================
+ Coverage 47.82% 49.31% +1.49%
==========================================
Files 161 137 -24
Lines 23395 19334 -4061
==========================================
- Hits 11188 9535 -1653
+ Misses 10993 8743 -2250
+ Partials 1214 1056 -158
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@diannaowa How about a discussion on the community meeting this Thursday? You can add this topic into the agenda https://shimo.im/docs/gXqmeQOYBehZ4vqo |
67b3c7c
to
2283fc1
Compare
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com> Signed-off-by: liuzhenwei <dui_zhang@163.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com> Signed-off-by: liuzhenwei <dui_zhang@163.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com> Signed-off-by: liuzhenwei <dui_zhang@163.com>
Signed-off-by: liuzhenwei <dui_zhang@163.com>
2283fc1
to
bc70823
Compare
} | ||
|
||
containers := make(map[string]bool) | ||
if spec.ContainerImages != nil { |
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.
This if judgment can be removed, just keep the for statement below
} | ||
} | ||
|
||
if spec.UpdateEnvFromMetadata { |
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.
as above
if clone, err = opts.PatchSpecToPod(clone, &spec, &updateState); err != nil { | ||
return err | ||
} | ||
// record restart count of the pod(containers) | ||
recordPodAndContainersRestartCount(clone, &spec, updateState.Revision) |
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.
It's not an in-place upgrade here, and it doesn't feel like it should be judged
Hi @diannaowa The modifications seem to target the
Specifically, the action taken is to increase the restart count for containers which will in-place upgrade (the revision does not match the updated revision). Is it correct to interpret that these annotations are intended to log the restart counts of containers specifically due to in-place upgrades? I feel that tracking the restart count prior to each in-place upgrade does not provide meaningful data for the current version. My expectation was that the restart counts for each container would be logged post-completion of an in-place upgrade, effectively resetting the count to zero. Then |
@diannaowa: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Ⅰ. Describe what this PR does
Add inPlaceUpdate restart count to annotation.
the result is shown below:
Annotations:
apps.kruise.io/inplace-update-pod-restart-count: The Pod restart count.
apps.kruise.io/inplace-update-containers-restart-count: Every container restart count of the pod.
(revision: the revision of the container updated.)
The revision and timestamp maybe is different between the containers when we just update one(or a part of containers in the pod) container of the pod.Because we just update the restart count of the container when it will be updated(inplace-update).
Ⅱ. Does this pull request fix one issue?
fixes #910
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews