Skip to content

Commit 421d743

Browse files
authored
feat(statefulset): add support for exec and tcpSocket readinessProbe (#412)
Signed-off-by: Domingo Rivera Barros <domingo.rivera.barros@adfinis.com>
1 parent c7c91b6 commit 421d743

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

helm/vernemq/templates/statefulset.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,18 @@ spec:
126126
successThreshold: {{ .Values.statefulset.livenessProbe.successThreshold }}
127127
failureThreshold: {{ .Values.statefulset.livenessProbe.failureThreshold }}
128128
readinessProbe:
129+
{{- if .Values.statefulset.readinessProbe.exec }}
130+
exec:
131+
command: {{ toYaml .Values.statefulset.readinessProbe.exec.command | nindent 14 }}
132+
{{- else if .Values.statefulset.readinessProbe.tcpSocket }}
133+
tcpSocket:
134+
port: {{ .Values.statefulset.readinessProbe.tcpSocket.port }}
135+
{{- else }}
129136
httpGet:
130-
path: /health/ping
131-
port: api
132-
scheme: HTTP
137+
path: {{ .Values.statefulset.readinessProbe.httpGet.path }}
138+
port: {{ .Values.statefulset.readinessProbe.httpGet.port }}
139+
scheme: {{ .Values.statefulset.readinessProbe.httpGet.scheme }}
140+
{{- end }}
133141
initialDelaySeconds: {{ .Values.statefulset.readinessProbe.initialDelaySeconds }}
134142
periodSeconds: {{ .Values.statefulset.readinessProbe.periodSeconds }}
135143
timeoutSeconds: {{ .Values.statefulset.readinessProbe.timeoutSeconds }}

helm/vernemq/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ statefulset:
212212
successThreshold: 1
213213
failureThreshold: 3
214214
readinessProbe:
215+
httpGet:
216+
path: /health/ping
217+
port: api
218+
scheme: HTTP
215219
initialDelaySeconds: 90
216220
periodSeconds: 10
217221
timeoutSeconds: 5

0 commit comments

Comments
 (0)