[sandbox] Register shim plugin after #6301
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
parent
17a2aaded3
commit
35195737e7
@ -96,6 +96,24 @@ func init() {
|
||||
return NewTaskManager(shimManager), nil
|
||||
},
|
||||
})
|
||||
|
||||
// Task manager uses shim manager as a dependency to manage shim instances.
|
||||
// However, due to time limits and to avoid migration steps in 1.6 release,
|
||||
// use the following workaround.
|
||||
// This expected to be removed in 1.7.
|
||||
plugin.Register(&plugin.Registration{
|
||||
Type: plugin.RuntimePluginV2,
|
||||
ID: "shim",
|
||||
InitFn: func(ic *plugin.InitContext) (interface{}, error) {
|
||||
taskManagerI, err := ic.GetByID(plugin.RuntimePluginV2, "task")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
taskManager := taskManagerI.(*TaskManager)
|
||||
return taskManager.manager, nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
type ManagerConfig struct {
|
||||
|
@ -41,12 +41,12 @@ func init() {
|
||||
Type: plugin.ServicePlugin,
|
||||
ID: services.SandboxControllerService,
|
||||
Requires: []plugin.Type{
|
||||
plugin.RuntimeShimPlugin,
|
||||
plugin.RuntimePluginV2,
|
||||
plugin.MetadataPlugin,
|
||||
plugin.EventPlugin,
|
||||
},
|
||||
InitFn: func(ic *plugin.InitContext) (interface{}, error) {
|
||||
shimPlugin, err := ic.Get(plugin.RuntimeShimPlugin)
|
||||
shimPlugin, err := ic.GetByID(plugin.RuntimePluginV2, "shim")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user