mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Generate empty cdi annotations
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
f0e3c32fe5
commit
db2a1edbdd
@ -45,6 +45,9 @@ func GenerateAnnotations(
|
||||
driverName string,
|
||||
cdiDevices []string,
|
||||
) ([]kubecontainer.Annotation, error) {
|
||||
if len(cdiDevices) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
annotations, err := updateAnnotations(map[string]string{}, driverName, string(claimUID), cdiDevices)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("can't generate CDI annotations: %+v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user