Skip to content

Commit

Permalink
Merge pull request #54 from parth-gr/wait-pod
Browse files Browse the repository at this point in the history
core: add a timeout for deployment pod to stop
  • Loading branch information
travisn authored Sep 7, 2022
2 parents 27c0fc8 + 195eed5 commit 867e592
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kubectl-rook-ceph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,14 @@ function run_start_debug() {
echo "setting debug command to main container"
deployment_spec=$(update_deployment_spec_command "$deployment_spec")

deployment_pod=$(KUBECTL_NS_CLUSTER get pod | grep "$deployment_name" | awk '{ print $1 }')
# scale the deployment to 0
KUBECTL_NS_CLUSTER scale deployments "$deployment_name" --replicas=0

# wait for the deployment pod to be deleted
echo "waiting for the deployment pod \"$deployment_pod\" to be deleted"
KUBECTL_NS_CLUSTER wait --for=delete pod/"$deployment_pod" --timeout=60s

# create debug deployment
cat <<EOF | $TOP_LEVEL_COMMAND create -f -
apiVersion: apps/v1
Expand Down

0 comments on commit 867e592

Please sign in to comment.