Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

enable opt-in K8s logging exclusion for fluent-bit #1025

Merged
merged 1 commit into from
Jul 12, 2021
Merged

enable opt-in K8s logging exclusion for fluent-bit #1025

merged 1 commit into from
Jul 12, 2021

Conversation

LukeWinikates
Copy link
Contributor

What this PR does / why we need it

The fluent-bit Kubernetes filter provides an option for excluding pods from fluent-bit's log collection. This PR enables this option by default, allowing the fluent-bit pods themselves to be excluded from log collection.

https://docs.fluentbit.io/manual/pipeline/filters/kubernetes

This is important for the OOTB install experience for the fluent-bit package. By default, all logs are written to STDOUT on the fluent-bit pod, unless the user customizes the fluent-bit install to point to another service, such as ElasticSearch, Loki, or Syslog. By excluding the logs from the fluent-bit pods themselves from log collection, we avoid an infinite logging loop where the fluent-bit pods would ingest their own log output and output it back again.

The pods in the DaemonSet are already annotated appropriately for exclusion from log ingestion, but we missed the required K8S-Logging.Exclude flag when we investigated this previously.

@LukeWinikates
Copy link
Contributor Author

I think maybe this build failure is spurious, but please let me know if I'm wrong about that.

Copy link
Contributor

@akodali18 akodali18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@stmcginnis stmcginnis merged commit 6ab6365 into vmware-tanzu:main Jul 12, 2021
@stmcginnis stmcginnis deleted the fluent-bit-logging-exclusion branch July 12, 2021 17:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants