apiVersion: v1
kind: ConfigMap
metadata:
  namespace: elk
  name: es-config
  labels:
    app: elasticsearch
data:
  elasticsearch.yml: |
    cluster.name: esdb
    network.host: "0.0.0.0"
    bootstrap.memory_lock: false
    discovery.zen.ping.unicast.hosts: elasticsearch-cluster
    discovery.zen.minimum_master_nodes: 1
    xpack.security.enabled: false
    xpack.monitoring.enabled: true
    xpack.security.audit.enabled: false
    node.max_local_storage_nodes: 10
    ## To enable security need to set xpack parameters to true and use the example below
    #xpack:
    #  security:
    #    authc:
    #      realms:
    #        file1:
    #          type: file
    #          order: 0
    #          authentication.enabled: true
            #ldap1:
            #  type: ldap
            #  order: 1
            #  url: "ldap://ldap.example.local:389"
            #  bind_dn: "cn=users,cn=accounts"
            #  bind_password: ""
            #  user_search:
            #    base_dn: "dc=example,dc=local"
            #    filter: "(&(objectClass=organizationalperson)(!(nsaccountlock=*)))"
            #  group_search:
            #   base_dn: "dc=example,dc=local"
            #  files:
            #    role_mapping: "/usr/share/elasticsearch/config/role_mapping.yml"
            #  unmapped_groups_as_roles: true
  ES_JAVA_OPTS: -Xms256m -Xmx256m #For production server the heap size has to be increased
