From 85cccddc6bb3bf703becddc3d22fc42272f6e90f Mon Sep 17 00:00:00 2001 From: Bernhard Kaszt Date: Mon, 27 Sep 2021 13:08:47 +0200 Subject: [PATCH] [bitnami/keycloak] Implement support for startupProbe for faster pod startups (#7613) * keycloak: Implement support for startupProbe for faster pod startups Available by default in Kubernetes 1.18.x, disabled by default for this chart. * bitnami/keycloak: Change startupProbe HTTP path to /auth/ * bitnami/keycloak: Fix README value for startupProbe.failureThreshold * bitnami/keycloak: Fix wrong patch level in chart version Co-authored-by: Bernhard Kaszt --- bitnami/keycloak/Chart.yaml | 2 +- bitnami/keycloak/README.md | 9 ++++++++ bitnami/keycloak/templates/statefulset.yaml | 5 +++++ bitnami/keycloak/values.yaml | 25 +++++++++++++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/bitnami/keycloak/Chart.yaml b/bitnami/keycloak/Chart.yaml index 77ebe499f..830916607 100644 --- a/bitnami/keycloak/Chart.yaml +++ b/bitnami/keycloak/Chart.yaml @@ -26,4 +26,4 @@ name: keycloak sources: - https://github.com/bitnami/bitnami-docker-keycloak - https://github.com/keycloak/keycloak -version: 5.0.7 +version: 5.1.0 diff --git a/bitnami/keycloak/README.md b/bitnami/keycloak/README.md index 8da4e20d5..1e81e523b 100644 --- a/bitnami/keycloak/README.md +++ b/bitnami/keycloak/README.md @@ -162,6 +162,14 @@ The command removes all the Kubernetes components associated with the chart and | `containerSecurityContext.runAsNonRoot` | Set Keykloak container's Security Context runAsNonRoot | `true` | | `resources.limits` | The resources limits for the Keycloak container | `{}` | | `resources.requests` | The requested resources for the Keycloak container | `{}` | +| `startupProbe.enabled` | Enable startupProbe | `false` | +| `startupProbe.httpGet.path` | Request path for startupProbe | `/auth/` | +| `startupProbe.httpGet.port` | Port for startupProbe | `http` | +| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `30` | +| `startupProbe.periodSeconds` | Period seconds for startupProbe | `5` | +| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` | +| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `60` | +| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` | | `livenessProbe.enabled` | Enable livenessProbe | `true` | | `livenessProbe.httpGet.path` | Request path for livenessProbe | `/auth/` | | `livenessProbe.httpGet.port` | Port for livenessProbe | `http` | @@ -178,6 +186,7 @@ The command removes all the Kubernetes components associated with the chart and | `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` | | `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` | | `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | +| `customStartupProbe` | Custom Startup probes for Keycloak | `{}` | | `customLivenessProbe` | Custom Liveness probes for Keycloak | `{}` | | `customReadinessProbe` | Custom Rediness probes Keycloak | `{}` | | `updateStrategy.type` | StrategyType | `RollingUpdate` | diff --git a/bitnami/keycloak/templates/statefulset.yaml b/bitnami/keycloak/templates/statefulset.yaml index ef3ce2f0a..7a9df0ce8 100644 --- a/bitnami/keycloak/templates/statefulset.yaml +++ b/bitnami/keycloak/templates/statefulset.yaml @@ -275,6 +275,11 @@ spec: - name: http-management containerPort: 9990 protocol: TCP + {{- if .Values.startupProbe.enabled }} + startupProbe: {{- omit .Values.startupProbe "enabled" | toYaml | nindent 12 }} + {{- else if .Values.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }} + {{- end }} {{- if .Values.livenessProbe.enabled }} livenessProbe: {{- omit .Values.livenessProbe "enabled" | toYaml | nindent 12 }} {{- else if .Values.customLivenessProbe }} diff --git a/bitnami/keycloak/values.yaml b/bitnami/keycloak/values.yaml index 8dfe58fe2..61df2038c 100644 --- a/bitnami/keycloak/values.yaml +++ b/bitnami/keycloak/values.yaml @@ -458,6 +458,28 @@ resources: ## cpu: 200m ## memory: 10Mi requests: {} +## Configure extra options for startup probe +## When enabling this, make sure to set initialDelaySeconds to 0 for livenessProbe and readinessProbe +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes +## @param startupProbe.enabled Enable startupProbe +## @param startupProbe.httpGet.path Request path for startupProbe +## @param startupProbe.httpGet.port Port for startupProbe +## @param startupProbe.initialDelaySeconds Initial delay seconds for startupProbe +## @param startupProbe.periodSeconds Period seconds for startupProbe +## @param startupProbe.timeoutSeconds Timeout seconds for startupProbe +## @param startupProbe.failureThreshold Failure threshold for startupProbe +## @param startupProbe.successThreshold Success threshold for startupProbe +## +startupProbe: + enabled: false + httpGet: + path: /auth/ + port: http + initialDelaySeconds: 30 + periodSeconds: 5 + timeoutSeconds: 1 + failureThreshold: 60 + successThreshold: 1 ## Configure extra options for liveness probe ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param livenessProbe.enabled Enable livenessProbe @@ -500,6 +522,9 @@ readinessProbe: timeoutSeconds: 1 failureThreshold: 3 successThreshold: 1 +## @param customStartupProbe Custom Startup probes for Keycloak +## +customStartupProbe: {} ## @param customLivenessProbe Custom Liveness probes for Keycloak ## customLivenessProbe: {}