Merge pull request #1162 from Random-Liu/fix-image-pull

Add cri managed image label when pulling the image.
This commit is contained in:
Lantao Liu 2019-06-11 10:51:34 -07:00 committed by GitHub
commit 1275d6ded3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,6 +105,7 @@ func (c *criService) PullImage(ctx context.Context, r *runtime.PullImageRequest)
containerd.WithResolver(resolver), containerd.WithResolver(resolver),
containerd.WithPullSnapshotter(c.config.ContainerdConfig.Snapshotter), containerd.WithPullSnapshotter(c.config.ContainerdConfig.Snapshotter),
containerd.WithPullUnpack, containerd.WithPullUnpack,
containerd.WithPullLabel(imageLabelKey, imageLabelValue),
) )
if err != nil { if err != nil {
return nil, errors.Wrapf(err, "failed to pull and unpack image %q", ref) return nil, errors.Wrapf(err, "failed to pull and unpack image %q", ref)