From 5cc7686838b1358debb019cc5491c929809e6595 Mon Sep 17 00:00:00 2001 From: Tomas Pizarro Date: Fri, 15 Jun 2018 10:59:28 +0200 Subject: [PATCH] Fix liveness and readiness probes configuration for standalone deployment (#6130) --- stable/mongodb/Chart.yaml | 2 +- .../mongodb/templates/deployment-standalone.yaml | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/stable/mongodb/Chart.yaml b/stable/mongodb/Chart.yaml index e4c9b232dc..e6ab8ff5b0 100644 --- a/stable/mongodb/Chart.yaml +++ b/stable/mongodb/Chart.yaml @@ -1,5 +1,5 @@ name: mongodb -version: 3.0.0 +version: 3.0.1 appVersion: 3.6.5 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/deployment-standalone.yaml b/stable/mongodb/templates/deployment-standalone.yaml index 66e5c2d56a..15191f3f75 100644 --- a/stable/mongodb/templates/deployment-standalone.yaml +++ b/stable/mongodb/templates/deployment-standalone.yaml @@ -53,20 +53,32 @@ spec: ports: - name: mongodb containerPort: 27017 + {{- if .Values.livenessProbe.enabled }} livenessProbe: exec: command: - mongo - --eval - "db.adminCommand('ping')" -{{ toYaml .Values.livenessProbe | indent 10 }} + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.readinessProbe.enabled }} readinessProbe: exec: command: - mongo - --eval - "db.adminCommand('ping')" -{{ toYaml .Values.readinessProbe | indent 10 }} + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} + {{- end }} volumeMounts: - name: data mountPath: /bitnami/mongodb