mirror of
https://github.com/moghtech/komodo.git
synced 2026-05-21 21:58:34 -05:00
improve periphery start command docs
This commit is contained in:
@@ -27,6 +27,18 @@ use crate::entities::{
|
||||
/// This structure represents the periphery command line arguments used to
|
||||
/// configure the periphery agent. A help manual for the periphery binary
|
||||
/// can be printed using `/path/to/periphery --help`.
|
||||
///
|
||||
/// Example command:
|
||||
/// ```sh
|
||||
/// periphery \
|
||||
/// --config-path /path/to/periphery.config.base.toml \
|
||||
/// --config-path /other_path/to/overide-periphery-config-directory \
|
||||
/// --config-keyword periphery \
|
||||
/// --config-keyword config \
|
||||
/// --merge-nested-config true \
|
||||
/// --extend-config-arrays false \
|
||||
/// --log-level info
|
||||
/// ```
|
||||
#[derive(Parser)]
|
||||
#[command(name = "periphery", author, about, version)]
|
||||
pub struct CliArgs {
|
||||
@@ -42,15 +54,18 @@ pub struct CliArgs {
|
||||
|
||||
/// Merges nested configs, eg. secrets, docker_accounts, github_accounts.
|
||||
/// Will override the equivalent env configuration.
|
||||
/// Default: false
|
||||
#[arg(long)]
|
||||
pub merge_nested_config: Option<bool>,
|
||||
|
||||
/// Extends config arrays, eg. allowed_ips, passkeys.
|
||||
/// Will override the equivalent env configuration.
|
||||
/// Default: false
|
||||
#[arg(long)]
|
||||
pub extend_config_arrays: Option<bool>,
|
||||
|
||||
/// Configure the logging level: error, warn, info, debug, trace.
|
||||
/// Default: info
|
||||
/// If passed, will override any other log_level set.
|
||||
#[arg(long)]
|
||||
pub log_level: Option<tracing::Level>,
|
||||
|
||||
@@ -37,7 +37,7 @@ periphery \
|
||||
--config-path /other_path/to/overide-periphery-config-directory \
|
||||
--config-keyword periphery \
|
||||
--config-keyword config \
|
||||
--merge-nested-config
|
||||
--merge-nested-config true
|
||||
```
|
||||
|
||||
### Passing config files
|
||||
@@ -50,8 +50,8 @@ When passing multiple config files, later --config-path given in the command wil
|
||||
|
||||
There are two ways to merge config files. The default behavior is to completely replace any base fields with whatever fields are present in the overide config. So if you pass `allowed_ips = []` in your overide config, the final allowed_ips will be an empty list as well.
|
||||
|
||||
`--merge-nested-config` will merge config fields recursively and extend config array fields.
|
||||
`--merge-nested-config true` will merge config fields recursively and extend config array fields.
|
||||
|
||||
For example, with `--merge-nested-config` you can specify an allowed ip in the base config, and another in the overide config, they will both be present in the final config.
|
||||
For example, with `--merge-nested-config true` you can specify an allowed ip in the base config, and another in the overide config, they will both be present in the final config.
|
||||
|
||||
Similarly, you can specify a base docker / github account pair, and extend them with additional accounts in the overide config.
|
||||
Reference in New Issue
Block a user