From 0fda44e249673e252f55dbf5b428aa6fa2217813 Mon Sep 17 00:00:00 2001 From: Ryan Miller Date: Tue, 6 Aug 2019 13:24:51 -0700 Subject: [PATCH] Fix liveness probe to use bash and debian pgrep --- deploy/docker/Dockerfile | 3 +-- deploy/kubernetes/fluentd-sumologic.yaml.tmpl | 16 ++++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/deploy/docker/Dockerfile b/deploy/docker/Dockerfile index b7da3f2d17..39963b9e08 100644 --- a/deploy/docker/Dockerfile +++ b/deploy/docker/Dockerfile @@ -3,8 +3,7 @@ FROM fluent/fluentd:v1.6.3-debian-1.0 # Use root account to use apt USER root -# below RUN includes plugin as examples elasticsearch is not required -# you may customize including plugins as you wish +# Build dependencies RUN buildDeps="sudo make gcc g++ libc-dev ruby-dev libsnappy-dev" \ && apt-get update \ && apt-get install -y --no-install-recommends $buildDeps diff --git a/deploy/kubernetes/fluentd-sumologic.yaml.tmpl b/deploy/kubernetes/fluentd-sumologic.yaml.tmpl index 03aed4f340..fe0ca2ddab 100644 --- a/deploy/kubernetes/fluentd-sumologic.yaml.tmpl +++ b/deploy/kubernetes/fluentd-sumologic.yaml.tmpl @@ -326,17 +326,17 @@ spec: livenessProbe: exec: command: - - "/bin/sh" + - "/bin/bash" - "-c" - - "[[ $( pgrep ruby | wc -l) == 2 ]]" + - "[[ $( pgrep ruby | wc -l) > 0 ]]" initialDelaySeconds: 300 periodSeconds: 20 readinessProbe: exec: command: - - "/bin/sh" + - "/bin/bash" - "-c" - - "[[ $( pgrep ruby | wc -l) == 2 ]]" + - "[[ $( pgrep ruby | wc -l) > 0 ]]" initialDelaySeconds: 30 periodSeconds: 5 volumeMounts: @@ -511,17 +511,17 @@ spec: livenessProbe: exec: command: - - "/bin/sh" + - "/bin/bash" - "-c" - - "[[ $( pgrep ruby | wc -l) == 2 ]]" + - "[[ $( pgrep ruby | wc -l) > 0 ]]" initialDelaySeconds: 300 periodSeconds: 20 readinessProbe: exec: command: - - "/bin/sh" + - "/bin/bash" - "-c" - - "[[ $( pgrep ruby | wc -l) == 2 ]]" + - "[[ $( pgrep ruby | wc -l) > 0 ]]" initialDelaySeconds: 30 periodSeconds: 5 env: