From 7979c3a52b01680b2e85205e6d5126717eb2b058 Mon Sep 17 00:00:00 2001 From: jessebot Date: Mon, 11 Nov 2024 02:47:27 +0100 Subject: [PATCH] make probes optional --- charts/libretranslate/Chart.yaml | 2 +- .../libretranslate/templates/statefulset.yaml | 8 ++++-- charts/libretranslate/values.yaml | 28 +++++++++---------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/charts/libretranslate/Chart.yaml b/charts/libretranslate/Chart.yaml index c61c155..e56b51b 100644 --- a/charts/libretranslate/Chart.yaml +++ b/charts/libretranslate/Chart.yaml @@ -6,4 +6,4 @@ sources: - https://github.com/LibreTranslate/LibreTranslate/ - https://github.com/LibreTranslate/helm-chart/ icon: https://libretranslate.com/static/favicon.ico -version: 0.2.2 +version: 0.3.0 diff --git a/charts/libretranslate/templates/statefulset.yaml b/charts/libretranslate/templates/statefulset.yaml index b044f9d..9b28660 100644 --- a/charts/libretranslate/templates/statefulset.yaml +++ b/charts/libretranslate/templates/statefulset.yaml @@ -80,10 +80,14 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 12 }} {{- end }} allowPrivilegeEscalation: false + {{- with .Values.readinessProbe }} readinessProbe: - {{- toYaml .Values.readinessProbe | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.livenessProbe }} livenessProbe: - {{- toYaml .Values.livenessProbe | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} env: {{- if and (.Values.appSettings.debug) (ne .Values.appSettings.debug "") }} - name: LT_DEBUG diff --git a/charts/libretranslate/values.yaml b/charts/libretranslate/values.yaml index f797a47..d4cc9b5 100644 --- a/charts/libretranslate/values.yaml +++ b/charts/libretranslate/values.yaml @@ -97,22 +97,22 @@ resources: memory: 1Gi # Readiness probe for kubernetes -readinessProbe: - exec: - command: - - /app/venv/bin/python - - /app/scripts/healthcheck.py - initialDelaySeconds: 10 - periodSeconds: 5 +readinessProbe: {} +# exec: +# command: +# - /app/venv/bin/python +# - /app/scripts/healthcheck.py +# initialDelaySeconds: 10 +# periodSeconds: 5 # Liveness probe for kubernetes -livenessProbe: - exec: - command: - - /app/venv/bin/python - - scripts/healthcheck.py - initialDelaySeconds: 10 - periodSeconds: 5 +livenessProbe: {} +# exec: +# command: +# - /app/venv/bin/python +# - scripts/healthcheck.py +# initialDelaySeconds: 10 +# periodSeconds: 5 # Auth secret for basic authentication # generate base64-user-password-pair with: