From 4a4ff0751faabebd3af0d816a7c6c08fc616d9a7 Mon Sep 17 00:00:00 2001 From: ycz008 Date: Thu, 14 Mar 2024 14:29:15 +0800 Subject: [PATCH] optimizition tcs es and kibana --- tcs-upgrade/elastic/elastic.yaml | 9 ++++----- tcs-upgrade/elastic/kibana.yaml | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/tcs-upgrade/elastic/elastic.yaml b/tcs-upgrade/elastic/elastic.yaml index 5d81784..40d3076 100644 --- a/tcs-upgrade/elastic/elastic.yaml +++ b/tcs-upgrade/elastic/elastic.yaml @@ -133,16 +133,16 @@ spec: - name: xpack.monitoring.collection.enabled value: "false" - name: ES_JAVA_OPTS - value: "-Xms256m -Xmx256m" + value: "-Xms4096m -Xmx4096m" - name: ELASTIC_PASSWORD value: "changeme" resources: limits: cpu: 2 - memory: 4Gi + memory: 8Gi requests: cpu: 100m - memory: 128Mi + memory: 512Mi volumeMounts: - name: elastic-tcs mountPath: /usr/share/elasticsearch/data @@ -168,8 +168,7 @@ spec: - name: restful port: 9200 targetPort: 9200 - # nodePort: 30029 - type: NodePort + type: ClusterIP selector: app: elastic diff --git a/tcs-upgrade/elastic/kibana.yaml b/tcs-upgrade/elastic/kibana.yaml index 01619a7..acbfcf0 100644 --- a/tcs-upgrade/elastic/kibana.yaml +++ b/tcs-upgrade/elastic/kibana.yaml @@ -8,6 +8,9 @@ data: server.host: 0.0.0.0 server.publicBaseUrl: http://kibana-tcs.beaconfireinc.com elasticsearch.hosts: [ "http://elastic:9200" ] + node.options: |- + --max-old-space-size=4096 + --unhandled-rejections=warn --- apiVersion: apps/v1 @@ -34,15 +37,19 @@ spec: resources: requests: cpu: 100m - memory: 128Mi + memory: 512Mi limits: - cpu: 1 - memory: 1Gi + cpu: 2 + memory: 4Gi volumeMounts: - name: config mountPath: /usr/share/kibana/config/kibana.yml subPath: kibana.yml readOnly: true + - name: node-options + mountPath: /usr/share/kibana/config/node.options + subPath: node.options + readOnly: true volumes: - name: config configMap: @@ -50,6 +57,12 @@ spec: items: - key: kibana.yml path: kibana.yml + - name: node-options + configMap: + name: kibana-config + items: + - key: node.options + path: node.options --- apiVersion: v1