Filter snapshotter labels passed to WithNewSnapshot
Made a change yesterday that passed through snapshotter labels into the wrapper of WithNewSnapshot, but it passed the entirety of the annotations into the snapshotter. This change just filters the set that we care about down to snapshotter specific labels. Will probably be future changes to add some more labels for LCOW/WCOW and the corresponding behavior for these new labels. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
This commit is contained in:
parent
22aea1e9a7
commit
cdb2f9c66f
@ -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))
|
||||
|
||||
snapshotterOpt := snapshots.WithLabels(config.Annotations)
|
||||
snapshotterOpt := snapshots.WithLabels(snapshots.FilterInheritedLabels(config.Annotations))
|
||||
// Set snapshotter before any other options.
|
||||
opts := []containerd.NewContainerOpts{
|
||||
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")
|
||||
}
|
||||
|
||||
snapshotterOpt := snapshots.WithLabels(config.Annotations)
|
||||
snapshotterOpt := snapshots.WithLabels(snapshots.FilterInheritedLabels(config.Annotations))
|
||||
opts := []containerd.NewContainerOpts{
|
||||
containerd.WithSnapshotter(c.config.ContainerdConfig.Snapshotter),
|
||||
customopts.WithNewSnapshot(id, containerdImage, snapshotterOpt),
|
||||
|
Loading…
Reference in New Issue
Block a user