From e7616c3ea9d805edf625c9eac622f97d1e648d5a Mon Sep 17 00:00:00 2001 From: Sylvain Desbureaux Date: Wed, 5 May 2021 10:47:58 +0200 Subject: [COMMON][CASSANDRA] Use Startup probes Instead of long initial delay on readiness and liveness probes, use startup probes and be more aggressive on readiness and liveness. Issue-ID: OOM-2741 Signed-off-by: Sylvain Desbureaux Change-Id: If60f345fd1e11fd1419cee58efb7d53e56dc5c79 --- kubernetes/common/cassandra/templates/statefulset.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'kubernetes/common/cassandra/templates') diff --git a/kubernetes/common/cassandra/templates/statefulset.yaml b/kubernetes/common/cassandra/templates/statefulset.yaml index 953c89d24d..3553cd4069 100644 --- a/kubernetes/common/cassandra/templates/statefulset.yaml +++ b/kubernetes/common/cassandra/templates/statefulset.yaml @@ -71,6 +71,17 @@ spec: timeoutSeconds: {{ .Values.readiness.timeoutSeconds }} successThreshold: {{ .Values.readiness.successThreshold }} failureThreshold: {{ .Values.readiness.failureThreshold }} + startupProbe: + exec: + command: + - /bin/bash + - -c + - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }' + initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }} + periodSeconds: {{ .Values.startup.periodSeconds }} + timeoutSeconds: {{ .Values.startup.timeoutSeconds }} + successThreshold: {{ .Values.startup.successThreshold }} + failureThreshold: {{ .Values.startup.failureThreshold }} env: {{- $seed_size := default 1 .Values.replicaCount | int -}} {{- $global := . }} -- cgit 1.2.3-korg