Skip to content

Commit 88f0893

Browse files
authored
Merge pull request #4635 from dcantah/fixup-snapshotteropts
Filter snapshotter labels passed to wrapper of WithNewSnapshot
2 parents febf14d + cdb2f9c commit 88f0893

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/cri/server/container_create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateConta
181181

182182
log.G(ctx).Debugf("Container %q spec: %#+v", id, spew.NewFormatter(spec))
183183

184-
snapshotterOpt := snapshots.WithLabels(config.Annotations)
184+
snapshotterOpt := snapshots.WithLabels(snapshots.FilterInheritedLabels(config.Annotations))
185185
// Set snapshotter before any other options.
186186
opts := []containerd.NewContainerOpts{
187187
containerd.WithSnapshotter(c.config.ContainerdConfig.Snapshotter),

pkg/cri/server/sandbox_run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox
192192
return nil, errors.Wrap(err, "failed to generate runtime options")
193193
}
194194

195-
snapshotterOpt := snapshots.WithLabels(config.Annotations)
195+
snapshotterOpt := snapshots.WithLabels(snapshots.FilterInheritedLabels(config.Annotations))
196196
opts := []containerd.NewContainerOpts{
197197
containerd.WithSnapshotter(c.config.ContainerdConfig.Snapshotter),
198198
customopts.WithNewSnapshot(id, containerdImage, snapshotterOpt),

0 commit comments

Comments
 (0)