Pass plugingetter as part of swarm node config.
This is necessary for swarmkit to support cluster wide plugins, such as globally scoped network plugins. Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
This commit is contained in:
parent
27695cd751
commit
fa784951ba
|
@ -56,4 +56,5 @@ type Backend interface {
|
||||||
GetRepository(context.Context, reference.NamedTagged, *types.AuthConfig) (distribution.Repository, bool, error)
|
GetRepository(context.Context, reference.NamedTagged, *types.AuthConfig) (distribution.Repository, bool, error)
|
||||||
LookupImage(name string) (*types.ImageInspect, error)
|
LookupImage(name string) (*types.ImageInspect, error)
|
||||||
PluginManager() *plugin.Manager
|
PluginManager() *plugin.Manager
|
||||||
|
PluginGetter() *plugin.Store
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,6 +108,7 @@ func (n *nodeRunner) start(conf nodeStartConfig) error {
|
||||||
ElectionTick: 3,
|
ElectionTick: 3,
|
||||||
UnlockKey: conf.lockKey,
|
UnlockKey: conf.lockKey,
|
||||||
AutoLockManagers: conf.autolock,
|
AutoLockManagers: conf.autolock,
|
||||||
|
PluginGetter: n.cluster.config.Backend.PluginGetter(),
|
||||||
}
|
}
|
||||||
if conf.availability != "" {
|
if conf.availability != "" {
|
||||||
avail, ok := swarmapi.NodeSpec_Availability_value[strings.ToUpper(string(conf.availability))]
|
avail, ok := swarmapi.NodeSpec_Availability_value[strings.ToUpper(string(conf.availability))]
|
||||||
|
|
|
@ -1289,6 +1289,11 @@ func (daemon *Daemon) PluginManager() *plugin.Manager { // set up before daemon
|
||||||
return daemon.pluginManager
|
return daemon.pluginManager
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PluginGetter returns current pluginStore associated with the daemon
|
||||||
|
func (daemon *Daemon) PluginGetter() *plugin.Store {
|
||||||
|
return daemon.PluginStore
|
||||||
|
}
|
||||||
|
|
||||||
// CreateDaemonRoot creates the root for the daemon
|
// CreateDaemonRoot creates the root for the daemon
|
||||||
func CreateDaemonRoot(config *Config) error {
|
func CreateDaemonRoot(config *Config) error {
|
||||||
// get the canonical path to the Docker root directory
|
// get the canonical path to the Docker root directory
|
||||||
|
|
Loading…
Reference in New Issue