cri: implement CDI device injection
Extract the names of requested CDI devices and update the OCI Spec according to the corresponding CDI device specifications. CDI devices are requested using container annotations in the cdi.k8s.io namespace. Once CRI gains dedicated fields for CDI injection the snippet for extracting CDI names will need an update. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
This commit is contained in:
		| @@ -239,6 +239,7 @@ func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateConta | ||||
| 		return nil, fmt.Errorf("failed to get runtime options: %w", err) | ||||
| 	} | ||||
| 	opts = append(opts, | ||||
| 		containerd.WithCDI(spec, config.Annotations), | ||||
| 		containerd.WithSpec(spec, specOpts...), | ||||
| 		containerd.WithRuntime(sandboxInfo.Runtime.Name, runtimeOptions), | ||||
| 		containerd.WithContainerLabels(containerLabels), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ed Bartosh
					Ed Bartosh