From df3e66c5f9fe803e9663a9621f932ef22eb2d72d Mon Sep 17 00:00:00 2001 From: Aleksei Sviridkin Date: Thu, 6 Nov 2025 00:04:39 +0300 Subject: [PATCH] feat(probes): add startup probe for handling slow initial startup Add startupProbe to give Jellyfin sufficient time to start, especially with large media libraries or slow storage. This prevents Kubernetes from killing the pod during initial startup phase. Changes: - Add startupProbe configuration in values.yaml with sensible defaults - failureThreshold: 30 (allows up to 5 minutes for startup) - periodSeconds: 10 - Uses tcpSocket check on http port - Update deployment.yaml to include startupProbe from values - Bump chart version 2.5.0 -> 2.5.1 - Add changelog annotation for Artifact Hub Benefits: - Prevents pod restarts during slow initial startup (large media libraries) - Liveness and readiness probes remain responsive after successful startup - Fully configurable and can be disabled by setting startupProbe: null - No breaking changes, backward compatible The startup probe gives Jellyfin up to 5 minutes (30 attempts * 10 seconds) to complete initialization. After the first success, liveness and readiness probes take over with their normal timing. Co-Authored-By: Claude Signed-off-by: Aleksei Sviridkin --- charts/jellyfin/Chart.yaml | 6 +++++- charts/jellyfin/templates/deployment.yaml | 4 ++++ charts/jellyfin/values.yaml | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/charts/jellyfin/Chart.yaml b/charts/jellyfin/Chart.yaml index 96a351b..5fc2d25 100644 --- a/charts/jellyfin/Chart.yaml +++ b/charts/jellyfin/Chart.yaml @@ -8,5 +8,9 @@ keywords: - jellyfin - media - self-hosted -version: 2.5.0 +version: 2.5.1 appVersion: 10.11.2 +annotations: + artifacthub.io/changes: | + - kind: added + description: Add startup probe to prevent pod restarts during slow initial startup with large media libraries diff --git a/charts/jellyfin/templates/deployment.yaml b/charts/jellyfin/templates/deployment.yaml index c235001..2b4265f 100644 --- a/charts/jellyfin/templates/deployment.yaml +++ b/charts/jellyfin/templates/deployment.yaml @@ -108,6 +108,10 @@ spec: hostPort: 1900 protocol: UDP {{- end }} + {{- with .Values.startupProbe }} + startupProbe: + {{- toYaml . | nindent 12 }} + {{- end }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: diff --git a/charts/jellyfin/values.yaml b/charts/jellyfin/values.yaml index 068c0ef..f5d4bf1 100644 --- a/charts/jellyfin/values.yaml +++ b/charts/jellyfin/values.yaml @@ -133,7 +133,20 @@ resources: {} # cpu: 100m # memory: 128Mi +# -- Configure startup probe for Jellyfin. +# This probe gives Jellyfin enough time to start, especially with large media libraries. +# After the startup probe succeeds once, liveness and readiness probes take over. +startupProbe: + tcpSocket: + port: http + initialDelaySeconds: 0 + periodSeconds: 10 + failureThreshold: 30 + # With these defaults, Jellyfin has up to 5 minutes (30 * 10s) to start. + # Adjust failureThreshold if you have very large media libraries or slow storage. + # -- Configure liveness probe for Jellyfin. +# This probe is disabled during startup (startup probe handles initial checks). livenessProbe: initialDelaySeconds: 10 tcpSocket: @@ -144,6 +157,7 @@ livenessProbe: # periodSeconds: 10 # -- Configure readiness probe for Jellyfin. +# This probe is disabled during startup (startup probe handles initial checks). readinessProbe: initialDelaySeconds: 10 tcpSocket: