---
apiVersion: v1
kind: ConfigMap
metadata:
  name: es-configmap
  namespace: logging
data:
  elasticsearch.yml: |
    cluster:
      name: ${CLUSTER_NAME}

    node:
      master: ${NODE_MASTER}
      data: ${NODE_DATA}
      name: ${NODE_NAME}
      ingest: ${NODE_INGEST}
      max_local_storage_nodes: ${MAX_LOCAL_STORAGE_NODES}

    processors: ${PROCESSORS:1}

    network.host: ${NETWORK_HOST}

    path:
      data: /data/data
      logs: /data/log

    bootstrap:
      memory_lock: ${MEMORY_LOCK}

    http:
      compression: true
      cors:
        enabled: ${HTTP_CORS_ENABLE}
        allow-origin: ${HTTP_CORS_ALLOW_ORIGIN}

    discovery:
      zen:
        ping.unicast.hosts: ${DISCOVERY_SERVICE}
        minimum_master_nodes: ${NUMBER_OF_MASTERS}

    xpack.license.self_generated.type: basic
    #xpack.security.enabled: false
    #xpack.monitoring.enabled: false
    xpack.ml.enabled: false

    cluster.routing.allocation.enable: all
    cluster.routing.rebalance.enable: all
    cluster.routing.allocation.allow_rebalance: all

