fluent-bit icon indicating copy to clipboard operation
fluent-bit copied to clipboard

Namespace support for fluentbit.io/exclude annotation

Open ialidzhikov opened this issue 6 years ago • 15 comments

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

Currently fluentbit.io/exclude annotation works only with pods. We have a scenario in which we want to ignore all of the pods in given namespaces. Putting fluentbit.io/exclude annotation to each pod is overhead and it will lead to restart (the old pod will be evicted and a new pod with the given annotation will be launched).

Describe the solution you'd like

It would be great if we can annotate namespace with fluentbit.io/exclude: true and fluent-bit stops to track the pods in this namespace.

Describe alternatives you've considered

Additional context

fluent-plugin-kubernetes_metadata_filter for Fluentd also reads the namespace labels and annotations.

ialidzhikov avatar Feb 26 '19 10:02 ialidzhikov

Any updates?

16g avatar Apr 06 '21 15:04 16g

Hi all, any updates on this issue, I would like to see this feature in a fluent bit, it'll be very convenient to have this rather than doing multiple filters to achieve this.

surajnarwade avatar Apr 09 '21 10:04 surajnarwade

@edsiper any feedback about this?

pierluigilenoci avatar Apr 12 '21 10:04 pierluigilenoci

Hi all, wondering if there's any update on this, or if anyone came across a workaround for it? Thanks

envybee avatar Jun 02 '21 03:06 envybee

Hi, wondering if there's any update on this ?

rameca231190 avatar Jun 23 '21 16:06 rameca231190

@edsiper @niedbalski is there any chance of receiving feedback regarding this issue?

pierluigilenoci avatar Jun 24 '21 06:06 pierluigilenoci

This would be amazing.

ypicard avatar Oct 21 '21 04:10 ypicard

@edsiper @niedbalski any news?

pierluigilenoci avatar Oct 25 '21 09:10 pierluigilenoci

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

github-actions[bot] avatar Jan 28 '22 01:01 github-actions[bot]

anyone?

evgkrsk avatar Jan 28 '22 02:01 evgkrsk

@edsiper could you please take a look to this?

pierluigilenoci avatar Jan 28 '22 10:01 pierluigilenoci

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

github-actions[bot] avatar Apr 29 '22 02:04 github-actions[bot]

@edsiper could you please take a look to this?

pierluigilenoci avatar May 03 '22 08:05 pierluigilenoci

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

github-actions[bot] avatar Aug 02 '22 02:08 github-actions[bot]

@edsiper could you share your opinion about it?

pierluigilenoci avatar Aug 02 '22 10:08 pierluigilenoci

This is really needed, otherwise we end up having large amount of filters...

dmpe avatar Oct 12 '22 16:10 dmpe

Any update on this feature

srmars avatar Nov 17 '22 16:11 srmars

would be nice if there would be a feature for it, dealing with all the filters isn't optimal especially once trying to template it all

dunkelbunt1 avatar Dec 01 '22 11:12 dunkelbunt1

@edsiper @koleini @fujimotos @PettitWesley @clamoriniere @sxd @niedbalski who should we ask for feedback on this?

pierluigilenoci avatar Dec 01 '22 11:12 pierluigilenoci

Maybe @nokute78 @leonardo-albertovich @patrick-stephens @pwhelan @cosmo0920 @DavidKorczynski @tarruda ?

pierluigilenoci avatar Dec 01 '22 11:12 pierluigilenoci

A much-needed functionality. The current addition of fluentbit.io/exclude is very complicated and difficult to implement with a large number of pods. With hundreds of pods it is very difficult. Please add exclude for namespace very much.

gitkr999 avatar Dec 05 '22 09:12 gitkr999

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

github-actions[bot] avatar Mar 06 '23 02:03 github-actions[bot]

@edsiper it seems incredible that such a requested feature has little feedback from the maintainers.

pierluigilenoci avatar Mar 06 '23 09:03 pierluigilenoci

It would be good if we took a few steps back and switched to a more constructive approach don't you think?

I am not familiar with the topic but would be glad to help if anyone submitted a PR or at least a detailed enhancement proposal to steer this into the right direction.

leonardo-albertovich avatar Mar 06 '23 11:03 leonardo-albertovich

@leonardo-albertovich indeed, patiently waiting 1469 days to get feedback from one of the maintainers on the feasibility of the feature request is an undesirable attitude.

A thousand days ago, it would have been enough to write something like: "Guys, a nice idea! Unfortunately, we maintainers can't develop this feature. But anyone who feels able to do so can open a PR, and we'll be happy to review it".

pierluigilenoci avatar Mar 06 '23 16:03 pierluigilenoci

Is anyone working on a PR for this soo much-needed feature? I would like to help.

chrismedinapy avatar Aug 09 '23 21:08 chrismedinapy

@chrismedinapy I estimate that no one is working on it. So if you want to do it, it is certainly welcome.

pierluigilenoci avatar Aug 10 '23 12:08 pierluigilenoci

any news here?

HaveFun83 avatar Jan 30 '24 12:01 HaveFun83

So, what would be the best "workaround" today to solve this problem?

I found the following so far but none of them are good enough for complex envs:

  • add the annotation to each pod (I guess, this could be "automated" by a mutation controller for given namespaces). This cannot handle cases when you have multiple outputs (like we have syslog and ES) and you want to be able to select which one to use
  • exclude the namespaces from tail with Exclude_Path. The INPUT is not the right place to exclude things again as with 2 outputs, you cannot "select" where to send the logs (on top of this, It would be difficult to automate this)

Question for more advanced users then me: would it be possible to write a filter that adds an extra tag based on namespace annotations to the logs that then can be filtered on the output level with Match_Regex?

Cajga avatar Mar 15 '24 07:03 Cajga

Namespace annotations/labels will be available in FB 3.0 from the K8S filter so @Cajga that may be possible.

patrick-stephens avatar Mar 15 '24 10:03 patrick-stephens