From 534d15a147ac6306fdb12e963725e92aeebf9970 Mon Sep 17 00:00:00 2001 From: Jason Gilfoil Date: Thu, 29 Feb 2024 20:29:05 +0000 Subject: [PATCH] shift health check to a sript mounted --- kubernetes/apps/media/prowlarr/app/configmap.yaml | 13 +++++++++++++ .../apps/media/prowlarr/app/helmrelease.yaml | 15 ++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 kubernetes/apps/media/prowlarr/app/configmap.yaml diff --git a/kubernetes/apps/media/prowlarr/app/configmap.yaml b/kubernetes/apps/media/prowlarr/app/configmap.yaml new file mode 100644 index 00000000..259c6790 --- /dev/null +++ b/kubernetes/apps/media/prowlarr/app/configmap.yaml @@ -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 diff --git a/kubernetes/apps/media/prowlarr/app/helmrelease.yaml b/kubernetes/apps/media/prowlarr/app/helmrelease.yaml index 9615ad26..a61c8441 100644 --- a/kubernetes/apps/media/prowlarr/app/helmrelease.yaml +++ b/kubernetes/apps/media/prowlarr/app/helmrelease.yaml @@ -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 @@ -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