mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Merge pull request #53051 from tanshanshan/test925
Automatic merge from submit-queue (batch tested with PRs 53051, 52489, 53920). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix todo **What this PR does / why we need it**: fix todo thanks **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
This commit is contained in:
@@ -93,8 +93,11 @@ func (rp *remotePuller) Name() string {
|
||||
}
|
||||
|
||||
func (rp *remotePuller) Pull(image string) ([]byte, error) {
|
||||
// TODO(runcom): should we check if the image is already pulled with ImageStatus?
|
||||
_, err := rp.imageService.PullImage(&runtimeapi.ImageSpec{Image: image}, nil)
|
||||
imageStatus, err := rp.imageService.ImageStatus(&runtimeapi.ImageSpec{Image: image})
|
||||
if err == nil && imageStatus != nil {
|
||||
return nil, nil
|
||||
}
|
||||
_, err = rp.imageService.PullImage(&runtimeapi.ImageSpec{Image: image}, nil)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user