Also set Runtime file v1 containerd runtime config

This ensures that older versions of containerd that may be expecting
this over options.BinaryName should continue to work.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2022-05-25 20:10:28 +02:00
parent 4cd719692e
commit 15cbd54d1c
2 changed files with 5 additions and 0 deletions

View File

@ -48,6 +48,9 @@ func (config *config) update(runtimeClass string, runtimeType string, runtimeBin
}
config.initRuntime(runtimeClassPath, runtimeType, "BinaryName", runtimeBinary)
if config.version == 1 {
config.initRuntime(runtimeClassPath, runtimeType, "Runtime", runtimeBinary)
}
if setAsDefault {
defaultRuntimeNamePath := config.defaultRuntimeNamePath()

View File

@ -349,6 +349,7 @@ func runtimeMapV1(binary string) map[string]interface{} {
"privileged_without_host_devices": false,
"options": map[string]interface{}{
"BinaryName": binary,
"Runtime": binary,
},
}
}
@ -376,6 +377,7 @@ func runcRuntimeConfigMapV1(binary string) map[string]interface{} {
"options": map[string]interface{}{
"runc-option": "value",
"BinaryName": binary,
"Runtime": binary,
},
}
}