diff --git a/charts/retool/Chart.yaml b/charts/retool/Chart.yaml index 07dbe48..afeef81 100644 --- a/charts/retool/Chart.yaml +++ b/charts/retool/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: retool description: A Helm chart for Kubernetes type: application -version: 6.2.15 +version: 6.2.16 maintainers: - name: Retool Engineering email: engineering+helm@retool.com diff --git a/charts/retool/templates/deployment_backend.yaml b/charts/retool/templates/deployment_backend.yaml index 4c1ce43..e260b7b 100644 --- a/charts/retool/templates/deployment_backend.yaml +++ b/charts/retool/templates/deployment_backend.yaml @@ -270,6 +270,12 @@ spec: successThreshold: {{ .Values.readinessProbe.successThreshold }} periodSeconds: {{ .Values.readinessProbe.periodSeconds }} {{- end }} +{{- if .Values.preStopHook.enabled -}} + lifecycle: + preStop: + exec: + command: ["sleep", "30"] +{{- end }} {{- if .Values.startupProbe.enabled }} startupProbe: httpGet: diff --git a/charts/retool/templates/deployment_code_executor.yaml b/charts/retool/templates/deployment_code_executor.yaml index 39974f2..c88bdae 100644 --- a/charts/retool/templates/deployment_code_executor.yaml +++ b/charts/retool/templates/deployment_code_executor.yaml @@ -145,3 +145,19 @@ spec: targetPort: 3004 name: http-server {{- end }} +--- +{{- if .Values.podDisruptionBudget }} +{{- if semverCompare ">=1.21-0" .Capabilities.KubeVersion.Version -}} +apiVersion: policy/v1 +{{- else -}} +apiVersion: policy/v1beta1 +{{- end }} +kind: PodDisruptionBudget +metadata: + name: {{ template "retool.codeExecutor.name" . }} +spec: + {{ toYaml .Values.podDisruptionBudget }} + selector: + matchLabels: + {{- include "retool.codeExecutor.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/charts/retool/values.yaml b/charts/retool/values.yaml index 984baf6..7edb9b5 100644 --- a/charts/retool/values.yaml +++ b/charts/retool/values.yaml @@ -220,6 +220,9 @@ readinessProbe: periodSeconds: 10 successThreshold: 5 +preStopHook: + enabled: true + # To avoid increasing livenessProbe initialDelaySeconds the good practice is to use a startupProbe. startupProbe: enabled: false