apiVersion: v1
kind: ConfigMap
metadata:
  name: event-exporter-cfg
  namespace: monitoring
data:
  config.yaml: |
    logLevel: debug
    logFormat: json
    route:
      routes:
        - match:
            - receiver: "dump"
    receivers:
      - name: "dump"
        elasticsearch:
          hosts:
            - https://elk-es-http.elastic:9200
          index: kube-events
          # Ca be used optionally for time based indices, accepts Go time formatting directives
          #indexFormat: "kube-events-{2006-01-02}"
          username: "elastic"
          password: "#{ENV['FLUENT_ELASTICSEARCH_PASSWORD']}"
          #password: "Zs6JZK4U27WTK4O2o558aa3t"
          #cloudID: # optional
          #apiKey: # optional
          # If set to true, it allows updating the same document in ES (might be useful handling count)
          useEventID: false
          # Type should be only used for clusters Version 6 and lower.
          # type: kube-event
          # If set to true, all dots in labels and annotation keys are replaced by underscores. Defaults false
          deDot: false
          layout: # Optional
          tls: # optional, advanced options for tls
            insecureSkipVerify: true
               #|false # optional, if set to true, the tls cert won't be verified
            #serverName: # optional, the domain, the certificate was issued for, in case it doesn't match the hostname used for the connection
            #caFile: # optional, path to the CA file of the trusted authority the cert was signed with 

