Skip to content
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

Inplace update restart count #941

Closed

Conversation

diannaowa
Copy link
Contributor

Ⅰ. Describe what this PR does

Add inPlaceUpdate restart count to annotation.
the result is shown below:
Annotations:

apps.kruise.io/inplace-update-containers-restart-count: '{"nginx":{"revision":"sample-d97f89dcf","restartCount":1,"timestamp":"2022-03-24T08:03:23Z"},"sidecar":{"revision":"sample-d97f89dcf","restartCount":1,"timestamp":"2022-03-24T08:03:23Z"}}'
apps.kruise.io/inplace-update-pod-restart-count: "2"

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

@diannaowa diannaowa closed this Mar 25, 2022
@diannaowa diannaowa reopened this Mar 25, 2022
@kruise-bot kruise-bot added the size/L size/L: 100-499 label Mar 25, 2022
@diannaowa
Copy link
Contributor Author

/assign @Fei-Guo

pkg/util/inplaceupdate/inplace_update.go Outdated Show resolved Hide resolved
pkg/util/inplaceupdate/inplace_update.go Outdated Show resolved Hide resolved
@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from fei-guo after the PR has been reviewed.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2022

Codecov Report

Merging #941 (9259a2a) into master (16277db) will decrease coverage by 0.03%.
The diff coverage is 53.19%.

@@            Coverage Diff             @@
##           master     #941      +/-   ##
==========================================
- Coverage   50.29%   50.25%   -0.04%     
==========================================
  Files         126      126              
  Lines       17855    17900      +45     
==========================================
+ Hits         8980     8996      +16     
- Misses       7886     7908      +22     
- Partials      989      996       +7     
Flag Coverage Δ
unittests 50.25% <53.19%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/controller/cloneset/sync/cloneset_update.go 50.98% <ø> (-0.20%) ⬇️
pkg/util/inplaceupdate/inplace_update.go 41.43% <53.19%> (+2.41%) ⬆️
pkg/controller/cloneset/cloneset_controller.go 52.94% <0.00%> (-2.25%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@diannaowa diannaowa force-pushed the inplace-update-restart-count branch 4 times, most recently from f2654b7 to 34044e7 Compare March 25, 2022 15:55
@stale
Copy link

stale bot commented Jun 25, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jun 25, 2022
@FillZpp FillZpp removed the wontfix This will not be worked on label Jun 26, 2022
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
diannaowa and others added 7 commits September 14, 2022 18:48
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: JunjunLi <junjunli666@gmail.com>

upgrade golint v3

Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
…penkruise#954)

Signed-off-by: veophi <vec.g.sun@gmail.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
veophi and others added 20 commits September 14, 2022 18:52
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: astraw99 <wangchengiscool@gmail.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: astraw99 <wangchengiscool@gmail.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
…nkruise#1043)

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: Siyu Wang <FillZpp.pub@gmail.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
…nkruise#1047)

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
…nkruise#1066)

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>

Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>

Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
* pod probe marker apis

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

* fix statefulset truncateHistory panic

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
…ruise into inplace-update-restart-count

Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
…ruise into inplace-update-restart-count

Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
…ruise into inplace-update-restart-count

Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
…ruise into inplace-update-restart-count

Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
@diannaowa diannaowa closed this Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L size/L: 100-499
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] add inPlaceUpdate restart count to annotation