From 22f4b9b3bd18a16c477003338464dfe5a689e074 Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Wed, 26 Jan 2022 15:17:15 +0200 Subject: [PATCH] Wrap Zookeeper probe script with timeout command (#214) so that the probe doesn't continue running indefinitely - resolves the issue with Kubernetes <1.20 "Before Kubernetes 1.20, the field timeoutSeconds was not respected for exec probes: probes continued running indefinitely, even past their configured deadline, until a result was returned." in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes - #179 already fixed the issue for Kubernetes 1.20+ --- charts/pulsar/templates/zookeeper-statefulset.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/charts/pulsar/templates/zookeeper-statefulset.yaml b/charts/pulsar/templates/zookeeper-statefulset.yaml index d2a2bb4..054b1aa 100644 --- a/charts/pulsar/templates/zookeeper-statefulset.yaml +++ b/charts/pulsar/templates/zookeeper-statefulset.yaml @@ -149,6 +149,8 @@ spec: readinessProbe: exec: command: + - timeout + - "{{ .Values.zookeeper.probe.readiness.timeoutSeconds }}" - bin/pulsar-zookeeper-ruok.sh initialDelaySeconds: {{ .Values.zookeeper.probe.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.zookeeper.probe.readiness.periodSeconds }} @@ -159,6 +161,8 @@ spec: livenessProbe: exec: command: + - timeout + - "{{ .Values.zookeeper.probe.liveness.timeoutSeconds }}" - bin/pulsar-zookeeper-ruok.sh initialDelaySeconds: {{ .Values.zookeeper.probe.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.zookeeper.probe.liveness.periodSeconds }} @@ -169,6 +173,8 @@ spec: startupProbe: exec: command: + - timeout + - "{{ .Values.zookeeper.probe.startup.timeoutSeconds }}" - bin/pulsar-zookeeper-ruok.sh initialDelaySeconds: {{ .Values.zookeeper.probe.startup.initialDelaySeconds }} periodSeconds: {{ .Values.zookeeper.probe.startup.periodSeconds }}