From 2a21fdf7acff335e7cf789fcb56d3e7646e591d0 Mon Sep 17 00:00:00 2001 From: "marc.coxall" Date: Wed, 12 Nov 2025 14:14:44 +0000 Subject: [PATCH 1/7] Add liveness and readiness probes for split brain detection container --- .../templates/redis-ha-statefulset.yaml | 24 +++++++++++++++++ charts/redis-ha/values.yaml | 27 +++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/charts/redis-ha/templates/redis-ha-statefulset.yaml b/charts/redis-ha/templates/redis-ha-statefulset.yaml index f5bb12b..9b83a42 100644 --- a/charts/redis-ha/templates/redis-ha-statefulset.yaml +++ b/charts/redis-ha/templates/redis-ha-statefulset.yaml @@ -484,6 +484,30 @@ spec: - name: split-brain-fix image: {{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.splitBrainDetection.livenessProbe.enabled }} + livenessProbe: + initialDelaySeconds: {{ .Values.splitBrainDetection.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.splitBrainDetection.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.splitBrainDetection.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.splitBrainDetection.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.splitBrainDetection.livenessProbe.failureThreshold }} + exec: + command: + - cat + - /readonly-config/redis.conf + {{- end }} + {{- if .Values.splitBrainDetection.readinessProbe.enabled }} + readinessProbe: + initialDelaySeconds: {{ .Values.splitBrainDetection.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.splitBrainDetection.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.splitBrainDetection.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.splitBrainDetection.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.splitBrainDetection.readinessProbe.failureThreshold }} + exec: + command: + - cat + - /readonly-config/redis.conf + {{- end }} resources: {{ toYaml .Values.splitBrainDetection.resources | nindent 10 }} command: - sh diff --git a/charts/redis-ha/values.yaml b/charts/redis-ha/values.yaml index 38a4da1..2029ce7 100644 --- a/charts/redis-ha/values.yaml +++ b/charts/redis-ha/values.yaml @@ -1053,3 +1053,30 @@ splitBrainDetection: retryInterval: 10 # -- splitBrainDetection resources resources: {} + # liveness probe parameters for split brain container + livenessProbe: + enabled: true + # -- Initial delay in seconds for liveness probe + initialDelaySeconds: 30 + # -- Period in seconds after which liveness probe will be repeated + periodSeconds: 15 + # -- Timeout seconds for liveness probe + timeoutSeconds: 15 + # -- Success threshold for liveness probe + successThreshold: 1 + # -- Failure threshold for liveness probe + failureThreshold: 5 + + # readiness probe parameters for splt brain container + readinessProbe: + enabled: true + # -- Initial delay in seconds for readiness probe + initialDelaySeconds: 30 + # -- Period in seconds after which readiness probe will be repeated + periodSeconds: 15 + # -- Timeout seconds for readiness probe + timeoutSeconds: 15 + # -- Success threshold for readiness probe + successThreshold: 3 + # -- Failure threshold for readiness probe + failureThreshold: 5 From 391902b235369c164e0fdefa26c3b9bca9005c9c Mon Sep 17 00:00:00 2001 From: Ninjatec Date: Fri, 14 Nov 2025 09:40:08 +0000 Subject: [PATCH 2/7] Update charts/redis-ha/values.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- charts/redis-ha/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redis-ha/values.yaml b/charts/redis-ha/values.yaml index 2029ce7..829c54f 100644 --- a/charts/redis-ha/values.yaml +++ b/charts/redis-ha/values.yaml @@ -1067,7 +1067,7 @@ splitBrainDetection: # -- Failure threshold for liveness probe failureThreshold: 5 - # readiness probe parameters for splt brain container + # readiness probe parameters for split brain container readinessProbe: enabled: true # -- Initial delay in seconds for readiness probe From 307bfc96e75fe6229ba96f2e409765e0cdab2f48 Mon Sep 17 00:00:00 2001 From: Ninjatec Date: Fri, 14 Nov 2025 09:40:22 +0000 Subject: [PATCH 3/7] Update charts/redis-ha/values.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- charts/redis-ha/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redis-ha/values.yaml b/charts/redis-ha/values.yaml index 829c54f..07e8fc7 100644 --- a/charts/redis-ha/values.yaml +++ b/charts/redis-ha/values.yaml @@ -1077,6 +1077,6 @@ splitBrainDetection: # -- Timeout seconds for readiness probe timeoutSeconds: 15 # -- Success threshold for readiness probe - successThreshold: 3 + successThreshold: 1 # -- Failure threshold for readiness probe failureThreshold: 5 From e5a70487d8f060e334d3adb267bd889ea38cb243 Mon Sep 17 00:00:00 2001 From: Ninjatec Date: Fri, 14 Nov 2025 09:40:37 +0000 Subject: [PATCH 4/7] Update charts/redis-ha/templates/redis-ha-statefulset.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- charts/redis-ha/templates/redis-ha-statefulset.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/redis-ha/templates/redis-ha-statefulset.yaml b/charts/redis-ha/templates/redis-ha-statefulset.yaml index 9b83a42..70687c6 100644 --- a/charts/redis-ha/templates/redis-ha-statefulset.yaml +++ b/charts/redis-ha/templates/redis-ha-statefulset.yaml @@ -505,8 +505,9 @@ spec: failureThreshold: {{ .Values.splitBrainDetection.readinessProbe.failureThreshold }} exec: command: - - cat - - /readonly-config/redis.conf + - pgrep + - -f + - fix-split-brain.sh {{- end }} resources: {{ toYaml .Values.splitBrainDetection.resources | nindent 10 }} command: From 37172bb88f8a23e950e5750ea31fe1e4de835ae3 Mon Sep 17 00:00:00 2001 From: "marc.coxall" Date: Tue, 2 Dec 2025 17:28:00 +0000 Subject: [PATCH 5/7] Refactor split brain detection probes in StatefulSet configuration --- .../templates/redis-ha-statefulset.yaml | 27 +++---------------- charts/redis-ha/values.yaml | 11 ++++++-- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/charts/redis-ha/templates/redis-ha-statefulset.yaml b/charts/redis-ha/templates/redis-ha-statefulset.yaml index 70687c6..e8a6d5e 100644 --- a/charts/redis-ha/templates/redis-ha-statefulset.yaml +++ b/charts/redis-ha/templates/redis-ha-statefulset.yaml @@ -484,30 +484,11 @@ spec: - name: split-brain-fix image: {{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.splitBrainDetection.livenessProbe.enabled }} - livenessProbe: - initialDelaySeconds: {{ .Values.splitBrainDetection.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.splitBrainDetection.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.splitBrainDetection.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.splitBrainDetection.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.splitBrainDetection.livenessProbe.failureThreshold }} - exec: - command: - - cat - - /readonly-config/redis.conf + {{- if .Values.splitBrainDetection.livenessProbe }} + livenessProbe: {{ .Values.splitBrainDetection.livenessProbe | toYaml | nindent 10 }} {{- end }} - {{- if .Values.splitBrainDetection.readinessProbe.enabled }} - readinessProbe: - initialDelaySeconds: {{ .Values.splitBrainDetection.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.splitBrainDetection.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.splitBrainDetection.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.splitBrainDetection.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.splitBrainDetection.readinessProbe.failureThreshold }} - exec: - command: - - pgrep - - -f - - fix-split-brain.sh + {{- if .Values.splitBrainDetection.readinessProbe }} + readinessProbe: {{ .Values.splitBrainDetection.readinessProbe | toYaml | nindent 10 }} {{- end }} resources: {{ toYaml .Values.splitBrainDetection.resources | nindent 10 }} command: diff --git a/charts/redis-ha/values.yaml b/charts/redis-ha/values.yaml index 07e8fc7..423367f 100644 --- a/charts/redis-ha/values.yaml +++ b/charts/redis-ha/values.yaml @@ -1055,7 +1055,6 @@ splitBrainDetection: resources: {} # liveness probe parameters for split brain container livenessProbe: - enabled: true # -- Initial delay in seconds for liveness probe initialDelaySeconds: 30 # -- Period in seconds after which liveness probe will be repeated @@ -1066,10 +1065,13 @@ splitBrainDetection: successThreshold: 1 # -- Failure threshold for liveness probe failureThreshold: 5 + exec: + command: + - cat + - /readonly-config/redis.conf # readiness probe parameters for split brain container readinessProbe: - enabled: true # -- Initial delay in seconds for readiness probe initialDelaySeconds: 30 # -- Period in seconds after which readiness probe will be repeated @@ -1080,3 +1082,8 @@ splitBrainDetection: successThreshold: 1 # -- Failure threshold for readiness probe failureThreshold: 5 + exec: + command: + - pgrep + - -f + - fix-split-brain.sh From b72e8774f666d23151db81d67ea3c637164d09e6 Mon Sep 17 00:00:00 2001 From: "marc.coxall" Date: Sun, 7 Dec 2025 15:57:29 +0000 Subject: [PATCH 6/7] Bump Chart Version --- charts/redis-ha/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redis-ha/Chart.yaml b/charts/redis-ha/Chart.yaml index 8035788..13a6867 100644 --- a/charts/redis-ha/Chart.yaml +++ b/charts/redis-ha/Chart.yaml @@ -5,7 +5,7 @@ keywords: - redis - keyvalue - database -version: 4.35.2 +version: 4.35.4 appVersion: 8.2.2 description: This Helm chart provides a highly available Redis implementation with a master/slave configuration and uses Sentinel sidecars for failover management icon: https://img.icons8.com/external-tal-revivo-shadow-tal-revivo/24/external-redis-an-in-memory-data-structure-project-implementing-a-distributed-logo-shadow-tal-revivo.png From e4a528f49a15cd78fcd53d815b9c7a5858e346d8 Mon Sep 17 00:00:00 2001 From: Aaron Layfield Date: Mon, 8 Dec 2025 09:25:02 +0900 Subject: [PATCH 7/7] Remove the conditionals. Signed-off-by: Aaron Layfield --- charts/redis-ha/templates/redis-ha-statefulset.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/charts/redis-ha/templates/redis-ha-statefulset.yaml b/charts/redis-ha/templates/redis-ha-statefulset.yaml index e8a6d5e..eeb54c2 100644 --- a/charts/redis-ha/templates/redis-ha-statefulset.yaml +++ b/charts/redis-ha/templates/redis-ha-statefulset.yaml @@ -484,12 +484,8 @@ spec: - name: split-brain-fix image: {{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.splitBrainDetection.livenessProbe }} livenessProbe: {{ .Values.splitBrainDetection.livenessProbe | toYaml | nindent 10 }} - {{- end }} - {{- if .Values.splitBrainDetection.readinessProbe }} readinessProbe: {{ .Values.splitBrainDetection.readinessProbe | toYaml | nindent 10 }} - {{- end }} resources: {{ toYaml .Values.splitBrainDetection.resources | nindent 10 }} command: - sh