Merge pull request #4635 from dcantah/fixup-snapshotteropts
Filter snapshotter labels passed to wrapper of WithNewSnapshot
This commit is contained in:
commit
88f0893540
@ -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),
|
||||||
|
@ -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),
|
||||||
|
Loading…
Reference in New Issue
Block a user