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 Dedot for Kubernetes labels and annotations #9939

Merged
merged 31 commits into from
Jan 14, 2019
Merged

Add Dedot for Kubernetes labels and annotations #9939

merged 31 commits into from
Jan 14, 2019

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented Jan 8, 2019

Adding labels.dedot and annotations.dedot in kubernetes metricbeat config file to control dedot.
closes #9860

ph and others added 22 commits November 27, 2018 10:51
Remove default version qualifier and rename the environment variable to set it from `BEAT_VERSION_QUALIFIER` to `VERSION_QUALIFIER` this will align with other parts of the stack.

**Tested with filebeat.**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:39:01]
filebeat version 7.0.0 (amd64), libbeat 7.0.0 [0a0c267 built 2018-11-19 13:38:15 +0000 UTC]
```

**Without the patch**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:40:07]
filebeat version 7.0.0-alpha1 (amd64), libbeat 7.0.0-alpha1 [b007837 built 2018-11-19 13:39:59 +0000 UTC]
```

Fixes: #8384
@kaiyan-sheng kaiyan-sheng requested review from a team as code owners January 8, 2019 00:39
@kaiyan-sheng kaiyan-sheng added in progress Pull request is currently in progress. Metricbeat Metricbeat needs_backport PR is waiting to be backported to other branches. Team:Integrations Label for the Integrations team labels Jan 8, 2019
Copy link
Contributor

@exekias exekias left a comment

Choose a reason for hiding this comment

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

This change is looking good! There are some other places where Kubernetes metadata is generated, they can be tackled here or in a different PR (maybe this is better):

Autodiscover, add_kubernetes_metadata and the rest of Metricbeat kubernetes metricsets make use of the metadata generator: https://github.com/elastic/beats/blob/master/libbeat/common/kubernetes/metadata.go

metricbeat/module/kubernetes/event/event.go Outdated Show resolved Hide resolved
metricbeat/module/kubernetes/event/event.go Outdated Show resolved Hide resolved
Copy link
Contributor

@exekias exekias left a comment

Choose a reason for hiding this comment

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

This is good on my side, WDYT @urso ?

@urso
Copy link

urso commented Jan 12, 2019

LGTM.

small 'generic' nit: I'd like to advocate for short descriptive names. E.g. generateMapStrFromEvent could be shortened to genMapStrFromEvent, eventToMapStr, mapstrFromEvent, makeFields, genFields, or genMapStr ;)

@kaiyan-sheng kaiyan-sheng merged commit d5bda76 into elastic:master Jan 14, 2019
@kaiyan-sheng kaiyan-sheng deleted the dedot_kubernetes branch January 14, 2019 01:02
kaiyan-sheng added a commit that referenced this pull request Jan 14, 2019
Fixes: #8384

* Add Dedot for Kubernetes labels and annotations

* Add dedot options in libbeat kubernetes metadata

* Update changelog

* Refactor TestGenerateMapStrFromEvent

* Update shared-autodiscover.asciidoc with dedot params

* Add names for each unit test case in event_test.go

* Fix rebase errors

(cherry picked from commit d5bda76)
@anton-johansson
Copy link

anton-johansson commented Jan 24, 2019

This is 100% the wrong place to ask this, but I couldn't find any official information about it. I'm assuming this feature will be included in 6.7.x. Is there any place I can find release dates for this?

@ruflin
Copy link
Member

ruflin commented Jan 24, 2019

This will land in 6.7 but we don't publish any release dates.

@kaiyan-sheng kaiyan-sheng removed the needs_backport PR is waiting to be backported to other branches. label Jan 24, 2019
bashofmann pushed a commit to syseleven/beats that referenced this pull request Jan 28, 2019
…ic#10039)

Fixes: elastic#8384

* Add Dedot for Kubernetes labels and annotations

* Add dedot options in libbeat kubernetes metadata

* Update changelog

* Refactor TestGenerateMapStrFromEvent

* Update shared-autodiscover.asciidoc with dedot params

* Add names for each unit test case in event_test.go

* Fix rebase errors

(cherry picked from commit d5bda76)
@anton-johansson
Copy link

Okay, thanks @ruflin.

I have a question regarding #6203. This seems to have done something related to dedotting Kubernetes data as well. What's the difference between these two PR's? Which one does what? The other one is around a year old.

@ruflin
Copy link
Member

ruflin commented Feb 7, 2019

@anton-johansson Let's move this discussion to discuss: https://discuss.elastic.co/c/beats

@anton-johansson
Copy link

anton-johansson commented Feb 7, 2019

Okay, fair point! I will post a topic about it.

The topic can be found here.

@willejs
Copy link

willejs commented Mar 12, 2019

@ruflin there wasnt a reply on the beats discussion, and i am too wondering when this will be released? Can you cut a 6.7 release?

@ruflin
Copy link
Member

ruflin commented Mar 13, 2019

A 6.7 release is coming in the near future. If you want to be a bit more adventurous and try out the master build, you can find snapshots here: https://beats-ci.elastic.co/job/elastic+beats+master+multijob-package-linux/398/gcsObjects/

@anton-johansson Sorry that we missed your discuss topic :-(

@willejs
Copy link

willejs commented Mar 13, 2019

@ruflin Thanks for the response!
Is there a documented or commonly understood release process for beats? or is it just as and when? I just want to understand when it might happen, or under what circumstances, and if I can influence it in any way? It might help shed some light for others too asking about this.

@anton-johansson
Copy link

anton-johansson commented Mar 13, 2019

@ruflin: No worries! Technically, you had nothing to answer with, since there's no news. ¯\_(ツ)_/¯ Thanks for getting back to us!

Yeah, it would be great with some kind of announced schedule or plan for atleast the upcoming release. I could try the master build, but it would depend on how far away this near future is. :D

@ruflin
Copy link
Member

ruflin commented Mar 15, 2019

I can't provide you with a schedule but I could provide you with a snapshot build of 7.0 if you let me know the platform and beat you are looking for.

@willejs
Copy link

willejs commented Mar 19, 2019

@ruflin Thanks for the offer, but I cant really run snapshot builds in production. How do you decide to cut release 6.7? Could you not make this whole process transparent and automated in CI/CD? I am willing to help in any way do that!

I keep asking because I need to decide if I just fork this for now, set up CI/CD, and build 6.7 and push a docker container to our private registry. Thats a couple hours work, and lots of people will disapprove of me doing so! At that point I might as well just use a snapshot build...

@ruflin
Copy link
Member

ruflin commented Mar 20, 2019

All of the Elastic Stack is released together which includes a lot of manual testing which takes time. If you want to build a snapshot on your own, I recommend to do it based the 6.7 branch if that is the version you are looking for: https://github.com/elastic/beats/tree/6.7 This is mostly what should be released.

@anton-johansson
Copy link

@willejs, 6.7.0 was just released, FYI.

joel-bluedata added a commit to bluedatainc/beats that referenced this pull request Jan 31, 2020
Need to be able to handle K8s label keys that include dots. Backporting this change from Beats 6.7: elastic#9939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Pull request is currently in progress. Metricbeat Metricbeat Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dedot Kubernetes labels and annotations
7 participants