Skip to content

Commit

Permalink
fix prowlarr kill script
Browse files Browse the repository at this point in the history
  • Loading branch information
henrywhitaker3 committed Nov 22, 2023
1 parent 4c537b4 commit 0299a90
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions argo/cluster/misc/redeployer/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,16 @@ jobs:
command: |
#!/bin/bash
status=$(kubectl -n media get pod -l app.kubernetes.io/instance=prowlarr -o json | jq -r '.items[0].status.phase')
unavailable=$(kubectl -n media get deployment -l app.kubernetes.io/instance=prowlarr -o json | jq -r '.items[0].status.unavailableReplicas')
if [ $status != "Running" ]; then
if [ $unavailable != null ]; then
echo Status is not running. Waiting 120 seconds...
sleep 120
status=$(kubectl -n media get pod -l app.kubernetes.io/instance=prowlarr -o json | jq -r '.items[0].status.phase')
if [ $status != "Running" ]; then
unavailable=$(kubectl -n media get deployment -l app.kubernetes.io/instance=prowlarr -o json | jq -r '.items[0].status.unavailableReplicas')
if [ $unavailable != null ]; then
echo Status still not running, deleting pods
kubectl -n media delete pod -l app.kubernetes.io/instance=prowlarr
fi
else
echo Status is healthy
fi

0 comments on commit 0299a90

Please sign in to comment.