Filebeat not able to get k8s namespace annotations

Hello,
I noticed a potential issue with filebeat. I'm trying to add some annotations to the log messages and I noticed that filebeat is not able to get namespace annotations from kubernetes cluster. Pod annotations are working fine. Here is my minimal config:

filebeat.autodiscover:
  providers:
    - type: kubernetes
      hints.enabled: true
      include_annotations: ["kubernetes.io/psp", "leanix.net/fact-sheet"]

output.file:
  path: /tmp/filebeat
  filename: filebeat

Expected result in this case should be a json object with the following field

    "annotations": {
      "kubernetes_io/psp": "restricted-gitvolume",
      "leanix.net/fact-sheet": "some-value"
    }

Instead of that I get this output

    "annotations": {
      "kubernetes_io/psp": "restricted-gitvolume"
    }

Can you please verify my configuration? I'm not sure whether this is a filebeat issue or I configured it wrong.
Thank you

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.