From 325848509a62a113a113fd4633dfb927fd943c3f Mon Sep 17 00:00:00 2001 From: likerj Date: Thu, 3 Oct 2019 16:25:52 +0800 Subject: [PATCH 1/4] es add readiness and liveness health check use transport as health check port --- .../addons/fluentd-elasticsearch/es-statefulset.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cluster/addons/fluentd-elasticsearch/es-statefulset.yaml b/cluster/addons/fluentd-elasticsearch/es-statefulset.yaml index a43ce806e26..4975e495e0d 100644 --- a/cluster/addons/fluentd-elasticsearch/es-statefulset.yaml +++ b/cluster/addons/fluentd-elasticsearch/es-statefulset.yaml @@ -86,6 +86,16 @@ spec: - containerPort: 9300 name: transport protocol: TCP + livenessProbe: + tcpSocket: + port: transport + initialDelaySeconds: 5 + timeoutSeconds: 10 + readinessProbe: + tcpSocket: + port: transport + initialDelaySeconds: 5 + timeoutSeconds: 10 volumeMounts: - name: elasticsearch-logging mountPath: /data From a192b59f9f063bfe9b491e2535af8e6310786173 Mon Sep 17 00:00:00 2001 From: likerj Date: Thu, 3 Oct 2019 16:29:39 +0800 Subject: [PATCH 2/4] fluentd add port promtheus and health check fluentd readiness and liveness health check can use fluent-plugin-prometheus port --- .../fluentd-elasticsearch/fluentd-es-ds.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml b/cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml index c6bb79136c4..cdfc203a60e 100644 --- a/cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml +++ b/cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml @@ -89,6 +89,20 @@ spec: readOnly: true - name: config-volume mountPath: /etc/fluent/config.d + ports: + - containerPort: 24231 + name: prometheus + protocol: TCP + livenessProbe: + tcpSocket: + port: prometheus + initialDelaySeconds: 5 + timeoutSeconds: 10 + readinessProbe: + tcpSocket: + port: prometheus + initialDelaySeconds: 5 + timeoutSeconds: 10 terminationGracePeriodSeconds: 30 volumes: - name: varlog From 3ffd8f34b2412077c2dc7a0916782b746ca25bde Mon Sep 17 00:00:00 2001 From: likerj Date: Tue, 3 Dec 2019 15:04:53 +0800 Subject: [PATCH 3/4] update fluentd-es-configmap queue_limit_length is not supported by fluentd, and I config total_limit_size 2G for buffer total size --- cluster/addons/fluentd-elasticsearch/fluentd-es-configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/addons/fluentd-elasticsearch/fluentd-es-configmap.yaml b/cluster/addons/fluentd-elasticsearch/fluentd-es-configmap.yaml index d6b74199a8a..cbd8cf624c9 100644 --- a/cluster/addons/fluentd-elasticsearch/fluentd-es-configmap.yaml +++ b/cluster/addons/fluentd-elasticsearch/fluentd-es-configmap.yaml @@ -473,7 +473,7 @@ data: retry_forever retry_max_interval 30 chunk_limit_size 2M - queue_limit_length 8 + total_limit_size 2G overflow_action block From 597816c11e2012187ea8ddd6fc75f1f9ad16e485 Mon Sep 17 00:00:00 2001 From: likerj Date: Fri, 6 Dec 2019 09:08:57 +0800 Subject: [PATCH 4/4] update total_limit_size --- cluster/addons/fluentd-elasticsearch/fluentd-es-configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/addons/fluentd-elasticsearch/fluentd-es-configmap.yaml b/cluster/addons/fluentd-elasticsearch/fluentd-es-configmap.yaml index cbd8cf624c9..79d554a36d9 100644 --- a/cluster/addons/fluentd-elasticsearch/fluentd-es-configmap.yaml +++ b/cluster/addons/fluentd-elasticsearch/fluentd-es-configmap.yaml @@ -473,7 +473,7 @@ data: retry_forever retry_max_interval 30 chunk_limit_size 2M - total_limit_size 2G + total_limit_size 500M overflow_action block