From a79fa12eed89581e4db4e82ca12bac5907adeef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20B=C3=BCtler?= Date: Mon, 25 Mar 2024 11:03:39 +0100 Subject: [PATCH] Make liveness and readiness probes configurable (#29) --- charts/kafka-ui/templates/deployment.yaml | 16 ++++++++++------ charts/kafka-ui/values.yaml | 12 ++++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/charts/kafka-ui/templates/deployment.yaml b/charts/kafka-ui/templates/deployment.yaml index 7a92712b..d1d4d256 100644 --- a/charts/kafka-ui/templates/deployment.yaml +++ b/charts/kafka-ui/templates/deployment.yaml @@ -91,9 +91,11 @@ spec: {{- if .Values.probes.useHttpsScheme }} scheme: HTTPS {{- end }} - initialDelaySeconds: 60 - periodSeconds: 30 - timeoutSeconds: 10 + initialDelaySeconds: {{ .Values.probes.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.probes.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.probes.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.probes.livenessProbe.failureThreshold }} readinessProbe: httpGet: {{- $contextPath := .Values.envs.config.SERVER_SERVLET_CONTEXT_PATH | default "" | printf "%s/actuator/health" | urlParse }} @@ -102,9 +104,11 @@ spec: {{- if .Values.probes.useHttpsScheme }} scheme: HTTPS {{- end }} - initialDelaySeconds: 60 - periodSeconds: 30 - timeoutSeconds: 10 + initialDelaySeconds: {{ .Values.probes.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.probes.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.probes.readinessProbe.failureThreshold }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- if or .Values.yamlApplicationConfig .Values.volumeMounts .Values.yamlApplicationConfigConfigMap}} diff --git a/charts/kafka-ui/values.yaml b/charts/kafka-ui/values.yaml index 72038e9b..fa6b871e 100644 --- a/charts/kafka-ui/values.yaml +++ b/charts/kafka-ui/values.yaml @@ -77,6 +77,18 @@ annotations: {} ## probes: useHttpsScheme: false + livenessProbe: + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 3 podSecurityContext: {}