File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ type Config struct {
2828 Root string `toml:"root"`
2929 // State is the path to a directory where containerd will store transient data
3030 State string `toml:"state"`
31+ // PluginDir is the directory for dynamic plugins to be stored
32+ PluginDir string `toml:"plugin_dir"`
3133 // GRPC configuration settings
3234 GRPC GRPCConfig `toml:"grpc"`
3335 // Debug and profiling settings
Original file line number Diff line number Diff line change @@ -220,7 +220,11 @@ func (s *Server) Stop() {
220220// of all plugins.
221221func LoadPlugins (ctx context.Context , config * srvconfig.Config ) ([]* plugin.Registration , error ) {
222222 // load all plugins into containerd
223- if err := plugin .Load (filepath .Join (config .Root , "plugins" )); err != nil {
223+ path := config .PluginDir
224+ if path == "" {
225+ path = filepath .Join (config .Root , "plugins" )
226+ }
227+ if err := plugin .Load (path ); err != nil {
224228 return nil , err
225229 }
226230 // load additional plugins that don't automatically register themselves
You can’t perform that action at this time.
0 commit comments