Skip to content

K8s Processor: add ability to associate metadata tags using pod UID rather than just IP #1146

@pmm-sumo

Description

@pmm-sumo

Is your feature request related to a problem? Please describe.
The logs coming through fluentforward receiver can have pod_uid associated with them and no information about the IP address of the pod. This could be easily leveraged by adding capability to associate pod with the record using either IP address (as it is now) or Pod UID.

Describe the solution you'd like
Let the Kubernetes Processor cache metadata tags using Pod UID as key (similarly as it's done for IP - two maps could be used)

The name of the tag containing Pod UID can be defaulted to pod_uid and optionally made configurable, e.g. a new configuration entry might be added:

pod_uid_matching_labels - by default, [pod_uid]; if empty - no matching by Pod uid applied

Alternatively, taking into account #1079 and #1078, maybe a more streamlined configuration approach could be applied, e.g.

pod_association:
  ip:
    labels: [ip, k8s.pod.ip, host.hostname]
    connection_source_extraction_enabled: true
  uid:
    labels: [pod_uid]

Additional context

I have prepared a document that describes this in more context: https://docs.google.com/document/d/1QlFbXz0eQUaKXK1WrnEs3VqRkcPD2RAdXJdJMjnOSd8/edit#

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions