allows disable pod events enrichment with deployment name#28521
allows disable pod events enrichment with deployment name#28521ChrsMark merged 9 commits intoelastic:masterfrom
Conversation
|
This pull request does not have a backport label. Could you fix it @newly12? 🙏
NOTE: |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
|
Pinging @elastic/integrations (Team:Integrations) |
|
@ChrsMark Thanks for reviewing this! |
|
This pull request is now in conflicts. Could you fix it? 🙏 |
| namespaceMetaGen = NewNamespaceMetadataGenerator(metaConf.Namespace, namespaceWatcher.Store(), namespaceWatcher.Client()) | ||
| } | ||
| metaGen := NewPodMetadataGenerator(cfg, podWatcher.Store(), podWatcher.Client(), nodeMetaGen, namespaceMetaGen) | ||
| metaGen := NewPodMetadataGenerator(cfg, podWatcher.Store(), podWatcher.Client(), nodeMetaGen, namespaceMetaGen, metaConf) |
There was a problem hiding this comment.
Can't you just pass the value of metaConf.Deployment as bool?
| if meta != nil { | ||
| // Use this in 8.0 | ||
| //out.Put("namespace", meta["namespace"]) | ||
| // out.Put("namespace", meta["namespace"]) |
There was a problem hiding this comment.
@MichaelKatsoulis this line looks like a leftover from other PR, shall we open a fixup PR to remove it?
| namespace MetaGen) MetaGen { | ||
| namespace MetaGen, | ||
| metaCfg *AddResourceMetadataConfig) MetaGen { | ||
| addDeploymentMeta := true |
There was a problem hiding this comment.
In combination with the previous suggestion you might can move this one layer up to GetPodMetaGen function.
|
|
||
| metaGen := metadata.NewResourceMetadataGenerator(cfg, watcher.Client()) | ||
| podMetaGen := metadata.NewPodMetadataGenerator(cfg, nil, watcher.Client(), nil, nil) | ||
| podMetaGen := metadata.NewPodMetadataGenerator(cfg, nil, watcher.Client(), nil, nil, &metadata.AddResourceMetadataConfig{Deployment: true}) |
There was a problem hiding this comment.
Can't we leverage the value from the configuration here instead of setting always to true?
There was a problem hiding this comment.
lol I was simply following same like the other arguments and meantime keep the same behavior like previous version. so current configuration doesn't have a section for namespace nor node, wondering if deployment should be added first there..
There was a problem hiding this comment.
in the later commit I still passed a true to this function for the comment. we can discuss more on how this one should be handled properly.
There was a problem hiding this comment.
Ah ok, I see! I think we can leave it as is for now and try to address it in general in another round. I will open an issue for this :).
# Conflicts: # libbeat/common/kubernetes/metadata/pod.go
|
@ChrsMark updated per your suggestion. |
3cf3c7c to
9c023bb
Compare
ChrsMark
left a comment
There was a problem hiding this comment.
lgtm! Thanks for contributing this!
|
/test |
|
@newly I see some lint errors, could you take a look? |
|
Maybe we could merge the latest upstream/master and check if it helps? |
|
CI passed, merging! Thank you @newly12 ! |
…in-the-package-binareis * upstream/master: allows disable pod events enrichment with deployment name (elastic#28521) Remove Docker input from Filebeat (elastic#28817) [breaking] Make default_field: false the default for all fields (elastic#28596) Osquerybeat: Improve osquery client connect code (elastic#28848) Add crawler metrics into the stats metricset for Enterprise Search (elastic#28790) Remove the now deprecated appsearch module from metricbeat (elastic#28850) Remove Beat generators (elastic#28816) chore: upload files to Google Storage when they exist (elastic#28836) Revert "chore(ci): disable E2E tests in Beats (elastic#28715)" (elastic#28812) Deprecate generating custom Beats (elastic#28814) [Metricbeat] upgrade flatbuffers to 1.12.1 (elastic#28094) Osquerybeat: Fix restart flags after previously bad config (elastic#28827) Force ECS and JSON logging for libbeat/logp (elastic#28573) Filebeat: Error on startup for unconfigured module (elastic#28818) Deprecate log input in favour of filestream (elastic#28623) Fix some spelling mistakes (elastic#28080)
…in-the-package-binareis * upstream/master: allows disable pod events enrichment with deployment name (elastic#28521) Remove Docker input from Filebeat (elastic#28817) [breaking] Make default_field: false the default for all fields (elastic#28596) Osquerybeat: Improve osquery client connect code (elastic#28848) Add crawler metrics into the stats metricset for Enterprise Search (elastic#28790) Remove the now deprecated appsearch module from metricbeat (elastic#28850) Remove Beat generators (elastic#28816) chore: upload files to Google Storage when they exist (elastic#28836) Revert "chore(ci): disable E2E tests in Beats (elastic#28715)" (elastic#28812) Deprecate generating custom Beats (elastic#28814) [Metricbeat] upgrade flatbuffers to 1.12.1 (elastic#28094) Osquerybeat: Fix restart flags after previously bad config (elastic#28827) Force ECS and JSON logging for libbeat/logp (elastic#28573) Filebeat: Error on startup for unconfigured module (elastic#28818) Deprecate log input in favour of filestream (elastic#28623) Fix some spelling mistakes (elastic#28080)
What does this PR do?
allows disable pod events enrichment with deployment name
Why is it important?
allows user to disable this enrichment due to the potential rate limit #28149
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs