Add direct write file to avoid moving docker mounted files (#1155)

Add a direct write to handle management.json write operation. 

Remove empty configuration types to avoid unnecessary fields in the generated management.json file.
This commit is contained in:
Maycon Santos
2023-09-22 10:25:04 +02:00
committed by GitHub
parent d4b6d7646c
commit e260270825
3 changed files with 78 additions and 14 deletions

View File

@@ -149,7 +149,7 @@ var (
}
if key != "" {
log.Debugf("update config with activity store key")
log.Infof("update config with activity store key")
config.DataStoreEncryptionKey = key
err := updateMgmtConfig(mgmtConfig, config)
if err != nil {
@@ -466,7 +466,7 @@ func loadMgmtConfig(mgmtConfigPath string) (*server.Config, error) {
}
func updateMgmtConfig(path string, config *server.Config) error {
return util.WriteJson(path, config)
return util.DirectWriteJson(path, config)
}
// OIDCConfigResponse used for parsing OIDC config response