From f4e0467eefa9717be2b2c4686ab1eeef43eeee66 Mon Sep 17 00:00:00 2001 From: Jonny Date: Tue, 8 Oct 2019 00:19:11 -0700 Subject: [PATCH] [stable/mongodb] fix failing liveness probe during long running mongodb recovery (#17502) * fix failing liveness probe during long running mongodb recovery this fix lets the livenes probe succeed during a long running recovery. The new liveness probe looks for the running mongod process inside the container, which allows a successful request. The pod will still only be ready once the recovery is finished and only then traffic will be served to this pod. bumped chart version fix #17501 Signed-off-by: Jonny Langefeld * Rebase on master and bump chart version because of [2a63b08df140003b427e0b349c2b4b350d7d4089](https://github.com/helm/charts/commit/2a63b08df140003b427e0b349c2b4b350d7d4089) Signed-off-by: Jonny Langefeld --- stable/mongodb/Chart.yaml | 2 +- stable/mongodb/templates/statefulset-primary-rs.yaml | 5 ++--- stable/mongodb/templates/statefulset-secondary-rs.yaml | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/stable/mongodb/Chart.yaml b/stable/mongodb/Chart.yaml index a150c79cd3..a2b31c41df 100644 --- a/stable/mongodb/Chart.yaml +++ b/stable/mongodb/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: mongodb -version: 7.3.0 +version: 7.3.1 appVersion: 4.0.12 description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. keywords: diff --git a/stable/mongodb/templates/statefulset-primary-rs.yaml b/stable/mongodb/templates/statefulset-primary-rs.yaml index 03aec5af78..c66a98d6ae 100644 --- a/stable/mongodb/templates/statefulset-primary-rs.yaml +++ b/stable/mongodb/templates/statefulset-primary-rs.yaml @@ -164,9 +164,8 @@ spec: livenessProbe: exec: command: - - mongo - - --eval - - "db.adminCommand('ping')" + - pgrep + - mongod initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.livenessProbe.periodSeconds }} timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} diff --git a/stable/mongodb/templates/statefulset-secondary-rs.yaml b/stable/mongodb/templates/statefulset-secondary-rs.yaml index 61014a0dc1..02501a5c7d 100644 --- a/stable/mongodb/templates/statefulset-secondary-rs.yaml +++ b/stable/mongodb/templates/statefulset-secondary-rs.yaml @@ -152,9 +152,8 @@ spec: livenessProbe: exec: command: - - mongo - - --eval - - "db.adminCommand('ping')" + - pgrep + - mongod initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.livenessProbe.periodSeconds }} timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}