Skip to content

Commit

Permalink
Merge pull request kubernetes#117276 from pacoxu/image-pull-event
Browse files Browse the repository at this point in the history
kubelet: truncate the precision at a millisecond for image pull event message
  • Loading branch information
k8s-ci-robot authored Apr 21, 2023
2 parents 0251dde + c042837 commit 9d34ca5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/kubelet/images/image_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ func (m *imageManager) EnsureImageExists(ctx context.Context, pod *v1.Pod, conta
return "", imagePullResult.err.Error(), ErrImagePull
}
m.podPullingTimeRecorder.RecordImageFinishedPulling(pod.UID)
m.logIt(ref, v1.EventTypeNormal, events.PulledImage, logPrefix, fmt.Sprintf("Successfully pulled image %q in %v (%v including waiting)", container.Image, imagePullResult.pullDuration, time.Since(startTime)), klog.Info)
m.logIt(ref, v1.EventTypeNormal, events.PulledImage, logPrefix, fmt.Sprintf("Successfully pulled image %q in %v (%v including waiting)",
container.Image, imagePullResult.pullDuration.Truncate(time.Millisecond), time.Since(startTime).Truncate(time.Millisecond)), klog.Info)
m.backOff.GC()
return imagePullResult.imageRef, "", nil
}
Expand Down

0 comments on commit 9d34ca5

Please sign in to comment.