Avoid Pod/container duplicates or missmatch #21842
Labels
Agent
discuss
Issue needs further discussion.
enhancement
Team:Platforms
Label for the Integrations - Platforms team
v7.11.0
Composable inputs will launch an input per matching entity from the provider, if the resulting input configuration is different. Kubernetes provider is providing an entity per container in the cluster. This means that for every container in every Pod we will emit an event from the provider.
For the logs use case we want that, as containers log to separate files, this also allow us to provide more specific metadata (
kubernetes.container.name
), so users are able to differentiate their logs streams per container.For metrics sometimes it's not possible to differentiate the container within the pod, as we are reaching them through the Pod IP, which is shared by all containers. This is fine in principle, when you only use
kubernetes.pod.ip
dynamic inputs should be able to generate the same config from several events (one per container in the pod). The problem right now is that these several events have different metadata (kubernetes.container.name
) and this spawns in several instances of the input.Also, we don't really want to add container metadata, as we don't know which container we are talking with. That's why the kubernetes provider also submits an event with Pod info only:
beats/x-pack/elastic-agent/pkg/composable/providers/kubernetes/kubernetes.go
Lines 104 to 113 in f8ff7ce
We need to discuss our options to avoid this duplication, right now, metadata is the one causing it, I wonder if we should take it out of the algorithm removing duplicates, to only add it after reconciliation.
The text was updated successfully, but these errors were encountered: