mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Merge pull request #74522 from Pluies/master
Fix fluentd-gcp addon liveness probe
This commit is contained in:
commit
b8ddc7945b
@ -66,19 +66,19 @@ spec:
|
||||
- '-c'
|
||||
- >
|
||||
LIVENESS_THRESHOLD_SECONDS=${LIVENESS_THRESHOLD_SECONDS:-300};
|
||||
STUCK_THRESHOLD_SECONDS=${LIVENESS_THRESHOLD_SECONDS:-900};
|
||||
STUCK_THRESHOLD_SECONDS=${STUCK_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)" ]];
|
||||
if [ -z "$(find /var/log/fluentd-buffers -type d -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)" ]];
|
||||
if [ -z "$(find /var/log/fluentd-buffers -type d -newer /tmp/marker-liveness -print -quit)" ];
|
||||
then
|
||||
exit 1;
|
||||
fi;
|
||||
|
Loading…
Reference in New Issue
Block a user