-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Elastic Agent] Add support for variable replacement from providers #20839
Merged
blakerouse
merged 15 commits into
elastic:master
from
blakerouse:agent-ast-variable-replace
Sep 3, 2020
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d13946e
Add ability to replace variables in the parsed AST tree.
blakerouse 8712c53
More vars replace improvements.
blakerouse 46ddf39
Perform the variable replacement of the elastic-agent configuration.
blakerouse 96bc36c
Clean-up testing and processors.
blakerouse 9f183cf
Add changelog.
blakerouse b0cec16
Fix import sorting.
blakerouse cb5c813
Add more validation to variable substitution.
blakerouse 4a69235
Add log message about dynamic inputs being experimental.
blakerouse 4e582af
Update to new variable format. Handle replace of complete objects.
blakerouse dd0d9dd
Fix config importing to not replace vars in inputs.
blakerouse 7b769a3
Fixes for vet.
blakerouse ecb5dd4
Fix fleet config change action to use new LoadConfig.
blakerouse 6d3c3af
Fixes from code review.
blakerouse 221c216
Merge branch 'master' into agent-ast-variable-replace
blakerouse 5650117
Ensure processors are prepended to inputs.
blakerouse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not official supported but it basically means someone can use
${ELASTIC_USERNAME}
today in the output config because it is ucfg but in case we also support static providers like keystore in the output in the future, this might break as it needs a prefix?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this allows the same go-ucfg that we have always allowed anywhere in the config except in the
inputs
. But if we change that in the future then a prefix would be required to get it from the keystore provider.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets keep it in mind if we ever there but ok for now.