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 k8s pod labels tier in metadata #16480

Merged
merged 4 commits into from
Feb 25, 2020
Merged

Conversation

ChrsMark
Copy link
Member

Closes #16464

Description of bug investigation: #16464 (comment)

cc: @exekias

Signed-off-by: chrismark <chrismarkou92@gmail.com>
@ChrsMark ChrsMark added bug needs_backport PR is waiting to be backported to other branches. containers Related to containers use case Team:Integrations Label for the Integrations team autodiscovery v7.6.1 Team:Platforms Label for the Integrations - Platforms team labels Feb 21, 2020
@ChrsMark ChrsMark requested a review from a team February 21, 2020 10:19
@ChrsMark ChrsMark self-assigned this Feb 21, 2020
@@ -49,6 +49,8 @@ func (p *pod) Generate(obj kubernetes.Resource, opts ...FieldOptions) common.Map
}

out := p.resource.Generate("pod", obj, opts...)
// TODO: remove this call when moving to 8.0
Copy link
Contributor

Choose a reason for hiding this comment

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

I thinks it's fair to create an issue for removing this TODO ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

+1, that said. I'm not quite convinced this is the way to go. Let's move this fix forward and discuss future steps in the opened issue

@@ -89,3 +91,14 @@ func (p *pod) GenerateFromName(name string, opts ...FieldOptions) common.MapStr

return nil
}

func (p *pod) fixLabels(in common.MapStr) common.MapStr {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm.. "fix" says nothing about the behavior. Could you rename this method to sth less vague? movePodLabels, extractPodLabel, etc.

Signed-off-by: chrismark <chrismarkou92@gmail.com>
@exekias
Copy link
Contributor

exekias commented Feb 24, 2020

LGTM, Let's move this one forward, it seems some tests are failing, we need to update some tests cases

@ChrsMark
Copy link
Member Author

ChrsMark commented Feb 25, 2020

Test cases were fixed. Also added a changelog.

@ChrsMark ChrsMark merged commit 837279a into elastic:master Feb 25, 2020
ChrsMark added a commit to ChrsMark/beats that referenced this pull request Feb 25, 2020
@ChrsMark ChrsMark added v7.7.0 and removed needs_backport PR is waiting to be backported to other branches. labels Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autodiscovery bug containers Related to containers use case Team:Integrations Label for the Integrations team Team:Platforms Label for the Integrations - Platforms team v7.6.1 v7.7.0 [zube]: Done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After upgraded to 7.6 filebeat doesn’t work as expected with config from 7.5.x
4 participants