diff --git a/changelog.d/+improve-env-config-docs.changed.md b/changelog.d/+improve-env-config-docs.changed.md new file mode 100644 index 00000000000..79e19a7ced7 --- /dev/null +++ b/changelog.d/+improve-env-config-docs.changed.md @@ -0,0 +1 @@ +Update configuration.md and improve config env.mapping list. diff --git a/mirrord-schema.json b/mirrord-schema.json index 46306a4ed28..5beadff3c58 100644 --- a/mirrord-schema.json +++ b/mirrord-schema.json @@ -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" diff --git a/mirrord/config/configuration.md b/mirrord/config/configuration.md index 3a3f8b4fa57..8e8b9ea6aee 100644 --- a/mirrord/config/configuration.md +++ b/mirrord/config/configuration.md @@ -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} diff --git a/mirrord/config/src/feature/env.rs b/mirrord/config/src/feature/env.rs index 700b31f0667..1763a960b22 100644 --- a/mirrord/config/src/feature/env.rs +++ b/mirrord/config/src/feature/env.rs @@ -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>, }