Skip to content

Commit 091d4e4

Browse files
authored
Merge pull request #1012 from kubeshop/tkc-3441-add-configurability-to-livenessreadiness-probe
feat: improve probe configurability
2 parents 624393c + 00c3156 commit 091d4e4

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

charts/testkube-api/templates/deployment.yaml

+18-1
Original file line numberDiff line numberDiff line change
@@ -271,17 +271,34 @@ spec:
271271
path: /health
272272
port: {{ .Values.service.port }}
273273
scheme: HTTP
274+
{{- if .Values.customReadinessProbe }}
275+
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }}
276+
{{- else if .Values.readinessProbe.enabled }}
274277
readinessProbe:
275278
httpGet:
276279
path: /health
277280
port: {{ .Values.service.port }}
278281
scheme: HTTP
282+
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
283+
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
284+
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
285+
successThreshold: {{ .Values.readinessProbe.successThreshold }}
286+
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
287+
{{- end }}
288+
{{- if .Values.customLivenessProbe }}
289+
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }}
290+
{{- else if .Values.livenessProbe.enabled }}
279291
livenessProbe:
280-
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
281292
httpGet:
282293
path: /health
283294
port: {{ .Values.service.port }}
284295
scheme: HTTP
296+
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
297+
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
298+
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
299+
successThreshold: {{ .Values.livenessProbe.successThreshold }}
300+
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
301+
{{- end }}
285302
resources:
286303
{{- toYaml .Values.resources | nindent 12 }}
287304
volumeMounts:

charts/testkube-api/values.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ next:
194194
## Should it enable controller API
195195
enabled: true
196196

197-
198197
## Configure cron jobs in this installation.
199198
# - tkcagnt_*** - Super Agent
200199
cronJobs:
@@ -755,8 +754,12 @@ testConnection:
755754

756755
## Testkube API Liveness probe
757756
livenessProbe:
757+
enabled: true
758758
initialDelaySeconds: 30
759759

760+
readinessProbe:
761+
enabled: true
762+
760763
## Testkube API HTTP body size limit
761764
## httpBodyLimit: 1073741824
762765

0 commit comments

Comments
 (0)