move CDI calls to the linux-only code

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
This commit is contained in:
Ed Bartosh
2022-03-14 18:27:17 +02:00
parent c9b4ccf83e
commit ff5c55847a
5 changed files with 42 additions and 43 deletions

View File

@@ -239,10 +239,6 @@ func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateConta
return nil, fmt.Errorf("failed to get runtime options: %w", err)
}
if c.config.EnableCDI {
opts = append(opts, containerd.WithCDI(spec, config.Annotations, c.config.CDISpecDirs))
}
opts = append(opts,
containerd.WithSpec(spec, specOpts...),
containerd.WithRuntime(sandboxInfo.Runtime.Name, runtimeOptions),