Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update configuration.md and improve config env.mapping list. #3020

Merged
merged 7 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/+improve-env-config-docs.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update configuration.md and improve config env.mapping list.
2 changes: 1 addition & 1 deletion mirrord-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@
},
"mapping": {
"title": "feature.env.mapping {#feature-env-mapping}",
"description": "Specify map of patterns that if matched will replace the value according to specification.\n\n*Capture groups are allowed.*\n\nExample: ```json { \".+_TIMEOUT\": \"10000\" \"LOG_.+_VERBOSITY\": \"debug\" \"(\\w+)_(\\d+)\": \"magic-value\" } ```\n\nWill do the next replacements for environment variables that match:\n\n`CONNECTION_TIMEOUT: 500` => `CONNECTION_TIMEOUT: 10000` `LOG_FILE_VERBOSITY: info` => `LOG_FILE_VERBOSITY: debug` `DATA_1234: common-value` => `DATA_1234: magic-value`",
"description": "Specify map of patterns that if matched will replace the value according to specification.\n\n*Capture groups are allowed.*\n\nExample: ```json { \".+_TIMEOUT\": \"10000\" \"LOG_.+_VERBOSITY\": \"debug\" \"(\\w+)_(\\d+)\": \"magic-value\" } ```\n\nWill do the next replacements for environment variables that match:\n\n* `CONNECTION_TIMEOUT: 500` => `CONNECTION_TIMEOUT: 10000`\n\n* `LOG_FILE_VERBOSITY: info` => `LOG_FILE_VERBOSITY: debug`\n\n* `DATA_1234: common-value` => `DATA_1234: magic-value`",
"type": [
"object",
"null"
Expand Down
8 changes: 5 additions & 3 deletions mirrord/config/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -729,9 +729,11 @@ Example:

Will do the next replacements for environment variables that match:

`CONNECTION_TIMEOUT: 500` => `CONNECTION_TIMEOUT: 10000`
`LOG_FILE_VERBOSITY: info` => `LOG_FILE_VERBOSITY: debug`
`DATA_1234: common-value` => `DATA_1234: magic-value`
* `CONNECTION_TIMEOUT: 500` => `CONNECTION_TIMEOUT: 10000`

* `LOG_FILE_VERBOSITY: info` => `LOG_FILE_VERBOSITY: debug`

* `DATA_1234: common-value` => `DATA_1234: magic-value`

### feature.env.override {#feature-env-override}

Expand Down
8 changes: 5 additions & 3 deletions mirrord/config/src/feature/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,11 @@ pub struct EnvConfig {
///
/// Will do the next replacements for environment variables that match:
///
/// `CONNECTION_TIMEOUT: 500` => `CONNECTION_TIMEOUT: 10000`
/// `LOG_FILE_VERBOSITY: info` => `LOG_FILE_VERBOSITY: debug`
/// `DATA_1234: common-value` => `DATA_1234: magic-value`
/// * `CONNECTION_TIMEOUT: 500` => `CONNECTION_TIMEOUT: 10000`
///
/// * `LOG_FILE_VERBOSITY: info` => `LOG_FILE_VERBOSITY: debug`
///
/// * `DATA_1234: common-value` => `DATA_1234: magic-value`
pub mapping: Option<HashMap<String, String>>,
}

Expand Down
Loading