diff --git a/charts/redis-ha/templates/redis-ha-statefulset.yaml b/charts/redis-ha/templates/redis-ha-statefulset.yaml index f5bb12b..70687c6 100644 --- a/charts/redis-ha/templates/redis-ha-statefulset.yaml +++ b/charts/redis-ha/templates/redis-ha-statefulset.yaml @@ -484,6 +484,31 @@ 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: + - pgrep + - -f + - fix-split-brain.sh + {{- 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..07e8fc7 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 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 + periodSeconds: 15 + # -- Timeout seconds for readiness probe + timeoutSeconds: 15 + # -- Success threshold for readiness probe + successThreshold: 1 + # -- Failure threshold for readiness probe + failureThreshold: 5