-
Notifications
You must be signed in to change notification settings - Fork 771
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
predownload image after some number updated pods ready #904
predownload image after some number updated pods ready #904
Conversation
307b86f
to
c8f0055
Compare
Codecov Report
@@ Coverage Diff @@
## master #904 +/- ##
==========================================
+ Coverage 49.24% 49.31% +0.06%
==========================================
Files 119 119
Lines 11082 11091 +9
==========================================
+ Hits 5457 5469 +12
+ Misses 4786 4783 -3
Partials 839 839
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
c8f0055
to
2292914
Compare
de918dc
to
9d4e750
Compare
apis/apps/pub/image_predownload.go
Outdated
package pub | ||
|
||
const ( | ||
ImagePreDownloadMinUpdatedReadyPods = "apps.kruise.io/image-predownload-min-updated-ready-pods" |
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.
How about define it in apis/apps/v1alpha1/imagepulljob_types.go
with some other existing keys?
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.
done
minUpdatedReadyPodsCount := 0 | ||
minUpdatedReadyPods, ok := instance.Annotations[appspub.ImagePreDownloadMinUpdatedReadyPods] | ||
if ok { | ||
if minUpdatedReadyPodsCount, err = strconv.Atoi(minUpdatedReadyPods); err != 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.
Should we use intOrString to support percentage or just integer?
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.
done
Signed-off-by: shiyan2016 <shiyan20160606@gmail.com>
9d4e750
to
f978173
Compare
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.
/lgtm
[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 |
Ⅰ. Describe what this PR does
predownload image after some number updated pods ready
Ⅱ. Does this pull request fix one issue?
fixes #876
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews