From 031ee3e6afafd3e554b92cbc8b69f9f8414260fa Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Mon, 6 May 2019 12:44:51 -0500 Subject: [PATCH] Elasticsearch: Heap configuration and ingest node updates This updates the Elasticsearch chart to allow for setting the heap size per node type instead of for all nodes equally. This also adds the required environment variable to configure whether a node is an ingest node. This is set to false, as suggested for elasticsearch versions <= 6.x This also removes the ES_PLUGINS_INSTALL environment variable as it is not used for anything in the current charts Change-Id: I9096774db46dcbcd48b8a5448f0510984bf4108f --- elasticsearch/templates/deployment-client.yaml | 6 +++--- elasticsearch/templates/deployment-master.yaml | 6 +++--- elasticsearch/templates/statefulset-data.yaml | 6 +++--- elasticsearch/values.yaml | 6 +++++- tools/deployment/armada/manifests/armada-lma.yaml | 5 ++++- tools/deployment/multinode/120-elasticsearch.sh | 5 ++++- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/elasticsearch/templates/deployment-client.yaml b/elasticsearch/templates/deployment-client.yaml index df82fee0b..5e6828975 100644 --- a/elasticsearch/templates/deployment-client.yaml +++ b/elasticsearch/templates/deployment-client.yaml @@ -176,6 +176,8 @@ spec: fieldPath: metadata.name - name: NODE_MASTER value: "false" + - name: NODE_INGEST + value: "false" - name: NODE_DATA value: "false" - name: HTTP_ENABLE @@ -183,9 +185,7 @@ spec: - name: DISCOVERY_SERVICE value: {{ tuple "elasticsearch" "discovery" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - name: ES_JAVA_OPTS - value: "{{ .Values.conf.elasticsearch.env.java_opts }}" - - name: ES_PLUGINS_INSTALL - value: "elasticsearch-s3" + value: "{{ .Values.conf.elasticsearch.env.java_opts.client }}" volumeMounts: - name: pod-tmp mountPath: /tmp diff --git a/elasticsearch/templates/deployment-master.yaml b/elasticsearch/templates/deployment-master.yaml index 3b72732d0..c853ad98a 100644 --- a/elasticsearch/templates/deployment-master.yaml +++ b/elasticsearch/templates/deployment-master.yaml @@ -131,6 +131,8 @@ spec: fieldPath: metadata.name - name: NODE_MASTER value: "true" + - name: NODE_INGEST + value: "false" - name: NODE_DATA value: "false" - name: HTTP_ENABLE @@ -138,9 +140,7 @@ spec: - name: DISCOVERY_SERVICE value: {{ tuple "elasticsearch" "discovery" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - name: ES_JAVA_OPTS - value: "{{ .Values.conf.elasticsearch.env.java_opts }}" - - name: ES_PLUGINS_INSTALL - value: "elasticsearch-s3" + value: "{{ .Values.conf.elasticsearch.env.java_opts.master }}" volumeMounts: - name: pod-tmp mountPath: /tmp diff --git a/elasticsearch/templates/statefulset-data.yaml b/elasticsearch/templates/statefulset-data.yaml index dff7aa09f..6ba0fc94a 100644 --- a/elasticsearch/templates/statefulset-data.yaml +++ b/elasticsearch/templates/statefulset-data.yaml @@ -131,16 +131,16 @@ spec: fieldPath: metadata.name - name: NODE_MASTER value: "false" + - name: NODE_INGEST + value: "false" - name: NODE_DATA value: "true" - name: HTTP_ENABLE value: "false" - name: ES_JAVA_OPTS - value: "{{ .Values.conf.elasticsearch.env.java_opts }}" + value: "{{ .Values.conf.elasticsearch.env.java_opts.data }}" - name: DISCOVERY_SERVICE value: {{ tuple "elasticsearch" "discovery" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - - name: ES_PLUGINS_INSTALL - value: "elasticsearch-s3" volumeMounts: - name: pod-tmp mountPath: /tmp diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 2a0e9586b..7257abef6 100644 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -601,6 +601,7 @@ conf: # lookups endpoint: null node: + ingest: ${NODE_INGEST} master: ${NODE_MASTER} data: ${NODE_DATA} name: ${NODE_NAME} @@ -618,7 +619,10 @@ conf: logstash: name: logstash_snapshots env: - java_opts: "-Xms256m -Xmx256m" + java_opts: + client: "-Xms256m -Xmx256m" + data: "-Xms256m -Xmx256m" + master: "-Xms256m -Xmx256m" prometheus_elasticsearch_exporter: es: all: true diff --git a/tools/deployment/armada/manifests/armada-lma.yaml b/tools/deployment/armada/manifests/armada-lma.yaml index 82db82016..98beafcb8 100644 --- a/tools/deployment/armada/manifests/armada-lma.yaml +++ b/tools/deployment/armada/manifests/armada-lma.yaml @@ -320,7 +320,10 @@ data: conf: elasticsearch: env: - java_opts: "-Xms512m -Xmx512m" + java_opts: + client: "-Xms512m -Xmx512m" + data: "-Xms512m -Xmx512m" + master: "-Xms512m -Xmx512m" snapshots: enabled: true source: diff --git a/tools/deployment/multinode/120-elasticsearch.sh b/tools/deployment/multinode/120-elasticsearch.sh index 363bc59dd..a276c3b8a 100755 --- a/tools/deployment/multinode/120-elasticsearch.sh +++ b/tools/deployment/multinode/120-elasticsearch.sh @@ -28,7 +28,10 @@ pod: conf: elasticsearch: env: - java_opts: "-Xms512m -Xmx512m" + java_opts: + client: "-Xms512m -Xmx512m" + data: "-Xms512m -Xmx512m" + master: "-Xms512m -Xmx512m" snapshots: enabled: true curator: