Allow the configuration of liveness and readiness times (#4741)

* Allow the configuration of liveness and readiness times

* Add missing newline

* Bump the minor version
This commit is contained in:
Stefan Ganzer
2018-04-07 06:43:09 -07:00
committed by k8s-ci-robot
parent b4426ade19
commit 731bff39bd
4 changed files with 52 additions and 5 deletions
+1 -1
View File
@@ -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.
+25
View File
@@ -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
@@ -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
+16
View File
@@ -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