apiVersion: v1
kind: ConfigMap
metadata:
  name: elasticsearch
  labels:
    app: elasticsearch
    stack: efk
data:
  elasticsearch.yml: |
    cluster.name: efk-cluster
    node:
      name: efk-node-1
      master: true
      data: true
      ingest: true
      max_local_storage_nodes: 1
    path:
      data: /usr/share/elasticsearch/data
      logs: /usr/share/elasticsearch/log
    bootstrap.memory_lock: true
    search.remote.connect: false
    network.host: _site_
    http:
      enabled: true
      host: 0.0.0.0
      port: 9200
    transport:
      host: 0.0.0.0
      tcp:
        port: 9300
    discovery:
      type: single-node
      #zen:
      #  minimum_master_nodes: 1
      #  ping:
      #    unicast:
      #      hosts: elasticsearch.$NAMESPACE.svc
    xpack.security.enabled: true
    xpack.security.audit.enabled: false
    xpack.security.http.ssl.enabled: false
    xpack.security.transport.ssl.enabled: false
    xpack.monitoring.enabled: true
    xpack.monitoring.collection.enabled: true
    xpack.ml.enabled: false
    xpack.watcher.enabled: false
  log4j2.properties: |
    status = error

    appender.console.type = Console
    appender.console.name = console
    appender.console.layout.type = PatternLayout
    appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n

    rootLogger.level = info
    rootLogger.appenderRef.console.ref = console
    rootLogger.action = debug
