-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow yaml values for dynamic node settings (#85186)
Environment variables are allowed as substitutions within elasticsearch.yml. Additionally, command line settings are added into the parsed settings. However, both of these are raw strings applied after the node yml file has been parsed. This commit moves environment substitution to occur before parsing elasticsearch.yml, and override processing to happen with a separate yaml parser so that both can allow yaml parsing. Note that environment substitution is not the only type of substitution (there is also setting substitution, which needs parsed setting keys), so the existing replacement mechanism is not touched here except to remove environment handling. closes #65577
- Loading branch information
Showing
11 changed files
with
169 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 85186 | ||
summary: Allow yaml values for dynamic node settings | ||
area: Infra/Core | ||
type: enhancement | ||
issues: | ||
- 65577 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
server/src/test/resources/org/elasticsearch/node/subst-broken.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
foo: ${no closing brace | ||
bar: ${goodsubst} |
1 change: 1 addition & 0 deletions
1
server/src/test/resources/org/elasticsearch/node/subst-entire-line.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
${mysubst} |
3 changes: 3 additions & 0 deletions
3
server/src/test/resources/org/elasticsearch/node/subst-first-line.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
foo: ${mysubst} | ||
bar: v2 | ||
baz: v3 |
3 changes: 3 additions & 0 deletions
3
server/src/test/resources/org/elasticsearch/node/subst-last-line.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
foo: | ||
bar: | ||
baz: ${mysubst} |
1 change: 1 addition & 0 deletions
1
server/src/test/resources/org/elasticsearch/node/subst-missing.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
foo: ${dne} |
1 change: 1 addition & 0 deletions
1
server/src/test/resources/org/elasticsearch/node/subst-multiple.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
foo: ${s1} ${s2} value |