diff --git a/stable/mongodb-replicaset/Chart.yaml b/stable/mongodb-replicaset/Chart.yaml index d45ee48541..85b26ac883 100644 --- a/stable/mongodb-replicaset/Chart.yaml +++ b/stable/mongodb-replicaset/Chart.yaml @@ -1,6 +1,6 @@ name: mongodb-replicaset home: https://github.com/mongodb/mongo -version: 3.0.0 +version: 3.1.0 appVersion: 3.6 description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. diff --git a/stable/mongodb-replicaset/README.md b/stable/mongodb-replicaset/README.md index 732fe81fbd..58bf2f352a 100644 --- a/stable/mongodb-replicaset/README.md +++ b/stable/mongodb-replicaset/README.md @@ -61,6 +61,8 @@ The following tables lists the configurable parameters of the mongodb chart and | `nodeSelector` | Node labels for pod assignment | `{}` | | `affinity` | Node/pod affinities | `{}` | | `tolerations` | List of node taints to tolerate | `[]` | +| `livenessProbe` | Liveness probe configuration | See below | +| `readynessProbe` | Readyness probe configuration | See below | *MongoDB config file* @@ -155,6 +157,29 @@ mongodb with your `mongo.pem` certificate: ```console $ mongo --ssl --sslCAFile=ca.crt --sslPEMKeyFile=mongo.pem --eval "db.adminCommand('ping')" ``` +## Readiness probe +The default values for the readiness probe are: + +```yaml +readinessProbe: + initialDelaySeconds: 5 + timeoutSeconds: 1 + failureThreshold: 3 + periodSeconds: 10 + successThreshold: 1 +``` + +## Liveness probe +The default values for the liveness probe are: + +```yaml +livenessProbe: + initialDelaySeconds: 30 + timeoutSeconds: 5 + failureThreshold: 3 + periodSeconds: 10 + successThreshold: 1 +``` ## Deep dive diff --git a/stable/mongodb-replicaset/templates/mongodb-statefulset.yaml b/stable/mongodb-replicaset/templates/mongodb-statefulset.yaml index c218af1210..019425d315 100644 --- a/stable/mongodb-replicaset/templates/mongodb-statefulset.yaml +++ b/stable/mongodb-replicaset/templates/mongodb-statefulset.yaml @@ -165,8 +165,11 @@ spec: {{- end }} - --eval - "db.adminCommand('ping')" - initialDelaySeconds: 30 - timeoutSeconds: 5 + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + failureThreshold: {{ .Values.livenessProbe.failureThreshold }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} readinessProbe: exec: command: @@ -178,8 +181,11 @@ spec: {{- end }} - --eval - "db.adminCommand('ping')" - initialDelaySeconds: 5 - timeoutSeconds: 1 + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} volumeMounts: - name: datadir mountPath: /data/db diff --git a/stable/mongodb-replicaset/values.yaml b/stable/mongodb-replicaset/values.yaml index e00ad28b39..1500bfe966 100644 --- a/stable/mongodb-replicaset/values.yaml +++ b/stable/mongodb-replicaset/values.yaml @@ -80,3 +80,19 @@ tls: # Entries for the MongoDB config file configmap: + +# Readiness probe +readinessProbe: + initialDelaySeconds: 5 + timeoutSeconds: 1 + failureThreshold: 3 + periodSeconds: 10 + successThreshold: 1 + +# Liveness probe +livenessProbe: + initialDelaySeconds: 30 + timeoutSeconds: 5 + failureThreshold: 3 + periodSeconds: 10 + successThreshold: 1