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

configure emitter parameters from filter rewriteTag

Open chrono2002 opened this issue 11 months ago • 2 comments

Ability to set emitter parameters from filter rewriteTag. In addition to clusterfilter-only https://github.com/fluent/fluent-operator/pull/1069

None
apiVersion: fluentbit.fluent.io/v1alpha2
kind: Filter
metadata:
  labels:
    fluentbit.fluent.io/enabled: "true"
  name: filter
  namespace: namespace
spec:
  match: kube.*
  filters:
  - rewriteTag:
      emitterName: rewrite
      emitterStorageType: filesystem
      emitterMemBufLimit: 8MB
      rules:
      - $flow_tag msg $TAG[0].msg false

chrono2002 avatar Mar 15 '24 11:03 chrono2002

@chrono2002 you didn't use the make manifests to generate the CRDs, so your modifications will be deleted each time the make manifests command will be played

antrema avatar Apr 04 '24 05:04 antrema

@chrono2002 you didn't use the make manifests to generate the CRDs, so your modifications will be deleted each time the make manifests command will be played

Yeah, @chrono2002 you'll need to change the go struct definition first and the crd yamls are generated automatically by running:

make manifests
make generate
make fmt 
make vet
make docs-update

Here're some examples: https://github.com/fluent/fluent-operator/pull/1018 https://github.com/fluent/fluent-operator/pull/972

benjaminhuo avatar Apr 04 '24 12:04 benjaminhuo