deprecated: go-plugin library as runtime plugin

We, containerd, suggest user to use binary plugins or RPC-based plugins.
Since go plugin has too many restrictions, I'm not sure that how many users
use the go plugin to extend the core function in the production.

Based on the fact that we put a lot of effort to make external plugins
better, suggest to deprecate go-plugin type plugin in v2.0 and remove it
in v2.1

REF: https://github.com/containerd/containerd/pull/556

Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
Wei Fu
2023-10-14 08:38:43 +08:00
parent 23573965ff
commit 4febb08528
3 changed files with 5 additions and 1 deletions

View File

@@ -431,10 +431,11 @@ func (s *Server) Wait() {
// of all plugins.
func LoadPlugins(ctx context.Context, config *srvconfig.Config) ([]plugin.Registration, error) {
// load all plugins into containerd
path := config.PluginDir
path := config.PluginDir //nolint: staticcheck
if path == "" {
path = filepath.Join(config.Root, "plugins")
}
log.G(ctx).Warning("`go_plugin` is deprecated, please use `external plugins` instead")
if err := dynamic.Load(path); err != nil {
return nil, err
}