Skip to content
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 daemonset name in pods controlled by DaemonSets #26808

Conversation

MichaelKatsoulis
Copy link
Contributor

@MichaelKatsoulis MichaelKatsoulis commented Jul 9, 2021

What does this PR do?

This PR adds kubernetes.daemonset.name in Pods' metadata.

Why is it important?

It enriches the documents of pods belonging to DaemonSets with the DaemonSet name.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

  1. Deploy a sample DaemonSet on k8s: kubectl apply -f https://k8s.io/examples/controllers/daemonset.yaml
  2. Deploy Metricbeat (instructions) on k8s and verify that events shipped by pod and state_pod metricset include kubernetes.daemonset.name . As an example see screenshots below.

Related issues

Screenshots

Screenshot 2021-07-09 at 1 31 55 PM

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 9, 2021
@MichaelKatsoulis MichaelKatsoulis requested a review from ChrsMark July 9, 2021 10:34
@MichaelKatsoulis MichaelKatsoulis added backport-v7.15.0 Automated backport with mergify Team:Integrations Label for the Integrations team labels Jul 9, 2021
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 9, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

Copy link
Member

@ChrsMark ChrsMark left a comment

Choose a reason for hiding this comment

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

lgtm. It will need a changelog. Also since merging this will close the respective issue please make sure we follow up properly with a new issue about the workload fields (I left a comment there too).

@MichaelKatsoulis MichaelKatsoulis changed the title Add daemonset name in pods controller by DaemonSets Add daemonset name in pods controlled by DaemonSets Jul 9, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 9, 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: 2021-07-09T11:14:19.457+0000

  • Duration: 136 min 24 sec

  • Commit: 4a74ab6

Test stats 🧪

Test Results
Failed 0
Passed 49189
Skipped 5395
Total 54584

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 49189
Skipped 5395
Total 54584

@MichaelKatsoulis MichaelKatsoulis merged commit 4933aef into elastic:master Jul 9, 2021
mergify bot pushed a commit that referenced this pull request Jul 9, 2021
* Add daemonset name in pods controller by DaemonSets

(cherry picked from commit 4933aef)
MichaelKatsoulis added a commit that referenced this pull request Jul 12, 2021
* Add daemonset name in pods controller by DaemonSets

(cherry picked from commit 4933aef)

Co-authored-by: Michael Katsoulis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.15.0 Automated backport with mergify enhancement Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add daemonset name when enriching pod logs or metrics
4 participants