From 7b5bb982dd1fd31422625fc5fb2088504aaf0dcf Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 20 Sep 2022 13:17:31 +0300 Subject: [PATCH] [bitnami/parse] Use custom probes if given (#12544) 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 --- .../parse/templates/dashboard-deployment.yaml | 18 +++++++++--------- bitnami/parse/templates/server-deployment.yaml | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/bitnami/parse/templates/dashboard-deployment.yaml b/bitnami/parse/templates/dashboard-deployment.yaml index fd357604e8..6d01ad0535 100644 --- a/bitnami/parse/templates/dashboard-deployment.yaml +++ b/bitnami/parse/templates/dashboard-deployment.yaml @@ -133,28 +133,28 @@ spec: - name: http-dashboard containerPort: {{ .Values.dashboard.containerPorts.http }} {{- if not .Values.diagnosticMode.enabled }} - {{- if .Values.dashboard.livenessProbe.enabled }} + {{- if .Values.dashboard.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customLivenessProbe "context" $) | nindent 12 }} + {{- else if .Values.dashboard.livenessProbe.enabled }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.dashboard.livenessProbe "enabled") "context" $) | nindent 12 }} httpGet: path: / port: http-dashboard - {{- else if .Values.dashboard.customLivenessProbe }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customLivenessProbe "context" $) | nindent 12 }} {{- end }} - {{- if and .Values.dashboard.readinessProbe.enabled }} + {{- if .Values.dashboard.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customReadinessProbe "context" $) | nindent 12 }} + {{- else if .Values.dashboard.readinessProbe.enabled }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.dashboard.readinessProbe "enabled") "context" $) | nindent 12 }} httpGet: path: / port: http-dashboard - {{- else if .Values.dashboard.customReadinessProbe }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customReadinessProbe "context" $) | nindent 12 }} {{- end }} - {{- if .Values.dashboard.startupProbe.enabled }} + {{- if .Values.dashboard.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customStartupProbe "context" $) | nindent 12 }} + {{- else if .Values.dashboard.startupProbe.enabled }} startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.dashboard.startupProbe "enabled") "context" $) | nindent 12 }} tcpSocket: port: http-dashboard - {{- else if .Values.dashboard.customStartupProbe }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customStartupProbe "context" $) | nindent 12 }} {{- end }} {{- end }} {{- if .Values.dashboard.lifecycleHooks }} diff --git a/bitnami/parse/templates/server-deployment.yaml b/bitnami/parse/templates/server-deployment.yaml index 43dd4d06b3..7b718c15e4 100644 --- a/bitnami/parse/templates/server-deployment.yaml +++ b/bitnami/parse/templates/server-deployment.yaml @@ -153,7 +153,9 @@ spec: - name: http-server containerPort: {{ .Values.server.containerPorts.http }} {{- if not .Values.diagnosticMode.enabled }} - {{- if and .Values.server.livenessProbe.enabled }} + {{- if .Values.server.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.server.customLivenessProbe "context" $) | nindent 12 }} + {{- else if .Values.server.livenessProbe.enabled }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.server.livenessProbe "enabled") "context" $) | nindent 12 }} httpGet: path: {{ .Values.server.mountPath }}/users @@ -161,10 +163,10 @@ spec: httpHeaders: - name: X-Parse-Application-Id value: {{ .Values.server.appId }} - {{- else if .Values.server.customLivenessProbe }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.server.customLivenessProbe "context" $) | nindent 12 }} {{- end }} - {{- if and .Values.server.readinessProbe.enabled }} + {{- if .Values.server.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.server.customReadinessProbe "context" $) | nindent 12 }} + {{- else if .Values.server.readinessProbe.enabled }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.server.readinessProbe "enabled") "context" $) | nindent 12 }} httpGet: path: {{ .Values.server.mountPath }}/users @@ -172,15 +174,13 @@ spec: httpHeaders: - name: X-Parse-Application-Id value: {{ .Values.server.appId }} - {{- else if .Values.server.customReadinessProbe }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.server.customReadinessProbe "context" $) | nindent 12 }} {{- end }} - {{- if .Values.server.startupProbe.enabled }} + {{- if .Values.server.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.server.customStartupProbe "context" $) | nindent 12 }} + {{- else if .Values.server.startupProbe.enabled }} startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.server.startupProbe "enabled") "context" $) | nindent 12 }} tcpSocket: port: http-server - {{- else if .Values.server.customStartupProbe }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.server.customStartupProbe "context" $) | nindent 12 }} {{- end }} {{- end }} {{- if .Values.server.lifecycleHooks }}