mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[fluentd-elasticsearch] Add ability to setup livenessProbe on fluentd (#5703)
* Add ability to setup livenessProbe on fluentd * Update README.md * Update values.yaml * Update Chart.yaml
This commit is contained in:
committed by
k8s-ci-robot
parent
8351ba9a5c
commit
d2e1130a10
@@ -1,5 +1,5 @@
|
||||
name: fluentd-elasticsearch
|
||||
version: 0.4.2
|
||||
version: 0.5.0
|
||||
appVersion: 2.0.4
|
||||
home: https://www.fluentd.org/
|
||||
description: A Fluentd Helm chart for Kubernetes with Elasticsearch output
|
||||
|
||||
@@ -60,6 +60,7 @@ The following table lists the configurable parameters of the Fluentd elasticsear
|
||||
| `resources.requests.memory` | Memory request | `200Mi` |
|
||||
| `serviceAccount.create` | Specifies whether a service account should be created.| `true` |
|
||||
| `serviceAccount.name` | Name of the service account. | |
|
||||
| `livenessProbe.enabled` | Wether to enable livenessProbe | `true` |
|
||||
| `tolerations` | Optional daemonset tolerations | `NULL` |
|
||||
|
||||
|
||||
|
||||
@@ -70,6 +70,40 @@ spec:
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{ toYaml .Values.extraVolumeMounts | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
# Liveness probe is aimed to help in situarions where fluentd
|
||||
# silently hangs for no apparent reasons until manual restart.
|
||||
# The idea of this probe is that if fluentd is not queueing or
|
||||
# flushing chunks for 5 minutes, something is not right. If
|
||||
# you want to change the fluentd configuration, reducing amount of
|
||||
# logs fluentd collects, consider changing the threshold or turning
|
||||
# liveness probe off completely.
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 600
|
||||
periodSeconds: 60
|
||||
exec:
|
||||
command:
|
||||
- '/bin/sh'
|
||||
- '-c'
|
||||
- >
|
||||
LIVENESS_THRESHOLD_SECONDS=${LIVENESS_THRESHOLD_SECONDS:-300};
|
||||
STUCK_THRESHOLD_SECONDS=${LIVENESS_THRESHOLD_SECONDS:-900};
|
||||
if [ ! -e /var/log/fluentd-buffers ];
|
||||
then
|
||||
exit 1;
|
||||
fi;
|
||||
touch -d "${STUCK_THRESHOLD_SECONDS} seconds ago" /tmp/marker-stuck;
|
||||
if [[ -z "$(find /var/log/fluentd-buffers -type f -newer /tmp/marker-stuck -print -quit)" ]];
|
||||
then
|
||||
rm -rf /var/log/fluentd-buffers;
|
||||
exit 1;
|
||||
fi;
|
||||
touch -d "${LIVENESS_THRESHOLD_SECONDS} seconds ago" /tmp/marker-liveness;
|
||||
if [[ -z "$(find /var/log/fluentd-buffers -type f -newer /tmp/marker-liveness -print -quit)" ]];
|
||||
then
|
||||
exit 1;
|
||||
fi;
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: 30
|
||||
volumes:
|
||||
- name: varlog
|
||||
|
||||
@@ -33,6 +33,9 @@ serviceAccount:
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name:
|
||||
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
|
||||
annotations: {}
|
||||
# prometheus.io/scrape: "true"
|
||||
# prometheus.io/port: "24231"
|
||||
|
||||
Reference in New Issue
Block a user