apiVersion: v1
kind: ConfigMap
metadata:
  name: es-configmap
  namespace: elasticsearch
data:
  kibana.yml: |
    # Default Kibana configuration from kibana-docker.
    server.name: kibana
    server.host: "0"
    elasticsearch.hosts: http://elasticsearch.elasticsearch:9200
  elasticsearch.yml: |
    cluster.name: "docker-cluster"
    network.host: 0.0.0.0
    #discovery.zen.minimum_master_nodes: 1
    discovery.type: single-node
    path.repo: ["/usr/share/elasticsearch"]
  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
    rootLogger.com.amazonaws = warn
  apm-server.yml: |
    apm-server:
      host: "0.0.0.0:8200"
      rum:
        enabled: true
        allow_origins: ['*']
      kibana:
        enabled: true
        host: "kibana.elasticsearch:5601"
    output.elasticsearch:
      enabled: true
      hosts: ["elasticsearch.elasticsearch:9200"]
    monitoring.enabled: true
    monitoring.elasticsearch:
      hosts: ["elasticsearch.elasticsearch:9200"]

