apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "elastalert.fullname" . }}-config
  labels:
    app: {{ template "elastalert.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
data:
  elastalert_config: |-
    ---
    rules_folder: /opt/rules
    scan_subdirectories: false
    run_every:
      minutes: {{ .Values.runIntervalMins }}
    buffer_time:
      minutes: {{ .Values.bufferTimeMins }}
    es_host: {{ .Values.elasticsearch.host }}
    es_port: {{ .Values.elasticsearch.port }}
    writeback_index: {{ .Values.writebackIndex }}
    use_ssl: {{ .Values.elasticsearch.useSsl }}
    alert_time_limit:
      days: 2
