From 5c86bb07121efd7cddbd79647e5a6113c68aea84 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 20 Sep 2022 13:18:24 +0300 Subject: [PATCH] [bitnami/tensorflow-resnet] Use custom probes if given (#12562) Without this change, in order to use a custom probe, the user has to specify the probe parameters, and also must specify for the original probe "enabled: false". Issue: #12354 Signed-off-by: Orgad Shaneh Signed-off-by: Orgad Shaneh --- .../templates/deployment.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bitnami/tensorflow-resnet/templates/deployment.yaml b/bitnami/tensorflow-resnet/templates/deployment.yaml index bd35626b3a..e71869381f 100644 --- a/bitnami/tensorflow-resnet/templates/deployment.yaml +++ b/bitnami/tensorflow-resnet/templates/deployment.yaml @@ -131,26 +131,26 @@ spec: - name: tf-serving-api containerPort: {{ .Values.containerPorts.restApi }} {{- if not .Values.diagnosticMode.enabled }} - {{- if .Values.livenessProbe.enabled }} + {{- if .Values.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }} + {{- else if .Values.livenessProbe.enabled }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.livenessProbe "enabled") "context" $) | nindent 12 }} tcpSocket: port: tf-serving - {{- else if .Values.customLivenessProbe }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }} {{- end }} - {{- if .Values.readinessProbe.enabled }} + {{- if .Values.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }} + {{- else if .Values.readinessProbe.enabled }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readinessProbe "enabled") "context" $) | nindent 12 }} tcpSocket: port: tf-serving - {{- else if .Values.customReadinessProbe }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }} {{- end }} - {{- if .Values.startupProbe.enabled }} + {{- if .Values.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }} + {{- else if .Values.startupProbe.enabled }} startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.startupProbe "enabled") "context" $) | nindent 12 }} tcpSocket: port: tf-serving - {{- else if .Values.customStartupProbe }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }} {{- end }} {{- end }} {{- if .Values.resources }}