Skip to content

Commit

Permalink
shift health check to a sript mounted
Browse files Browse the repository at this point in the history
  • Loading branch information
jgilfoil committed Feb 29, 2024
1 parent 4029c8d commit 534d15a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
13 changes: 13 additions & 0 deletions kubernetes/apps/media/prowlarr/app/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: health-check
data:
health-check.sh: |
#!/bin/sh
response=$(wget -q -O- http://localhost/ping | jq -r '.status')
if [ "$response" = "OK" ]; then
exit 0
else
exit 1
fi
15 changes: 8 additions & 7 deletions kubernetes/apps/media/prowlarr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@ spec:
command:
- sh
- -c
- |
response=$(wget -q -O- http://localhost/ping | jq -r '.status')
if [ "$response" = "OK" ]; then
exit 0
else
exit 1
fi
- /opt/probe/health_check.sh
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
Expand Down Expand Up @@ -124,3 +118,10 @@ spec:
existingClaim: prowlarr
tmp:
type: emptyDir
healthcheck:
enabled: true
type: configMap
name: health-check
defaultMode: 0755
globalMounts:
- path: /opt/probe/health_check.sh

0 comments on commit 534d15a

Please sign in to comment.