# helm_charts_core-configmap.yaml
# This ConfigMap gets passed to all core cluster members to configure them.
# Take note that some networking settings like internal hostname still get configured
# when the pod starts, but most non-networking specific configs can be tailored here.
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "neo4j.coreConfig.fullname" . }}
data:
  NEO4J_ACCEPT_LICENSE_AGREEMENT: "{{ .Values.acceptLicenseAgreement }}"
  NEO4J_dbms_mode: CORE
  NUMBER_OF_CORES: "{{ .Values.core.numberOfServers }}"
  AUTH_ENABLED: "{{ .Values.authEnabled }}"
  NEO4J_dbms_default__database: "{{ .Values.defaultDatabase }}"
  NEO4J_causal__clustering_discovery__type: LIST
  NEO4J_dbms_connector_bolt_listen__address: 0.0.0.0:7687
  NEO4J_dbms_connector_http_listen__address: 0.0.0.0:7474
  NEO4J_dbms_connector_https_listen__address: 0.0.0.0:7473
  NEO4J_causal__clustering_initial__discovery__members: "{{ template "neo4j.fullname" . }}-core-0.{{ template "neo4j.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:5000,{{ template "neo4j.fullname" . }}-core-1.{{ template "neo4j.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:5000,{{ template "neo4j.fullname" . }}-core-2.{{ template "neo4j.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:5000"
  NEO4J_causal__clustering_minimum__core__cluster__size__at__formation: "3"
  NEO4J_causal__clustering_minimum__core__cluster__size__at__runtime: "2"
  NEO4J_dbms_jvm_additional: "-XX:+ExitOnOutOfMemoryError"
  {{- if .Values.useAPOC }}
  NEO4JLABS_PLUGINS: "[\"apoc\"]"
  NEO4J_apoc_import_file_use__neo4j__config: "true"
  NEO4J_dbms_security_procedures_unrestricted: "apoc.*"
  {{- end }}