apiVersion: v1
kind: ConfigMap
metadata:
  name: logstash-{{ template "packetbeat.fullname" . }}-pipeline
data:
  packetbeat.conf: |
    input {
      redis {
        host => "localhost"
        key => "packetbeat"
        data_type => "list"
        codec => json
        batch_count => {{  .Values.logstashConfig.batchCount }}
        threads => {{  .Values.logstashConfig.threads }}
      }
    }

    output {
      elasticsearch {
        hosts => "elasticsearch:9200"
        manage_template => false
        index => "packetbeat-%{+YYYY.MM.dd}"
        document_type => "event"
        codec => json
        #user => logstash_internal
        #password => changeme
      }
    }
