From b1b1aea505437f2df9a9b569ca441d3b2b3abed2 Mon Sep 17 00:00:00 2001 From: isindir Date: Mon, 4 Jun 2018 07:08:53 +0100 Subject: [PATCH] Add keycloak probes config (#5584) * Make Liveness and Readiness Probes initialDelay and Timeout configurable in incubator/keycloak charm * Update values structure for probes as per request * Update Chart.yaml --- incubator/keycloak/Chart.yaml | 2 +- incubator/keycloak/README.md | 4 ++++ incubator/keycloak/templates/statefulset.yaml | 8 ++++---- incubator/keycloak/values.yaml | 7 +++++++ 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/incubator/keycloak/Chart.yaml b/incubator/keycloak/Chart.yaml index f905a4dbab..24be8eb353 100644 --- a/incubator/keycloak/Chart.yaml +++ b/incubator/keycloak/Chart.yaml @@ -1,5 +1,5 @@ name: keycloak -version: 0.4.0 +version: 0.5.0 appVersion: 3.4.3.Final description: Open Source Identity and Access Management For Modern Applications and Services keywords: diff --git a/incubator/keycloak/README.md b/incubator/keycloak/README.md index 73fb00c1d4..e4e18b5abd 100644 --- a/incubator/keycloak/README.md +++ b/incubator/keycloak/README.md @@ -62,6 +62,10 @@ Parameter | Description | Default `keycloak.tolerations` | Node taints to tolerate | `[]` `keycloak.securityContext` | Security context for the pod | `{runAsUser: 1000, fsGroup: 1000, runAsNonRoot: true}` `keycloak.preStartScript` | Custom script to run before Keycloak starts up | `` +`keycloak.livenessInitialDelaySeconds` | Liveness Probe `initialDelaySeconds` | `120` +`keycloak.livenessTimeoutSeconds` | Liveness Probe `timeoutSeconds` | `5` +`keycloak.readinessInitialDelaySeconds` | Readiness Probe `initialDelaySeconds` | `30` +`keycloak.readinessTimeoutSeconds` | Readiness Probe `timeoutSeconds` | `1` `keycloak.cli.nodeIdentifier` | WildFly CLI script for setting the node identifier | See `values.yaml` `keycloak.cli.logging` | WildFly CLI script for logging configuration | See `values.yaml` `keycloak.cli.reverseProxy` | WildFly CLI script for reverse proxy configuration | See `values.yaml` diff --git a/incubator/keycloak/templates/statefulset.yaml b/incubator/keycloak/templates/statefulset.yaml index b7e862a4ae..fcac70a279 100644 --- a/incubator/keycloak/templates/statefulset.yaml +++ b/incubator/keycloak/templates/statefulset.yaml @@ -92,14 +92,14 @@ spec: httpGet: path: /auth/ port: http - initialDelaySeconds: 120 - timeoutSeconds: 5 + initialDelaySeconds: {{ .Values.keycloak.livenessProbe.initialDelaySeconds }} + timeoutSeconds: {{ .Values.keycloak.livenessProbe.timeoutSeconds }} readinessProbe: httpGet: path: /auth/ port: http - initialDelaySeconds: 30 - timeoutSeconds: 1 + initialDelaySeconds: {{ .Values.keycloak.readinessProbe.initialDelaySeconds }} + timeoutSeconds: {{ .Values.keycloak.readinessProbe.timeoutSeconds }} resources: {{ toYaml .Values.keycloak.resources | indent 12 }} {{- with .Values.keycloak.affinity }} diff --git a/incubator/keycloak/values.yaml b/incubator/keycloak/values.yaml index 377acb8556..c02800985b 100644 --- a/incubator/keycloak/values.yaml +++ b/incubator/keycloak/values.yaml @@ -43,6 +43,13 @@ keycloak: nodeSelector: {} tolerations: [] + livenessProbe: + initialDelaySeconds: 120 + timeoutSeconds: 5 + readinessProbe: + initialDelaySeconds: 30 + timeoutSeconds: 1 + resources: {} # limits: # cpu: "100m"