fluent / fluent-operator

Operate Fluent Bit and Fluentd in the Kubernetes way - Previously known as FluentBit Operator
Apache License 2.0
587 stars 250 forks source link

namespaced tag re_emitter parameters support #1085

Closed chrono2002 closed 8 months ago

chrono2002 commented 8 months ago

Adds parameters to fine-tune namespaced tag re_emitter. Same as: https://github.com/fluent/fluent-operator/pull/1069 but for namespaced filters. Fixes issues with emitter pause on overflow.

None
Usage:

apiVersion: fluentbit.fluent.io/v1alpha2
kind: FluentBitConfig
metadata:
  name: fluent-bit-config
  labels:
    app.kubernetes.io/name: fluent-bit
spec:
  filterSelector:
    matchLabels:
      fluentbit.fluent.io/enabled: "true"
  outputSelector:
    matchLabels:
      fluentbit.fluent.io/enabled: "true"
  parserSelector:
    matchLabels:
      fluentbit.fluent.io/enabled: "true"
  service:
    emitterName: test
    emitterStorageType: filesystem
    emitterMemBufLimit: 16MB

generates config like this:

[Filter]
    Name    rewrite_tag
    Match    kube.*
    Rule    $kubernetes['namespace_name'] ^(test)$ 5236c06addf811b0eaf2fabbd31c89f2.$TAG false
    Emitter_Name    test
    Emitter_Storage.type    filesystem
    Emitter_Mem_Buf_Limit    16MB