fluent / fluent-bit

Fast and Lightweight Logs and Metrics processor for Linux, BSD, OSX and Windows
https://fluentbit.io
Apache License 2.0
5.84k stars 1.58k forks source link

Kubernetes Filter doesn't enrich logs with node labels data #9538

Open hawk-sergey-kurilo opened 6 days ago

hawk-sergey-kurilo commented 6 days ago

Is your feature request related to a problem? Please describe.

Kubernetes Filter doesn't enrich logs with k8s nodes labels data

Describe the solution you'd like

Would be nice to have node labels data in logs, not only hostname and pods metadata

Describe alternatives you've considered

AWS Metadata usage is not possible, it requires EC2 instance-metadata-tags option enabled, but it cannot be enabled because of tags format

Additional context

patrick-stephens commented 6 days ago

We added namespace support so nodes is probably useful too.

uristernik commented 5 days ago

As a workaround you can wrap the entrypoint with a script that gets these and exports them as environment variable. It would be way better to have it natively

patrick-stephens commented 5 days ago

As a workaround you can wrap the entrypoint with a script that gets these and exports them as environment variable. It would be way better to have it natively

A script? There's no shell in the distroless production images. An alternative would be a LUA filter that does it too.

uristernik commented 4 days ago

As a workaround you can wrap the entrypoint with a script that gets these and exports them as environment variable. It would be way better to have it natively

A script? There's no shell in the distroless production images. An alternative would be a LUA filter that does it too.

it's a hack more than anything... and yes, it requires shell with init container