Skip to content

Commit 8d9d921

Browse files
authored
feat: Support readiness probe overrides for API and Task processor deployments (#405)
1 parent 9e4b68f commit 8d9d921

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

charts/flagsmith/templates/deployment-api.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,15 @@ spec:
148148
successThreshold: {{ .Values.api.livenessProbe.successThreshold }}
149149
timeoutSeconds: {{ .Values.api.livenessProbe.timeoutSeconds }}
150150
readinessProbe:
151-
failureThreshold: {{ .Values.api.readinessProbe.failureThreshold }}
151+
{{- if .Values.api.readinessProbe.exec }}
152+
exec: {{ .Values.api.readinessProbe.exec | toYaml | nindent 12 }}
153+
{{- else if .Values.api.readinessProbe.path }}
152154
httpGet:
153155
path: {{ .Values.api.readinessProbe.path }}
154156
port: {{ .Values.service.api.port }}
155157
scheme: HTTP
158+
{{- end }}
159+
failureThreshold: {{ .Values.api.readinessProbe.failureThreshold }}
156160
initialDelaySeconds: {{ .Values.api.readinessProbe.initialDelaySeconds }}
157161
periodSeconds: {{ .Values.api.readinessProbe.periodSeconds }}
158162
successThreshold: {{ .Values.api.readinessProbe.successThreshold }}

charts/flagsmith/templates/deployment-task-processor.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ spec:
9090
exec: {{ $exec | toYaml | nindent 12 }}
9191
{{- else }}
9292
httpGet:
93-
path: /health/liveness
93+
path: /health/liveness/
9494
port: {{ .Values.service.taskProcessor.port }}
9595
scheme: HTTP
9696
{{- end }}
@@ -100,11 +100,16 @@ spec:
100100
successThreshold: {{ .Values.taskProcessor.livenessProbe.successThreshold }}
101101
timeoutSeconds: {{ .Values.taskProcessor.livenessProbe.timeoutSeconds }}
102102
readinessProbe:
103+
{{- $exec := .Values.taskProcessor.readinessProbe.exec | default .Values.api.readinessProbe.exec }}
103104
failureThreshold: {{ .Values.taskProcessor.readinessProbe.failureThreshold }}
105+
{{- if $exec }}
106+
exec: {{ $exec | toYaml | nindent 12 }}
107+
{{- else }}
104108
httpGet:
105-
path: /health/readiness
109+
path: /health/readiness/
106110
port: {{ .Values.service.taskProcessor.port }}
107111
scheme: HTTP
112+
{{- end }}
108113
initialDelaySeconds: {{ .Values.taskProcessor.readinessProbe.initialDelaySeconds }}
109114
periodSeconds: {{ .Values.taskProcessor.readinessProbe.periodSeconds }}
110115
successThreshold: {{ .Values.taskProcessor.readinessProbe.successThreshold }}

charts/flagsmith/values.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ api:
7777
# runAsGroup: 1000
7878
livenessProbe:
7979
# path is the API path to be used for health checks. Used if exec is not set.
80-
path: /health/liveness
80+
path: /health/liveness/
8181
# exec describes an ExecAction command which will run inside the API container.
8282
# See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe
8383
exec: {}
@@ -87,7 +87,10 @@ api:
8787
successThreshold: 1
8888
timeoutSeconds: 2
8989
readinessProbe:
90-
path: /health/readiness
90+
path: /health/readiness/
91+
# exec describes an ExecAction command which will run inside the API container.
92+
# See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe
93+
exec: {}
9194
failureThreshold: 10
9295
initialDelaySeconds: 1
9396
periodSeconds: 10
@@ -206,6 +209,10 @@ taskProcessor:
206209
successThreshold: 1
207210
timeoutSeconds: 30
208211
readinessProbe:
212+
# exec describes an ExecAction command which will run inside the API container.
213+
# Defaults to api.readinessProbe.exec.
214+
# See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe
215+
exec: {}
209216
failureThreshold: 10
210217
initialDelaySeconds: 1
211218
periodSeconds: 10
@@ -397,14 +404,14 @@ sse:
397404
# runAsUser: 1000
398405
# runAsGroup: 1000
399406
livenessProbe:
400-
path: /health/liveness
407+
path: /health/liveness/
401408
failureThreshold: 5
402409
initialDelaySeconds: 5
403410
periodSeconds: 10
404411
successThreshold: 1
405412
timeoutSeconds: 2
406413
readinessProbe:
407-
path: /health/readiness
414+
path: /health/readiness/
408415
failureThreshold: 10
409416
initialDelaySeconds: 1
410417
periodSeconds: 10

0 commit comments

Comments
 (0)