apiVersion: v1
kind: ConfigMap
metadata:
  name: filebeatconf
data:
  filebeat.yml: |-
    filebeat.inputs:
    - input_type: log
      paths:
        - /data/log/*/*.log
      tail_files: true
      fields:
        pod_name: '${podName}'
        pod_ip: '${podIp}'
        pod_deploy_name: '${podDeployName}'
        pod_namespace: '${podNamespace}'
      tags: [app-filebeat] 
    output.kafka:
      hosts: ["kafka.middleware:9092"]
      topic: "app-filebeat"
      codec.json:
        pretty: false
      keep_alive: 30s
