test(probes): add startup probe tests and deployment notes
Add helm-unittest tests for startup probe: - Default configuration verification (tcpSocket, timing) - Custom timing parameters (initialDelaySeconds, periodSeconds, failureThreshold) - Alternative probe types (httpGet) - Custom port support - Timeout window calculation Add NOTES.txt with startup probe information: - Display max startup time calculation - Explain startup probe purpose for large libraries - Warning for very long startup timeouts Tests ensure startup probe works correctly for slow initial startup scenarios. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
1 parent
df3e66c5f9
commit
916087f1de
2 files changed
+132
No files matched your search
@@ -0,0 +1,40 @@
|
|||||||
|
Thank you for installing {{ .Chart.Name }}.
|
||||||
|
|
||||||
|
Your release is named {{ .Release.Name }}.
|
||||||
|
|
||||||
|
To learn more about the release, try:
|
||||||
|
|
||||||
|
$ helm status {{ .Release.Name }}
|
||||||
|
$ helm get all {{ .Release.Name }}
|
||||||
|
|
||||||
|
{{- if .Values.ingress.enabled }}
|
||||||
|
|
||||||
|
Jellyfin is available via Ingress at:
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .host }}{{ (index .paths 0).path }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
|
||||||
|
To access Jellyfin, you can use port-forwarding:
|
||||||
|
|
||||||
|
$ kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "jellyfin.fullname" . }} {{ .Values.service.port }}:{{ .Values.service.port }}
|
||||||
|
|
||||||
|
Then visit http://localhost:{{ .Values.service.port }} in your browser.
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.startupProbe }}
|
||||||
|
{{- $startupTimeout := mul (default 10 .Values.startupProbe.periodSeconds) (default 30 .Values.startupProbe.failureThreshold) }}
|
||||||
|
|
||||||
|
Startup Configuration:
|
||||||
|
Startup Probe: Enabled
|
||||||
|
Max Startup Time: {{ $startupTimeout }}s ({{ div $startupTimeout 60 }} minutes)
|
||||||
|
|
||||||
|
The startup probe gives Jellyfin enough time to initialize, especially
|
||||||
|
with large media libraries. After startup succeeds, liveness and
|
||||||
|
readiness probes take over for health monitoring.
|
||||||
|
|
||||||
|
{{- if gt $startupTimeout 600 }}
|
||||||
|
⚠ NOTE: Startup timeout is very long ({{ div $startupTimeout 60 }}+ minutes).
|
||||||
|
Consider optimizing your media library or reducing failureThreshold.
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
suite: test startup probe
|
||||||
|
templates:
|
||||||
|
- deployment.yaml
|
||||||
|
tests:
|
||||||
|
- it: should have startup probe by default
|
||||||
|
asserts:
|
||||||
|
- isNotNull:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe
|
||||||
|
|
||||||
|
- it: should use tcpSocket by default
|
||||||
|
asserts:
|
||||||
|
- isNotNull:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.tcpSocket
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.tcpSocket.port
|
||||||
|
value: http
|
||||||
|
|
||||||
|
- it: should have default timing values
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.initialDelaySeconds
|
||||||
|
value: 0
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.periodSeconds
|
||||||
|
value: 10
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.failureThreshold
|
||||||
|
value: 30
|
||||||
|
|
||||||
|
- it: should allow custom initialDelaySeconds
|
||||||
|
set:
|
||||||
|
startupProbe.initialDelaySeconds: 5
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.initialDelaySeconds
|
||||||
|
value: 5
|
||||||
|
|
||||||
|
- it: should allow custom periodSeconds
|
||||||
|
set:
|
||||||
|
startupProbe.periodSeconds: 15
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.periodSeconds
|
||||||
|
value: 15
|
||||||
|
|
||||||
|
- it: should allow custom failureThreshold
|
||||||
|
set:
|
||||||
|
startupProbe.failureThreshold: 60
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.failureThreshold
|
||||||
|
value: 60
|
||||||
|
|
||||||
|
- it: should support httpGet probe
|
||||||
|
set:
|
||||||
|
startupProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
periodSeconds: 10
|
||||||
|
failureThreshold: 30
|
||||||
|
asserts:
|
||||||
|
- isNotNull:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.httpGet
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.httpGet.path
|
||||||
|
value: /health
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.httpGet.port
|
||||||
|
value: http
|
||||||
|
|
||||||
|
- it: should support custom port
|
||||||
|
set:
|
||||||
|
startupProbe.tcpSocket.port: 9000
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.tcpSocket.port
|
||||||
|
value: 9000
|
||||||
|
|
||||||
|
- it: should calculate correct timeout window
|
||||||
|
set:
|
||||||
|
startupProbe.periodSeconds: 10
|
||||||
|
startupProbe.failureThreshold: 30
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.periodSeconds
|
||||||
|
value: 10
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].startupProbe.failureThreshold
|
||||||
|
value: 30
|
||||||
|
# Total startup time allowed: 10 * 30 = 300 seconds (5 minutes)
|
||||||
Reference in new issue
Block a user