Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shift health check to a sript mounted #101

Merged
merged 1 commit into from
Feb 29, 2024
Merged

shift health check to a sript mounted #101

merged 1 commit into from
Feb 29, 2024

Conversation

jgilfoil
Copy link
Owner

No description provided.

Copy link

--- kubernetes/apps/media/prowlarr/app Kustomization: flux-system/prowlarr HelmRelease: media/prowlarr

+++ kubernetes/apps/media/prowlarr/app Kustomization: flux-system/prowlarr HelmRelease: media/prowlarr

@@ -57,38 +57,26 @@

                 enabled: true
                 spec:
                   exec:
                     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
                   failureThreshold: 3
                   initialDelaySeconds: 0
                   periodSeconds: 10
                   timeoutSeconds: 1
               readiness:
                 custom: true
                 enabled: true
                 spec:
                   exec:
                     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
                   failureThreshold: 3
                   initialDelaySeconds: 0
                   periodSeconds: 10
                   timeoutSeconds: 1
               startup:
                 enabled: false
@@ -138,12 +126,19 @@

         - hosts:
           - prowlarr.
     persistence:
       config:
         enabled: true
         existingClaim: prowlarr
+      healthcheck:
+        defaultMode: 493
+        enabled: true
+        globalMounts:
+        - path: /opt/probe/health_check.sh
+        name: health-check
+        type: configMap
       tmp:
         type: emptyDir
     service:
       main:
         ports:
           http:

Copy link

--- HelmRelease: media/prowlarr Deployment: media/prowlarr

+++ HelmRelease: media/prowlarr Deployment: media/prowlarr

@@ -59,36 +59,24 @@

         image: ghcr.io/onedr0p/prowlarr-nightly:1.11.1.4146@sha256:d1df9f9528a64994a1d49fdad3f340fe76496777b496f1cbb0b71a718dbc4d88
         livenessProbe:
           exec:
             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
           failureThreshold: 3
           initialDelaySeconds: 0
           periodSeconds: 10
           timeoutSeconds: 1
         name: main
         readinessProbe:
           exec:
             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
           failureThreshold: 3
           initialDelaySeconds: 0
           periodSeconds: 10
           timeoutSeconds: 1
         resources:
           limits:
@@ -102,15 +90,21 @@

             drop:
             - ALL
           readOnlyRootFilesystem: true
         volumeMounts:
         - mountPath: /config
           name: config
+        - mountPath: /opt/probe/health_check.sh
+          name: healthcheck
         - mountPath: /tmp
           name: tmp
       volumes:
       - name: config
         persistentVolumeClaim:
           claimName: prowlarr
+      - configMap:
+          defaultMode: 493
+          name: health-check
+        name: healthcheck
       - emptyDir: {}
         name: tmp
 

@jgilfoil jgilfoil merged commit dd0c243 into main Feb 29, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant