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

Watch kubernetes namespaces for autodiscover metadata for pods #25117

Merged
merged 4 commits into from
Apr 19, 2021

Conversation

jsoriano
Copy link
Member

What does this PR do?

Namespaces metadata is used by autodiscover to include it in events or
to generate autodiscover hints for the pods in the namespace.

This change watches explicitly for changes in namespaces to update this
metadata immediately instead of waiting for full resyncs.

Why is it important?

Changes are discovered immediately instead of needing to wait for full resyncs.

This removes one reason to need full resyncs, what can help in the future to reduce their frequency or completely remove them.

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.

@jsoriano jsoriano added needs_backport PR is waiting to be backported to other branches. Team:Integrations Label for the Integrations team labels Apr 15, 2021
@jsoriano jsoriano requested a review from ChrsMark April 15, 2021 17:27
@jsoriano jsoriano self-assigned this Apr 15, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Apr 15, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 15, 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

Expand to view the summary

Build stats

  • Build Cause: Pull request #25117 updated

  • Start Time: 2021-04-19T19:36:05.707+0000

  • Duration: 62 min 37 sec

  • Commit: 1903d43

Test stats 🧪

Test Results
Failed 0
Passed 47065
Skipped 5134
Total 52199

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 47065
Skipped 5134
Total 52199

Namespaces metadata is used by autodiscover to include it in events or
to generate autodiscover hints for the pods in the namespace.

This change watches explicitly for changes in namespaces to update this
metadata instead of waiting for resyncs.
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.

👍🏼 looks good!

@ChrsMark
Copy link
Member

/test

@jsoriano jsoriano merged commit 3f0c1af into elastic:master Apr 19, 2021
@jsoriano jsoriano deleted the pod-namespace-watcher branch April 19, 2021 22:40
jsoriano added a commit to jsoriano/beats that referenced this pull request Apr 19, 2021
…ic#25117)

Namespaces metadata is used by autodiscover to include it in events or
to generate autodiscover hints for the pods in the namespace.

This change watches explicitly for changes in namespaces to update this
metadata instead of waiting for resyncs.

(cherry picked from commit 3f0c1af)
@jsoriano jsoriano added v7.13.0 test-plan Add this PR to be manual test plan and removed needs_backport PR is waiting to be backported to other branches. test-plan Add this PR to be manual test plan labels Apr 19, 2021
jsoriano added a commit that referenced this pull request Apr 20, 2021
… (#25157)

Namespaces metadata is used by autodiscover to include it in events or
to generate autodiscover hints for the pods in the namespace.

This change watches explicitly for changes in namespaces to update this
metadata instead of waiting for resyncs.

(cherry picked from commit 3f0c1af)
v1v added a commit to v1v/beats that referenced this pull request Apr 20, 2021
…-github-pr-comment-template

* upstream/master:
  [Ingest Manager] Keep http and logging config during enroll (elastic#25132)
  Refactor kubernetes autodiscover to avoid skipping short-living pods (elastic#24742)
  [libbeat] New decode xml wineventlog processor (elastic#25115)
  Add svc to agent k8s clusterRole (elastic#25146)
  Add awsfargate module to collect container logs from Amazon ECS on Fargate (elastic#25041)
  [Filebeat][Cisco ASA] log enhancement and performance (elastic#24744)
  Watch kubernetes namespaces for autodiscover metadata for pods (elastic#25117)
  Cyberark Privileged Access Security module (elastic#24803)
  [Elastic Agent] Log the container command output with LOGS_PATH (elastic#25150)
  Fix for tests after `device...` field has been removed (elastic#25141)
  [Ingest Manager] Restart process on output change (elastic#24907)
  Set --insecure in container when FLEET_SERVER_ENABLE and FLEET_INSECURE set. (elastic#25137)
  [filebeat] Update documentation / changelog / beta warnings for the syslog input (elastic#25047)
  Add support for ignore_inactive in filestream input (elastic#25036)
  Fix bug with annotations dedot config on k8s not used (elastic#25111)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Integrations Label for the Integrations team v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants