Merge pull request #4635 from dcantah/fixup-snapshotteropts

Filter snapshotter labels passed to wrapper of WithNewSnapshot
This commit is contained in:
Maksym Pavlenko 2020-10-15 12:09:34 -07:00 committed by GitHub
commit 88f0893540
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateConta
log.G(ctx).Debugf("Container %q spec: %#+v", id, spew.NewFormatter(spec)) log.G(ctx).Debugf("Container %q spec: %#+v", id, spew.NewFormatter(spec))
snapshotterOpt := snapshots.WithLabels(config.Annotations) snapshotterOpt := snapshots.WithLabels(snapshots.FilterInheritedLabels(config.Annotations))
// Set snapshotter before any other options. // Set snapshotter before any other options.
opts := []containerd.NewContainerOpts{ opts := []containerd.NewContainerOpts{
containerd.WithSnapshotter(c.config.ContainerdConfig.Snapshotter), containerd.WithSnapshotter(c.config.ContainerdConfig.Snapshotter),

View File

@ -192,7 +192,7 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox
return nil, errors.Wrap(err, "failed to generate runtime options") return nil, errors.Wrap(err, "failed to generate runtime options")
} }
snapshotterOpt := snapshots.WithLabels(config.Annotations) snapshotterOpt := snapshots.WithLabels(snapshots.FilterInheritedLabels(config.Annotations))
opts := []containerd.NewContainerOpts{ opts := []containerd.NewContainerOpts{
containerd.WithSnapshotter(c.config.ContainerdConfig.Snapshotter), containerd.WithSnapshotter(c.config.ContainerdConfig.Snapshotter),
customopts.WithNewSnapshot(id, containerdImage, snapshotterOpt), customopts.WithNewSnapshot(id, containerdImage, snapshotterOpt),