Sandbox API: Add a new mode config for sandbox controller impls

Add a new config as sandbox controller mod, which can be either
"podsandbox" or "shim". If empty, set it to default "podsandbox"
when CRI plugin inits.

Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
This commit is contained in:
Zhang Tianyang
2022-11-03 21:21:07 +08:00
parent d1564fec5b
commit c953eecb79
8 changed files with 117 additions and 21 deletions

View File

@@ -77,8 +77,9 @@ func DefaultConfig() PluginConfig {
NoPivot: false,
Runtimes: map[string]Runtime{
"runc": {
Type: "io.containerd.runc.v2",
Options: tree.ToMap(),
Type: "io.containerd.runc.v2",
Options: tree.ToMap(),
SandboxMode: string(ModePodSandbox),
},
},
DisableSnapshotAnnotations: true,