sandbox: support more sandbox controllers
make containerd extensible to support more sandbox controllers registered into containerd by config. we change the default sandbox controller plugin's name from "local" to "shim". to make sure we can get the controller by the plugin name it registered into containerd. Signed-off-by: Abel Feng <fshb1988@gmail.com>
This commit is contained in:
@@ -274,10 +274,7 @@ func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateConta
|
||||
containerd.WithContainerExtension(containerMetadataExtension, &meta),
|
||||
)
|
||||
|
||||
// When using sandboxed shims, containerd's runtime needs to know which sandbox shim instance to use.
|
||||
if ociRuntime.Sandboxer == string(criconfig.ModeShim) {
|
||||
opts = append(opts, containerd.WithSandbox(sandboxID))
|
||||
}
|
||||
opts = append(opts, containerd.WithSandbox(sandboxID))
|
||||
|
||||
opts = append(opts, c.nri.WithContainerAdjustment())
|
||||
defer func() {
|
||||
|
||||
Reference in New Issue
Block a user