From 9f5b1a77bcad98e6163bc917e9bb90797c3b63e8 Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Wed, 16 Jan 2019 15:07:10 -0600 Subject: [PATCH] Add liveness probe to fluentd This adds a liveness probe to the fluentd chart. This probe will simply perform a tcpSocket check on the same port the readiness probe executes the check on. Change-Id: I768b23d36d50d6f6938f5588bea71e97aeb624b9 --- fluent-logging/templates/deployment-fluentd.yaml | 7 +++++++ fluent-logging/values.yaml | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/fluent-logging/templates/deployment-fluentd.yaml b/fluent-logging/templates/deployment-fluentd.yaml index c713af089..5ec9cc83c 100644 --- a/fluent-logging/templates/deployment-fluentd.yaml +++ b/fluent-logging/templates/deployment-fluentd.yaml @@ -117,11 +117,18 @@ spec: containerPort: {{ tuple "fluentd" "internal" "service" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} - name: metrics containerPort: {{ tuple "fluentd" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + - name: liveness + containerPort: 9880 readinessProbe: tcpSocket: port: {{ tuple "fluentd" "internal" "service" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} initialDelaySeconds: 20 periodSeconds: 10 + livenessProbe: + tcpSocket: + port: {{ tuple "fluentd" "internal" "service" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + initialDelaySeconds: 60 + timeoutSeconds: 10 env: - name: FLUENTD_PORT value: {{ tuple "fluentd" "internal" "service" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }} diff --git a/fluent-logging/values.yaml b/fluent-logging/values.yaml index d70a9287c..164c9f85f 100644 --- a/fluent-logging/values.yaml +++ b/fluent-logging/values.yaml @@ -237,15 +237,24 @@ conf: type: monitor_agent bind: 0.0.0.0 port: 24220 + - http_health_checking: + header: source + type: http + bind: 0.0.0.0 + port: 9880 - fluentbit_forward: header: source type: forward port: "#{ENV['FLUENTD_PORT']}" bind: 0.0.0.0 - - filter_fluentd_logs: + - filter_fluentbit_logs: header: match expression: "fluent.**" type: "null" + - filter_fluentd_logs: + header: match + expression: "fluentd.**" + type: "null" # NOTE(srwilkers): Look for specific keywords in the log key to determine # log level of event - tag_kubernetes_log_level: @@ -548,6 +557,8 @@ endpoints: default: 24224 metrics: default: 24220 + liveness: + default: 9880 prometheus_fluentd_exporter: namespace: null hosts: