From 7034f82c1b455e3aedeeb752b04e2bdd8e336909 Mon Sep 17 00:00:00 2001 From: Dmitrii Ermakov Date: Fri, 22 Nov 2019 14:57:29 +0300 Subject: [PATCH] [stable/redmine] adds configurable liveness and readiness probes (#18968) * [stable/redmine] adds configurable health checks Signed-off-by: Dmitrii Ermakov Signed-off-by: Dmitriy Ermakov * [stable/redmine] adds newline to values.yaml Signed-off-by: Dmitrii Ermakov Signed-off-by: Dmitriy Ermakov * [stable/redmine] sets description to common format Signed-off-by: Dmitriy Ermakov * [stable/redmine] documents probes parameters Signed-off-by: Dmitriy Ermakov * [stable/redmine] version increase Signed-off-by: Dmitriy Ermakov * [stable/redmine] Increments version Signed-off-by: Dmitriy Ermakov --- stable/redmine/Chart.yaml | 2 +- stable/redmine/README.md | 13 ++++++++++++- stable/redmine/templates/deployment.yaml | 18 ++++++++++++++---- stable/redmine/values.yaml | 23 ++++++++++++++++++++--- 4 files changed, 47 insertions(+), 9 deletions(-) diff --git a/stable/redmine/Chart.yaml b/stable/redmine/Chart.yaml index 804fab2e88..1cd2e94874 100644 --- a/stable/redmine/Chart.yaml +++ b/stable/redmine/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: redmine -version: 13.4.0 +version: 13.5.0 appVersion: 4.0.5 description: A flexible project management web application. keywords: diff --git a/stable/redmine/README.md b/stable/redmine/README.md index bb52d9fa96..5d638bce87 100644 --- a/stable/redmine/README.md +++ b/stable/redmine/README.md @@ -123,7 +123,18 @@ The following table lists the configurable parameters of the Redmine chart and t | `podDisruptionBudget.maxUnavailable`| Maximum unavailable pods | `nil` | | `replicas` | The number of pod replicas | `1` | | `resources` | Resources allocation (Requests and Limits) | `{}` | -| `securityContext` | Security Context | `{}` | +| `livenessProbe.enabled` | would you like a livenessProbe to be enabled | `true` | +| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 300 | +| `livenessProbe.periodSeconds` | How often to perform the probe | 10 | +| `livenessProbe.timeoutSeconds` | When the probe times out | 5 | +| `livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed | 1 | +| `livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 3 | +| `readinessProbe.enabled` | would you like a readinessProbe to be enabled | `true` | +| `readinessProbe.initialDelaySeconds`| Delay before readiness probe is initiated | 5 | +| `readinessProbe.periodSeconds` | How often to perform the probe | 10 | +| `readinessProbe.timeoutSeconds` | When the probe times out | 1 | +| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed | 1 | +| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 3 | The above parameters map to the env variables defined in [bitnami/redmine](http://github.com/bitnami/bitnami-docker-redmine). For more information please refer to the [bitnami/redmine](http://github.com/bitnami/bitnami-docker-redmine) image documentation. diff --git a/stable/redmine/templates/deployment.yaml b/stable/redmine/templates/deployment.yaml index 2ca0eae92f..15318f7eee 100644 --- a/stable/redmine/templates/deployment.yaml +++ b/stable/redmine/templates/deployment.yaml @@ -131,18 +131,28 @@ spec: ports: - name: http containerPort: 3000 + {{- if .Values.livenessProbe.enabled }} livenessProbe: httpGet: path: / port: http - initialDelaySeconds: 300 - timeoutSeconds: 5 + 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: httpGet: path: / port: http - initialDelaySeconds: 5 - timeoutSeconds: 1 + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} + {{- end }} volumeMounts: - name: redmine-data mountPath: /bitnami/redmine diff --git a/stable/redmine/values.yaml b/stable/redmine/values.yaml index 495270caab..5efb7bd4dc 100644 --- a/stable/redmine/values.yaml +++ b/stable/redmine/values.yaml @@ -301,7 +301,24 @@ resources: {} # cpu: "2" # memory: "1G" -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## Configure extra options for liveness probe +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) ## -securityContext: {} +livenessProbe: + enabled: true + initialDelaySeconds: 300 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 3 + +## Configure extra options for readiness probe +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) +## +readinessProbe: + enabled: true + initialDelaySeconds: 5 + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3