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

Fix NewContainerMetadataEnricher to use default config for kubernetes module. #16857

Merged
merged 2 commits into from
Mar 6, 2020

Conversation

blakerouse
Copy link
Contributor

@blakerouse blakerouse commented Mar 5, 2020

What does this PR do?

Fix NewContainerMetadataEnricher to use default values for metadata.Config. ResourceMetadataEnricher already used the default config.

This also includes a change to use InitDefaults so an new call sites do not need to worry about ensuring the default config is always used before unpacking.

Why is it important?

So labels.dedot and annotations.dedot default to true.

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 (already was supposed to be default)
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@blakerouse blakerouse added review containers Related to containers use case Team:Platforms Label for the Integrations - Platforms team labels Mar 5, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

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.

Note here that this change will be applied on both ResourceMetadataEnricher and ContainerMetadataEnricher, right? However, I guess that this is sth that we want. If so we need to update the PR description and add the respective changelog entry.

@blakerouse blakerouse changed the title Fix code to use default config for kubernetes resource metadata. Fix NewContainerMetadataEnricher to use default config for kubernetes module. Mar 6, 2020
@blakerouse
Copy link
Contributor Author

@ChrsMark Added changelog entry. ResourceMetadataEnricher already used the default config, the issue was only that ContainerMetadataEnricher did not.

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.

👍

@blakerouse blakerouse merged commit 5c38912 into elastic:master Mar 6, 2020
@blakerouse blakerouse deleted the fix_16845 branch March 6, 2020 13:40
blakerouse added a commit to blakerouse/beats that referenced this pull request Mar 6, 2020
… module. (elastic#16857)

* Fix code to use default config for resource metadata.

* Add changelog entry.

(cherry picked from commit 5c38912)
@ChrsMark
Copy link
Member

ChrsMark commented Mar 6, 2020

@blakerouse maybe this should be backported to 7.6 too, to avoid having users waiting for 7.7

blakerouse added a commit to blakerouse/beats that referenced this pull request Mar 6, 2020
… module. (elastic#16857)

* Fix code to use default config for resource metadata.

* Add changelog entry.

(cherry picked from commit 5c38912)
@blakerouse
Copy link
Contributor Author

@ChrsMark Created #16874 for 7.6, but it doesn't have support for the InitDefault that is only in 7.x, so I closed it.

blakerouse added a commit that referenced this pull request Mar 6, 2020
… module. (#16857) (#16873)

* Fix code to use default config for resource metadata.

* Add changelog entry.

(cherry picked from commit 5c38912)
@jsoriano
Copy link
Member

@ChrsMark Created #16874 for 7.6, but it doesn't have support for the InitDefault that is only in 7.x, so I closed it.

There would be a way to fix this for 7.6.2 without using InitDefault? Maybe we should do it.

@jsoriano
Copy link
Member

@ChrsMark Created #16874 for 7.6, but it doesn't have support for the InitDefault that is only in 7.x, so I closed it.

There would be a way to fix this for 7.6.2 without using InitDefault? Maybe we should do it.

I have opened #17020 for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Related to containers use case review Team:Platforms Label for the Integrations - Platforms team v7.6.2 v7.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metricbeat Kubernetes module: labels.dedot needed in some metricsets
5 participants