-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add support for top level configuration #79
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
cc6a407
Add support for top level configuration
jalvz 7a1dd4a
make update
jalvz b21e9aa
spec out contents
jalvz 26463bd
make update
jalvz b81ba33
split spec
jalvz 579d6c2
Merge remote-tracking branch 'elastic/master' into top-level-vars
jalvz e0cee2e
make update
jalvz d0a53df
make regex stricter
jalvz 7da2203
add template_path property to the spec
jalvz c7f74bc
Merge remote-tracking branch 'elastic/master' into top-level-vars
jalvz ec9ac45
make update
jalvz 0dd7916
update description
jalvz 865880a
make update
jalvz e4e2e92
Spec out contents of template file
jalvz e8f7f89
make update
jalvz 3dee9ca
remove config key
jalvz 0d978ee
make update
jalvz bda6234
Merge remote-tracking branch 'elastic/master' into top-level-vars
jalvz 327abde
make update
jalvz 23e436d
Add test
jalvz a93da15
Merge remote-tracking branch 'elastic/master' into top-level-vars
jalvz cce099d
make update
jalvz 9640d2c
and remove spec
jalvz 7673874
Add example file
jalvz 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
Large diffs are not rendered by default.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
code/go/internal/validator/test/packages/input_template/agent/input/example.yml.hbs
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 @@ | ||
group: | ||
field1: {{var1}} | ||
field2: {{var2}} |
1 change: 1 addition & 0 deletions
1
code/go/internal/validator/test/packages/input_template/agent/input/template.yml.hbs
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 changes: 2 additions & 0 deletions
2
...go/internal/validator/test/packages/input_template/data_stream/nothing/fields/nothing.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 @@ | ||
- name: nothing | ||
type: keyword |
1 change: 1 addition & 0 deletions
1
code/go/internal/validator/test/packages/input_template/data_stream/nothing/manifest.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 @@ | ||
title: nothing, really |
Empty file.
19 changes: 19 additions & 0 deletions
19
code/go/internal/validator/test/packages/input_template/manifest.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,19 @@ | ||
format_version: 1.0.4 | ||
name: integration | ||
title: integration | ||
description: integration, really | ||
version: 0.1.2 | ||
release: beta | ||
conditions: | ||
kibana.version: '^7.9.0' | ||
policy_templates: | ||
- name: apm | ||
title: APM | ||
description: APM stuff | ||
inputs: | ||
- type: apm | ||
title: Collect traces | ||
description: Collect traces | ||
template_path: ./agent/input/template.yml.hbs | ||
owner: | ||
github: elastic/foobar |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
spec: | ||
additionalContents: false | ||
contents: | ||
- description: Folder containing input definitions | ||
type: folder | ||
name: input | ||
required: true | ||
additionalContents: false | ||
contents: | ||
- description: Config template file for inputs defined in the policy_templates section of the top level manifest | ||
type: file | ||
pattern: '^.+.yml.hbs$' | ||
required: true |
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
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.
nit: It would be nice to put a real content in at least one file, so this
template.yml.hbs
won't be so mysterious.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.
@jalvz Can you open a PR with this? Because it is exactly what I'm looking for to have an example.
@mtojek These test packages are great. Example and testing in one go.
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.
BTW, you could even put a short APM Example in here to make it more concrete.
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.
@ruflin I added 7673874, is not that what you were looking for?
I don't think I can use this file as a real hbs example because it is referenced in the test (correct me if Im wrong)
Also didn't want to add an APM-like config because this can be anything, it has exactly the same structure as the stream templates.
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.
Got it. I missed that you added two template files. The part I stumble over is that you used
group
. This is just an example I assume. It can all be on the top level likefoo: bar
?If we could use apm example here, @mtojek will know best. My preference is always to have a real example if possible.