forked from TrueCloudLab/frostfs-s3-gw
[TrueCloudLab#21] Support multiple configs
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
b35f146cec
commit
1ce8b8a30d
6 changed files with 101 additions and 19 deletions
|
@ -110,6 +110,23 @@ A path to a configuration file can be specified with `--config` parameter:
|
|||
$ frostfs-s3-gw --config your-config.yaml
|
||||
```
|
||||
|
||||
### Multiple configs
|
||||
|
||||
You can use several config files when running application. It allows you to split configuration into parts.
|
||||
For example, you can use separate yaml file for pprof and prometheus section in config (see [config examples](../config)).
|
||||
You can either provide several files with repeating `--config` flag or provide path to the dir that contains all configs using `--config-dir` flag.
|
||||
Also, you can combine these flags:
|
||||
|
||||
```shell
|
||||
$ frostfs-s3-gw --config ./config/config.yaml --config /your/partial/config.yaml --config-dir ./config/dir
|
||||
```
|
||||
|
||||
**Note:** next file in `--config` flag overwrites values from the previous one.
|
||||
Files from `--config-dir` directory overwrite values from `--config` files.
|
||||
So the command above run `frostfs-s3-gw` to listen on `0.0.0.0:8080` address (value from `./config/config.yaml`),
|
||||
applies parameters from `/your/partial/config.yaml`,
|
||||
enable pprof (value from `./config/dir/pprof.yaml`) and prometheus (value from `./config/dir/prometheus.yaml`).
|
||||
|
||||
### Reload on SIGHUP
|
||||
|
||||
Some config values can be reloaded on SIGHUP signal.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue