resmoio / kubernetes-event-exporter

Export Kubernetes events to multiple destinations with routing and filtering
Apache License 2.0
753 stars 149 forks source link

Advice on dropping events #186

Open sivarama-p-raju opened 2 months ago

sivarama-p-raju commented 2 months ago

Hi,

Please note that I have a requirement of dropping specific events and only dump the remaining events onto stdout.

Below is my configuration:

  route:
    routes:
      - match:
        - receiver: "dump"
        drop:
          - reason: "PolicyViolation"
          - reason: "PolicyApplied"
          - kind: "CronJob"
          - kind: "CertificateRequest"
          - kind: "Job"

With the above configuration, the events with reason as "PolicyViolation" and "PolicyApplied" are dropped. However, the rest with "kind" are not dropped.

If I now add the below under "drop:", then all events are dropped and nothing appears on stdout

        - name: "mqtt-producer*"

Did I get this completely wrong ?

Is there some documentation that shows how to correctly drop specific events (also with wildcards) ? I searched for the same but could not find it.

Thanks a lot in advance.

Thanks and regards, Sivarama Raju P