mirror of https://github.com/docker/docs.git
Merge pull request #22299 from thaJeztah/fix-label-reload
fix reloading of daemon labels from config
This commit is contained in:
commit
bee093802d
|
@ -1498,7 +1498,7 @@ func (daemon *Daemon) initDiscovery(config *Config) error {
|
|||
func (daemon *Daemon) Reload(config *Config) error {
|
||||
daemon.configStore.reloadLock.Lock()
|
||||
defer daemon.configStore.reloadLock.Unlock()
|
||||
if config.IsValueSet("label") {
|
||||
if config.IsValueSet("labels") {
|
||||
daemon.configStore.Labels = config.Labels
|
||||
}
|
||||
if config.IsValueSet("debug") {
|
||||
|
|
|
@ -320,7 +320,7 @@ func TestDaemonReloadLabels(t *testing.T) {
|
|||
}
|
||||
|
||||
valuesSets := make(map[string]interface{})
|
||||
valuesSets["label"] = "foo:baz"
|
||||
valuesSets["labels"] = "foo:baz"
|
||||
newConfig := &Config{
|
||||
CommonConfig: CommonConfig{
|
||||
Labels: []string{"foo:baz"},
|
||||
|
@ -345,7 +345,7 @@ func TestDaemonReloadNotAffectOthers(t *testing.T) {
|
|||
}
|
||||
|
||||
valuesSets := make(map[string]interface{})
|
||||
valuesSets["label"] = "foo:baz"
|
||||
valuesSets["labels"] = "foo:baz"
|
||||
newConfig := &Config{
|
||||
CommonConfig: CommonConfig{
|
||||
Labels: []string{"foo:baz"},
|
||||
|
|
Loading…
Reference in New Issue