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

optimization to determine whether the pod state is consistent logic #854

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

dafu-wu
Copy link
Contributor

@dafu-wu dafu-wu commented Dec 16, 2021

Ⅰ. Describe what this PR does

when we to determine whether the pod state is consistent logic and Is Image digest, call func IsPodContainerDigestEqual。
The pod container statuses may be evaluated multiple times by the func。

Ⅱ. Does this pull request fix one issue?

I'm trying to optimize it, maybe there's a better way to optimize it, maybe there's no need to optimize it.

@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2021

Codecov Report

Merging #854 (8bbd3ff) into master (3a6e489) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #854      +/-   ##
==========================================
- Coverage   48.36%   48.30%   -0.06%     
==========================================
  Files         118      118              
  Lines       11017    11023       +6     
==========================================
- Hits         5328     5325       -3     
- Misses       4878     4895      +17     
+ Partials      811      803       -8     
Flag Coverage Δ
unittests 48.30% <0.00%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
pkg/control/sidecarcontrol/sidecarset_control.go 36.63% <0.00%> (-1.52%) ⬇️
pkg/util/pods.go 20.19% <0.00%> (-0.40%) ⬇️
pkg/controller/daemonset/update.go 24.24% <0.00%> (-2.53%) ⬇️
pkg/controller/daemonset/daemonset_util.go 63.75% <0.00%> (-2.02%) ⬇️
pkg/controller/daemonset/daemonset_controller.go 37.25% <0.00%> (+0.87%) ⬆️
pkg/controller/cloneset/cloneset_controller.go 55.33% <0.00%> (+2.37%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a6e489...8bbd3ff. Read the comment docs.

pkg/util/pods.go Outdated Show resolved Hide resolved
@FillZpp
Copy link
Member

FillZpp commented Dec 17, 2021

/lgtm
PTAL @zmberg

Signed-off-by: dafu-wu <wuchengyi2006@163.com>
@FillZpp
Copy link
Member

FillZpp commented Dec 20, 2021

/approve

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FillZpp

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@zmberg
Copy link
Member

zmberg commented Dec 21, 2021

/lgtm

@kruise-bot kruise-bot merged commit 3ba6f4a into openkruise:master Dec 21, 2021
FillZpp pushed a commit that referenced this pull request Jan 21, 2022
…854)

Signed-off-by: dafu-wu <wuchengyi2006@163.com>

Co-authored-by: dafu-wu <wuchengyi2006@163.comL>
ppbits pushed a commit to ppbits/kruise that referenced this pull request Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants