-
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
Add condition to the config file template for add_kubernetes_metadata #14056
Add condition to the config file template for add_kubernetes_metadata #14056
Conversation
Signed-off-by: chrismark <chrismarkou92@gmail.com>
libbeat/_meta/config.yml.tmpl
Outdated
- add_host_metadata: ~ | ||
- add_cloud_metadata: ~ | ||
- add_docker_metadata: ~ | ||
{{end}} |
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.
could this change be just adding the kubernetes processor within the existing list? Something like:
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
{{if .UseKubernetesMetadataProcessor}}
- add_kubernetes_metadata: ~
{{end}}
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.
That was what I tried first, however this adds extra blank lines because of the template conditionals like:
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~
If this is ok, I can change it.
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.
gotcha, try with {{- if ... -}}
!
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.
Thank you for taking this! I left a comment
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
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.
LGTM
…n_add_kubernetes_metadata
CI failures seem to be irrelevant. Merging this. |
This will make
add_kubernetes_metadata
processor to be only added by default to the configurations of beats with default indexers and matchers.Closes #13713.
cc: @jsoriano , @exekias @odacremolbap