Combine multiple configuration files from a directory #44

Closed
opened 2023-02-06 11:28:37 +00:00 by realloc · 1 comment
realloc commented 2023-02-06 11:28:37 +00:00 (Migrated from github.com)

FrostFS storage node configuration approach may be simplified by breaking down the single big YAML file into smaller ones, each having one or several sections defined. It could simplify the integration with configuration management systems and to allow users to work with only a small part of what they really need to edit.

The proposed solution is:

  • Add a new configuration argument config-dir

  • When set, read all *.y[a]ml files from config-dir and use Viper's MergeConfig functionality to produce the final configuration.

  • Files must be processed in alphanumerical order so that 01.yaml may be extended with contents of 02.yaml.

Additional context

With separate configuration files it would be easier for configuration management systems to identify what part of configuration was changed and react properly. For example send reload signal instead of doing dull restart of a service.

FrostFS storage node configuration approach may be simplified by breaking down the single big YAML file into smaller ones, each having one or several sections defined. It could simplify the integration with configuration management systems and to allow users to work with only a small part of what they really need to edit. The proposed solution is: - Add a new configuration argument `config-dir` - When set, read all `*.y[a]ml` files from `config-dir` and use Viper's [MergeConfig](https://pkg.go.dev/github.com/spf13/viper#MergeConfig) functionality to produce the final configuration. - Files must be processed in alphanumerical order so that 01.yaml may be extended with contents of 02.yaml. ### Additional context With separate configuration files it would be easier for configuration management systems to identify what part of configuration was changed and react properly. For example send `reload` signal instead of doing dull `restart` of a service.
realloc commented 2023-02-06 12:34:25 +00:00 (Migrated from github.com)
Related: - TrueCloudLab/frostfs-s3-gw#21 - TrueCloudLab/frostfs-s3-gw#22 - TrueCloudLab/frostfs-http-gw#12 - TrueCloudLab/frostfs-http-gw#13
carpawell referenced this issue from a commit 2023-03-22 17:36:30 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#44
No description provided.