Skip to content

Conversation

tetianakravchenko
Copy link
Contributor

Signed-off-by: Tetiana Kravchenko tetiana.kravchenko@elastic.co

What does this PR do?

Add possibility to configure add_recourse_metadata for pod and container resources.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

How to test this PR locally

Related issues

Screenshots

Screenshot 2021-12-22 at 10 31 31

@elasticmachine
Copy link

elasticmachine commented Dec 22, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-01-11T10:15:26.105+0000

  • Duration: 31 min 46 sec

  • Commit: 36afb1c

Test stats 🧪

Test Results
Failed 0
Passed 116
Skipped 0
Total 116

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@MichaelKatsoulis
Copy link
Contributor

@tetianakravchenko why did you add the add_resouce_metadata only in pod, container, state_pod and state_container ?

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
@tetianakravchenko tetianakravchenko force-pushed the expose-add_recourse_metadata branch from 0b4aafc to a5086e8 Compare January 10, 2022 13:19
@tetianakravchenko
Copy link
Contributor Author

tetianakravchenko commented Jan 10, 2022

@MichaelKatsoulis add_resource_metadata configuration does not affect other resources except pod, container and service. add_resource_metadata is only used for generating pod metadata - here, then those settings are used in GenerateK8s of pod k8s resource - https://github.com/elastic/beats/blob/master/libbeat/common/kubernetes/metadata/pod.go#L82-L124 , the same idea for container metadata - https://github.com/elastic/beats/blob/master/metricbeat/module/kubernetes/util/kubernetes.go#L193. Other resources (deployment, daemonset, etc) are using generic GenerateK8s.

@@ -39,5 +39,18 @@ streams:
required: true
show_user: true
default: none
- name: add_resource_metadata_config
type: yaml
title: Add additionally node and namespace metadata
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the word additionally is needed here because we already have the word add but I am not sure

Copy link
Contributor

@MichaelKatsoulis MichaelKatsoulis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
@tetianakravchenko tetianakravchenko merged commit bb1c4e6 into elastic:master Jan 11, 2022
@tetianakravchenko tetianakravchenko deleted the expose-add_recourse_metadata branch January 11, 2022 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose add_recourse_metadata option to k8s package
3 participants