Added set/get instance config endpoints; fixed declarative config bug

This commit is contained in:
2026-06-11 19:19:47 -05:00
parent 61934bb2f4
commit 4b5e957eaa
2 changed files with 95 additions and 1 deletions

View File

@@ -62,7 +62,15 @@ func SyncInstanceConfig(templateVersion string, instanceConfigPath string, meta
}
for key, value := range meta.Config {
rawConfig[key] = value
if sub, ok := value.(map[string]interface{}); ok {
if existing, ok := rawConfig[key].(map[string]interface{}); ok {
for k, v := range sub {
existing[k] = v
}
}
} else {
rawConfig[key] = value
}
}
rawConfig["ServerName"] = meta.ServerName