-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-connection.yaml
More file actions
52 lines (47 loc) · 1.65 KB
/
test-connection.yaml
File metadata and controls
52 lines (47 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "readarr.fullname" . }}-test-connection"
labels:
{{- include "readarr.labels" . | nindent 4 }}
component: test
annotations:
"helm.sh/hook": test
"helm.sh/hook-weight": "1"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
restartPolicy: Never
containers:
- name: wget
image: busybox:1.35
command: ['wget']
args: ['{{ include "readarr.fullname" . }}:{{ .Values.readarr.service.port }}']
- name: curl-test
image: curlimages/curl:8.0.1
command:
- /bin/sh
- -c
- |
set -e
echo "Testing Readarr web interface..."
# Test basic connectivity
curl -f --connect-timeout 30 --max-time 60 \
http://{{ include "readarr.fullname" . }}:{{ .Values.readarr.service.port }}/
echo "✓ Readarr web interface is accessible"
# Test API endpoint (may return 401 without auth, but should not 500)
API_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" \
http://{{ include "readarr.fullname" . }}:{{ .Values.readarr.service.port }}/api/v1/system/status)
if [ "$API_RESPONSE" = "401" ] || [ "$API_RESPONSE" = "200" ]; then
echo "✓ Readarr API is responding (HTTP $API_RESPONSE)"
else
echo "✗ Readarr API returned unexpected status: $API_RESPONSE"
exit 1
fi
echo "✓ All tests passed!"
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 50m
memory: 64Mi