Skip to content

Commit ead8d31

Browse files
authored
Merge pull request #541 from kevpar/image-pod-config
Pass pod config when pulling image during create
2 parents 6ba3510 + c968c63 commit ead8d31

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

cmd/crictl/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ func CreateContainer(
574574

575575
// Try to pull the image before container creation
576576
image := config.GetImage().GetImage()
577-
if _, err := PullImage(iClient, image, auth); err != nil {
577+
if _, err := PullImageWithSandbox(iClient, image, auth, podConfig); err != nil {
578578
return "", err
579579
}
580580
}

cmd/crictl/image.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -478,12 +478,6 @@ func normalizeRepoDigest(repoDigests []string) (string, string) {
478478
return repoDigestPair[0], repoDigestPair[1]
479479
}
480480

481-
// PullImage sends a PullImageRequest to the server, and parses
482-
// the returned PullImageResponse.
483-
func PullImage(client pb.ImageServiceClient, image string, auth *pb.AuthConfig) (resp *pb.PullImageResponse, err error) {
484-
return PullImageWithSandbox(client, image, auth, nil)
485-
}
486-
487481
// PullImageWithSandbox sends a PullImageRequest to the server, and parses
488482
// the returned PullImageResponse.
489483
func PullImageWithSandbox(client pb.ImageServiceClient, image string, auth *pb.AuthConfig, sandbox *pb.PodSandboxConfig) (resp *pb.PullImageResponse, err error) {

0 commit comments

Comments
 (0)