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

Preserve annotations in a kubernetes namespace metadata #27045

Merged

Conversation

atercattus
Copy link
Contributor

@atercattus atercattus commented Jul 26, 2021

What does this PR do?

When kubernetes is used as autodiscover provider, we can use metadata in processors of filebeat.
But after #16834 we lost access to 'annotations' section. This PR fix it.

Why is it important?

We have custom tags in namespace annotations but have no access to them from the latest versions of filebeat. But we still have access to labels what is contradictory.

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

As usual: go test ./...

Related issues

Use cases

kind: Namespace
metadata:
  annotations:
    sage/group: foo_bar # We lost this without fix

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 26, 2021
@cla-checker-service
Copy link

cla-checker-service bot commented Jul 26, 2021

💚 CLA has been signed

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 26, 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-27T06:44:21.043+0000

  • Duration: 133 min 47 sec

  • Commit: d600c39

Test stats 🧪

Test Results
Failed 0
Passed 49549
Skipped 5329
Total 54878

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 49549
Skipped 5329
Total 54878

@kaiyan-sheng kaiyan-sheng added the Team:Integrations Label for the Integrations team label Jul 26, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 26, 2021
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, thanks for fixing this!

@ChrsMark
Copy link
Member

/test

@ChrsMark ChrsMark added the backport-v7.15.0 Automated backport with mergify label Jul 27, 2021
@ChrsMark ChrsMark self-assigned this Jul 27, 2021
@ChrsMark ChrsMark merged commit 4576058 into elastic:master Jul 27, 2021
mergify bot pushed a commit that referenced this pull request Jul 27, 2021
@atercattus atercattus deleted the preserve-annotations-in-kube-metadata branch July 27, 2021 09:32
ChrsMark pushed a commit that referenced this pull request Jul 27, 2021
)

(cherry picked from commit 4576058)

Co-authored-by: Aleksey Akulovich <cat@ater.me>
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 Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants