From 11a10273d40a372fce8c2d1849e7da3057263403 Mon Sep 17 00:00:00 2001 From: "zhangkun9038@dingtalk.com" Date: Mon, 31 Mar 2025 17:47:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E4=BA=86=E4=B8=80=E4=BA=9B=E8=8E=AB?= =?UTF-8?q?=E5=90=8D=E5=85=B6=E5=A6=99=E7=9A=84=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- elasticsearch-statefulSet.yaml | 54 +++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/elasticsearch-statefulSet.yaml b/elasticsearch-statefulSet.yaml index 215d677..2a0d30c 100644 --- a/elasticsearch-statefulSet.yaml +++ b/elasticsearch-statefulSet.yaml @@ -37,6 +37,16 @@ spec: value: "elasticsearch-0" - name: discovery.seed_hosts value: "elasticsearch-0.efk.svc.cluster.local,elasticsearch-1.efk.svc.cluster.local,elasticsearch-2.efk.svc.cluster.local,elasticsearch-3.efk.svc.cluster.local" + - name: cluster.routing.allocation.awareness.attributes + value: "zone" + - name: node.attr.zone + value: "zone-0" + - name: cluster.routing.allocation.node_concurrent_recoveries + value: "8" + - name: cluster.routing.allocation.node_initial_primaries_recoveries + value: "8" + - name: indices.recovery.max_bytes_per_sec + value: "100mb" - name: cluster.initial_master_nodes value: "[elasticsearch-0, elasticsearch-1, elasticsearch-2, elasticsearch-3]" - name: xpack.security.enabled @@ -48,7 +58,7 @@ spec: resources: requests: memory: "6Gi" - cpu: "2" + cpu: "3" limits: memory: "8Gi" cpu: "4" @@ -139,6 +149,16 @@ spec: value: "elasticsearch-0.efk.svc.cluster.local,elasticsearch-1.efk.svc.cluster.local,elasticsearch-2.efk.svc.cluster.local,elasticsearch-3.efk.svc.cluster.local" - name: cluster.initial_master_nodes value: "[elasticsearch-0, elasticsearch-1, elasticsearch-2, elasticsearch-3]" + - name: cluster.routing.allocation.awareness.attributes + value: "zone" + - name: node.attr.zone + value: "zone-0" + - name: cluster.routing.allocation.node_concurrent_recoveries + value: "8" + - name: cluster.routing.allocation.node_initial_primaries_recoveries + value: "8" + - name: indices.recovery.max_bytes_per_sec + value: "100mb" - name: xpack.security.enabled value: "false" - name: ES_JAVA_OPTS @@ -148,10 +168,10 @@ spec: resources: requests: memory: "4Gi" - cpu: "1" + cpu: "2" limits: memory: "6Gi" - cpu: "2" + cpu: "3" volumeMounts: - name: tz-db mountPath: /usr/share/zoneinfo @@ -239,6 +259,16 @@ spec: value: "elasticsearch-0.efk.svc.cluster.local,elasticsearch-1.efk.svc.cluster.local,elasticsearch-2.efk.svc.cluster.local,elasticsearch-3.efk.svc.cluster.local" - name: cluster.initial_master_nodes value: "[elasticsearch-0, elasticsearch-1, elasticsearch-2, elasticsearch-3]" + - name: cluster.routing.allocation.awareness.attributes + value: "zone" + - name: node.attr.zone + value: "zone-0" + - name: cluster.routing.allocation.node_concurrent_recoveries + value: "8" + - name: cluster.routing.allocation.node_initial_primaries_recoveries + value: "8" + - name: indices.recovery.max_bytes_per_sec + value: "100mb" - name: xpack.security.enabled value: "false" - name: ES_JAVA_OPTS @@ -251,7 +281,7 @@ spec: cpu: "1" limits: memory: "6Gi" - cpu: "2" + cpu: "3" volumeMounts: - name: tz-db mountPath: /usr/share/zoneinfo @@ -339,6 +369,16 @@ spec: value: "elasticsearch-0.efk.svc.cluster.local,elasticsearch-1.efk.svc.cluster.local,elasticsearch-2.efk.svc.cluster.local,elasticsearch-3.efk.svc.cluster.local" - name: cluster.initial_master_nodes value: "[elasticsearch-0, elasticsearch-1, elasticsearch-2, elasticsearch-3]" + - name: cluster.routing.allocation.awareness.attributes + value: "zone" + - name: node.attr.zone + value: "zone-0" + - name: cluster.routing.allocation.node_concurrent_recoveries + value: "8" + - name: cluster.routing.allocation.node_initial_primaries_recoveries + value: "8" + - name: indices.recovery.max_bytes_per_sec + value: "100mb" - name: xpack.security.enabled value: "false" - name: ES_JAVA_OPTS @@ -347,11 +387,11 @@ spec: value: "[data_warm, master, data_content, remote_cluster_client]" resources: requests: - memory: "4Gi" - cpu: "1" + memory: "5Gi" + cpu: "2" limits: memory: "6Gi" - cpu: "2" + cpu: "3" volumeMounts: - name: tz-db mountPath: /usr/share/zoneinfo