-
Notifications
You must be signed in to change notification settings - Fork 778
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
Fix: ImagePullJob timeout setting is not effective when it is greater than 1800 #1874
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1874 +/- ##
==========================================
+ Coverage 47.91% 50.93% +3.01%
==========================================
Files 162 192 +30
Lines 23491 24953 +1462
==========================================
+ Hits 11256 12710 +1454
+ Misses 11014 10939 -75
- Partials 1221 1304 +83
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
89e42b9
to
2231201
Compare
pkg/webhook/imagepulljob/validating/imagepulljob_create_update_handler.go
Outdated
Show resolved
Hide resolved
2231201
to
2c621f3
Compare
if job.Spec.PullPolicy != nil && job.Spec.PullPolicy.TimeoutSeconds != nil && | ||
int64(*job.Spec.PullPolicy.TimeoutSeconds) > defaultActiveDeadlineSecondsForNever { | ||
|
||
var ret = int64(*job.Spec.PullPolicy.TimeoutSeconds) |
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.
why not use the package 'k8s.io/utils/pointer'
if job.Spec.PullPolicy != nil && job.Spec.PullPolicy.TimeoutSeconds != nil && | ||
int64(*job.Spec.PullPolicy.TimeoutSeconds) > defaultActiveDeadlineSecondsForNever { | ||
|
||
var ret = int64(*job.Spec.PullPolicy.TimeoutSeconds) |
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.
why int64, it seems that TimeoutSeconds is of *int32 type
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.
because activeDeadlineSeconds is *int64.
… than 1800 Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2c621f3
to
92c8627
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
/approve |
… than 1800
Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews