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

Kustomize base for fluent-bit #90

Open
wants to merge 59 commits into
base: master
Choose a base branch
from
Open

Conversation

solsson
Copy link
Contributor

@solsson solsson commented Aug 10, 2021

I've gone through the PRs filed since I participated in early yaml work here, and unsurprisingly the duplication is a maintenance problem. I think Kustomize is a good fit for eleminating that duplication.

Log processing is prone to heavy customization. I see a few use cases for this repo:

  • Examples of how to run in Kubernetes.
  • A quick start for common dev environments.
  • A base for actual production setups, where key parts are overridden with in-house config.

A Kustomize base that in itself isn't functional is a good start for all three of them. Operators and stack-specific helm charts like Grafana's may be more widely used for production, but if we can avoid duplication in this repo it IMO offers a straightforward way for the community to share experiences.

DrMavenRebe and others added 27 commits December 28, 2018 11:38
Remove a duplicate line.
Signed-off-by: Julien Vincent <[email protected]>
Signed-off-by: Harrison Heck <[email protected]>
Signed-off-by: David J. M. Karlsen <[email protected]>
It's safe to add apps/v1 to Daemonset as it's stable from 1.9, Which I think almost all are.

Signed-off-by: rjshrjndrn <[email protected]>
…to reference Kafka version

Signed-off-by: Igor Yankovsky <[email protected]>
This reverts commit a6ec71d.
kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
Invdividually overridable files, using "behavior: merge"

Note that with "disableNameSuffixHash: false" (the default)
we can roll back configuration changes.
and prefixed by the tag we document what we pulled
solsson added a commit to Yolean/unhelm that referenced this pull request Aug 10, 2021
Displaying unparsed log entries using
kubectl apply -k base; kubectl rollout status daemonset fluent-bit; kubectl logs -f -l app.kubernetes.io/name=fluent-bit

Issues like fluent#88 and fluent/fluent-bit#1902 (comment)
indicate that depending on /var/log/containers symlinks cause
quite a few issues.

/var/log/pods/ is the path stated in
https://github.com/kubernetes/kubernetes/blob/v1.22.0/pkg/kubelet/kuberuntime/kuberuntime_manager.go#L63
and I've verified on GKE cos-containerd, GKE ubuntu-dockerd and k3s
that the path contains the actual files, not symliks.

Also using /var/log/pods makes it trivial to exclude logs from any
container named fluent-bit. Doing so reduces the risk of endless log loops.
I find no benefits with the stricter regexes used in most examples,
as long as paths are well defined.
Looks like the default format of the file output plugin
@solsson
Copy link
Contributor Author

solsson commented Aug 11, 2021

I find the test-logger deployment from https://github.com/GoogleCloudPlatform/community/tree/master/tutorials/kubernetes-engine-customize-fluentbit really useful for developing a pipeline.

solsson added 23 commits August 11, 2021 15:46
which helps human consumption when log records are json
from tcp_transport.go:313

Use PodMonitor etc. instead.
examples but I think they are two extremes where the former requires
custom parsing to be fully useful and the latter makes no case for
the Fluentbit data pipeline at all without a consuming step.
About the "toil" image, grafana/logcli doesn't have curl and I
wanted to provide an example of how to consume logs from Loki.

We echo out the logcli commands instead and do everything with curlimages/curl
@solsson solsson changed the title WIP Kustomize base for fluent-bit Kustomize base for fluent-bit Aug 15, 2021
@solsson
Copy link
Contributor Author

solsson commented Aug 15, 2021

Work is complete, but obviously needs validation by others. A merge to master would affect online docs which I suppose is quite an undertaking.

It's been interesting to see how far across blogs and helm charts my early yaml from this repo has proliferated. For example when researching I've seen the unconventional volume name varlogcontainers in many places and the mistaken duplicate "wildcard tolerations" quite a few times 😄.

I think this PR meets its three goals (above). I'll keep it as default branch in https://github.com/Yolean/fluent-bit-kubernetes-logging for easy access to example yaml, regardless if some of this work is merged or not. We're upgrading our production setup, which had degraded quite a bit, to use the online base.

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.

8 participants