[Kubernetes - Metricbeat] Providing config option to disable Kubeadm config api requests#40086
Conversation
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
This pull request is now in conflicts. Could you fix it? 🙏 |
|
I have updated description and autodiscovery library to make use of use_kubeadm variable See comment elastic/elastic-agent-autodiscover#98 (comment) |
…i requests (#98) Related changes needed for elastic/beats#40086
|
This pull request is now in conflicts. Could you fix it? 🙏 |
|
This pull request is now in conflicts. Could you fix it? 🙏 |
|
This pull request is now in conflicts. Could you fix it? 🙏 |
|
@MichaelKatsoulis I added again the use_kubeadm option here Reason is that kubelet metricsets, proxy and scheduler make use of AddClusterECSMeta (like here) which is using finally the kubernetes config struct. I have repeated the tests and now works ok! |
|
@elastic/beats-tech-leads can I have a review here? The pr looks good and tested |
NOTE: Dont merge until elastic/elastic-agent-autodiscover#98 is also mergedThe elastic-agent-autodoscover library updated to v0.8.2
Proposed commit message
WHAT: Provide a configuration option to disable
/api/v1/namespaces/kube-system/configmaps/kubeadm-config. In more details user will disable the api requests to the modules he configures by using configurationuse_kubeadm: falseWHY: https://github.com/elastic/enhancements/issues/21172
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
elastic-package stack up -d -v --version=8.15.0-SNAPSHOTreplace github.com/elastic/elastic-agent-autodiscover => /Users/andreasgkizas/elastic/elastic-agent-autodiscovergo mod tidyuse_kubeadm: falseflag in your enabled modulesRelated issues
Screenshots
With 8.15.0 Image no changes:
We enable all metricsets (included events) and we have 85 API requests
With This repo code but the flag is
disable_kubeadm: falseWe enable all metricsets (included events) and we still have 85 API requests
With This repo code but the flag is disable_kubeadm: true`
We have no API requests after 10:04 that metrics collection established
{"log.level":"info","@timestamp":"2024-07-03T10:04:20.520Z","log.logger":"publisher_pipeline_output","log.origin":{"function":"github.com/elastic/beats/v7/libbeat/publisher/pipeline.(*netClientWorker).run","file.name":"pipeline/client_worker.go","file.line":145},"message":"Connection to backoff(elasticsearch(https://elasticsearch:9200)) established","service.name":"metricbeat","ecs.version":"1.6.0"}