Add max concurrent downloads support.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2019-07-26 18:11:28 -07:00
parent 994cea830b
commit c78caf902d
3 changed files with 7 additions and 0 deletions

View File

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