apiVersion: v1
kind: ConfigMap
metadata:
  name: event-exporter-cfg
  namespace: monitoring
data:
  config.yaml: |
    route:
      routes:
        - match:
            - kind: "HorizontalPodAutoscaler"
              receiver: "event"
    receivers:
      - name: "event"
        webhook:
          endpoint: "http://ba.default.svc.cluster.local:3000/events"
          headers:
            User-Agent: "kube-event-exporter"
          streamName: "adaptionEvent"
          layout:
            endpoint: "localhost2"
            eventType: "kube-event"
            createdAt: "{{ .LastTimestamp.Time }}"
            details:
              message: "{{ .Message }}"
              reason: "{{ .Reason }}"
              tip: "{{ .Type }}"
              count: "{{ .Count }}"
              kind: "{{ .InvolvedObject.Kind }}"
              name: "{{ .InvolvedObject.Name }}"
              namespace: "{{ .Namespace }}"
              component: "{{ .Source.Component }}"
              host: "{{ .Source.Host }}"
              labels: "{{ toJson .InvolvedObject.Labels}}"

