apiVersion: v1
kind: ConfigMap
metadata:
  namespace: imxc
  name: elasticsearch-config
  labels:
    app: elasticsearch
data:
# discovery.seed_hosts: ["elasticsearch-0.elasticsearch", "elasticsearch-1.elasticsearch", "elasticsearch-2.elasticsearch"]
# cluster.initial_master_nodes: ["elasticsearch-0","elasticsearch-1", "elasticsearch-2"]
# ES_JAVA_OPTS: -Xms8g -Xmx8g
  elasticsearch.yml: |
    cluster.name: imxc-elasticsearch-cluster
    network.host: ${POD_NAME}
    discovery.seed_hosts: ["elasticsearch-0.elasticsearch", "elasticsearch-1.elasticsearch"]
    cluster.initial_master_nodes: ["elasticsearch-0","elasticsearch-1"]
    xpack.ml.enabled: false
    xpack.security.enabled: true
    xpack.security.transport.ssl.enabled: true
    xpack.security.transport.ssl.verification_mode: certificate
    xpack.security.transport.ssl.client_authentication: required
    xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
    xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
    xpack.security.transport.filter.enabled: true
    xpack.security.transport.filter.allow: _all
    xpack.security.http.ssl.enabled: true
    xpack.security.http.ssl.keystore.path: http.p12
    node.ml: false
    cluster.routing.rebalance.enable: "all"
    cluster.routing.allocation.allow_rebalance: "indices_all_active"
    cluster.routing.allocation.cluster_concurrent_rebalance: 2
    cluster.routing.allocation.balance.shard: 0.3
    cluster.routing.allocation.balance.index: 0.7
    cluster.routing.allocation.balance.threshold: 1
    cluster.routing.allocation.disk.threshold_enabled: true
    cluster.routing.allocation.disk.watermark.low: "85%"
    cluster.routing.allocation.disk.watermark.high: "90%"
    cluster.routing.allocation.disk.watermark.flood_stage: "95%"
    thread_pool.write.queue_size: 1000
    thread_pool.write.size: 2
  ES_JAVA_OPTS: -Xms8g -Xmx8g
