fluent / fluent/fluent-bit

filter_kubernetes: support owner ownerReference

Open
#9,631 0 comments 2 reactions 0 assignees View on GitHub
community-feedback enhancement
Dominant language
C
Stars
8.1k
Forks
2k
Avg merge
4d 20h
Merged PRs (30d)
71

Description

**Is your feature request related to a problem? Please describe.**
There is a new use case in GKE logging where owner reference data are needed in the labels field in LogEntry[1]. There is a need to retrieve owner reference data from kubernetes filter.

[1]https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

**Describe the solution you'd like**
Add a new configuration parameter `OwnerReferences`, which defaults to `Off`. When enabled, the OwnerReferences information will added to records["kubernetes"]["ownerReferences"] and it contains two new key-value pairs.

```
"kind": "DaemonSet",
"name": "fluentbit-xxx-max",
```

![image](https://github.com/user-attachments/assets/1d24fa3e-963f-43b1-ad9b-3d770f9b6bcc)

OwnerReference data will be added for five k8s workloads: 'DaemonSet`, `StatefulSet`, `ReplicaSet`, `Job` and `CronJob`.

**Describe alternatives you've considered**
N/A

**Additional context**

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.