elastic / elastic/beats

[META Issue]Enhancement for being able to toggle the kubeadm-config api calls

Open
#40,276 8 comments 0 reactions 1 assignee Claimed by @gizas View on GitHub
Team:obs-ds-hosted-services
Dominant language
Go
Stars
12.7k
Forks
5k
Avg merge
2d 15m
Merged PRs (30d)
385

Description

This is the META issue that will summarise all the needed sub issues that are needed in order to be able to disable the /api/v1/namespaces/kube-system/configmaps/kubeadm-config API calls through configuration.

The relevant enhancement was raised here: https://github.com/elastic/enhancements/issues/21172
See this issue for more details

The enhancement finally needs to be available in the elastic agent when users install the Kubernetes Integration. Additional we note that the kubeadm config calls are being made both as part of log collection process start and as metrics collection starts.

So in more details the task list is:

### Tasks
- [x] **[Metricbeat Enhancememt]**: Issue to disable the kube-adm calls in metricbeat. https://github.com/elastic/beats/pull/40086
- [x] [**Filebeat autodiscover Enhancememt]**: Issue to disable the kube-adm calls when [autodiscover](https://github.com/elastic/beats/blob/main/deploy/kubernetes/filebeat-kubernetes.yaml#L133) is configured in **filebeat**. This specific issue needs to be implemented on kubernetes provider. Respectively the pod, node and service have eg [PodMetadataGenerator](https://github.com/elastic/beats/blob/main/libbeat/autodiscover/providers/kubernetes/pod.go#L149) that finally calls the [getClusterInfoFromKubeadmConfigMap](https://github.com/elastic/elastic-agent-autodiscover/blob/main/kubernetes/metadata/metadata.go#L145) that is responsible to make those calls https://github.com/elastic/beats/pull/40301
- [x] **[Filebeat Input Enhancememt]**: Issue to disable the kube-adm calls when [filestream input](https://github.com/elastic/beats/blob/main/deploy/kubernetes/filebeat-kubernetes.yaml#L114-L131) is configured. In this case check if relevant api calls are made: Issue was covered in https://github.com/elastic/beats/pull/40301
- [ ] [**Elastic Agent Enhcanement]**: Issue that is needed to make available in the Elastic Agent policy of kubernetes integration all the config options introduced from previous issues, from filebeat and metricbeat. We will need to make checks with metrics and logs ingestion enabled, to check whether the API calls are minimised: https://github.com/elastic/integrations/pull/11187

**NOTES:**
- In elastic agent the add_kubernetes_metadata processor starts by default and is not configurable
- In case Fleet Elastic Agent needs to configure the kubernetes provider, we will use the following installation method: https://www.elastic.co/guide/en/fleet/current/advanced-kubernetes-managed-by-fleet.html#_step_2_create_a_new_configmap

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.