weaveworks / weave-gitops-private

This is for tracking weaveworks internal information on weave-gitops. Will include issues, internal roadmaps, etc.
2 stars 4 forks source link

create RFC 0004 for fluent-bit #100

Closed chanwit closed 1 year ago

chanwit commented 1 year ago

Closes https://github.com/weaveworks/weave-gitops/issues/3195

This RFC proposes the integration of Fluent-Bit into Weave GitOps as a log forwarder to collect logs from all pods in a VCluster. Fluent-Bit is written in C/C++ and is lightweight compared to FluentD, which is written in Ruby.

It will be installed using Helm and configured to read logs from all containers in the /var/log/containers/ directory, apply the kubernetes filter to merge and exclude relevant log lines, and output the logs to an S3 bucket. An API will also be created to allow users to retrieve logs by pod name and namespace. The storage type and log retention policy for the S3 bucket will be considered, and appropriate documentation will be created for other users and maintainers.

makkes commented 1 year ago

A few thoughts that came up when I read the RFC:

chanwit commented 1 year ago

@makkes Thank you for the review. Let's discuss with @JamWils about the scope of this log aggregation mechanism. That's the product question.

if we ship fluent-bit as part of the product we will be responsible for supporting it, too.

We integrated vcluster as one of our components. We also use many libraries as part of the OSS. That's a fact for now.

JamWils commented 1 year ago

if we ship fluent-bit as part of the product we will be responsible for supporting it, too.

No, this does not mean we support fluent-bit. This is a technical solution to do log aggregation in gitops run. It is enabling a product feature similar to vCluster and React. I don't think we support fluent-bit, but we support that the logs aggregate appropriately.

Putting my engineering manager hat on, if we get a quick win of aggregating logs with fluent-bit and don't have to write our own aggregator then I think that is a huge win. From a product perspective, we need a dynamic log system. If there are multiple apps then we want to show the logs for all of those, we also want to show the logs of the various controllers we have deployed, etc. If fluent-bit can do this (I believe it can) then we should consider adopting this technology.

I hope that helps, if we need to set up a meeting to discuss then I am happy to.

If we want to make use of fluent-bit for the GitOps Run use case, we should clearly point that out in the RFC and tighten the scope of it to that specific use case.

Agreed!

chanwit commented 1 year ago

If fluent-bit can do this (I believe it can) then we should consider adopting this technology.

According to the spike outcomes, yes it can do that.

If we want to make use of fluent-bit for the GitOps Run use case, we should clearly point that out in the RFC and tighten the scope of it to that specific use case.

Agreed!

Acked. I'll scope this RFC down to the use case.

enekofb commented 1 year ago

@makkes @chanwit this seems a good candidate to share with tech leads in our tuesday catchup?

makkes commented 1 year ago

@makkes @chanwit this seems a good candidate to share with tech leads in our tuesday catchup?

I added an item to the backlog at https://www.notion.so/weaveworks/7f5bdf188d0a4a84a583935bbce69a8a?v=091591e0b8f04b03bd4243197e22c6eb.

chanwit commented 1 year ago

Hi all,

I got this RFC updated. Please let me know if you have any comments.