apiVersion: v1
kind: ConfigMap
metadata:
  name: elk-es-config
  namespace: pks
  labels:
    app: elk-es
data:
  elasticsearch.yml: |
    cluster.name: ${CLUSTER_NAME}
    cluster.remote.connect: ${CLUSTER_REMOTE_CONNECT}
    discovery.seed_hosts: ${DISCOVERY_SERVICE}

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

    network.host: ${NETWORK_HOST}

    path.data: ${ES_HOME}/data
    path.logs: ${ES_HOME}/logs
    path.repo: ${ES_HOME}/backup

    bootstrap.memory_lock: ${MEMORY_LOCK}

    http.port: ${HTTP_PORT}
    transport.port: ${TCP_PORT}

    http.compression: true
    http.cors.enabled: ${HTTP_CORS_ENABLE}
    http.cors.allow-origin: ${HTTP_CORS_ALLOW_ORIGIN}
    http.pipelining.max_events: ${PIPELINE_MAX_EVENTS}

    gateway.expected_nodes: ${GATEWAY_EXPECTED_NODES}
    gateway.recover_after_nodes: ${GATEWAY_NODES_RECOVERY}

    thread_pool.write.queue_size: ${THREAD_POOL_WRITE_QUEUE_SIZE}
    cluster.max_shards_per_node: ${MAX_SHARDS_PER_NODES}
