Merge pull request #45552 from miles-to-go/fix-insecure-registries-reload
Fix insecure registries reload
This commit is contained in:
commit
054add40a1
2 changed files with 8 additions and 2 deletions
|
@ -63,10 +63,10 @@ func (daemon *Daemon) Reload(conf *config.Config) (err error) {
|
|||
if err := daemon.reloadAllowNondistributableArtifacts(conf, attributes); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := daemon.reloadInsecureRegistries(conf, attributes); err != nil {
|
||||
if err := daemon.reloadRegistryMirrors(conf, attributes); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := daemon.reloadRegistryMirrors(conf, attributes); err != nil {
|
||||
if err := daemon.reloadInsecureRegistries(conf, attributes); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := daemon.reloadLiveRestore(conf, attributes); err != nil {
|
||||
|
|
|
@ -238,13 +238,19 @@ func TestDaemonReloadInsecureRegistries(t *testing.T) {
|
|||
"docker3.example.com", // this will be newly added
|
||||
}
|
||||
|
||||
mirrors := []string{
|
||||
"https://mirror.test.example.com",
|
||||
}
|
||||
|
||||
valuesSets := make(map[string]interface{})
|
||||
valuesSets["insecure-registries"] = insecureRegistries
|
||||
valuesSets["registry-mirrors"] = mirrors
|
||||
|
||||
newConfig := &config.Config{
|
||||
CommonConfig: config.CommonConfig{
|
||||
ServiceOptions: registry.ServiceOptions{
|
||||
InsecureRegistries: insecureRegistries,
|
||||
Mirrors: mirrors,
|
||||
},
|
||||
ValuesSet: valuesSets,
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue