Skip to content

Commit

Permalink
Add check for deployment existence before restarting it.
Browse files Browse the repository at this point in the history
  • Loading branch information
backwind1233 committed Oct 14, 2024
1 parent bbc044f commit 793267a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion azd-hooks/postdeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ export GATEWAY_HOSTNAME=$(az network public-ip show --ids ${GATEWAY_PUBLICIP_ID}
export CARGO_TRACKER_URL="http://${GATEWAY_HOSTNAME}/cargo-tracker/"
echo "Cargo Tracker URL: ${CARGO_TRACKER_URL}"

kubectl rollout restart deployment/cargo-tracker-cluster
if kubectl get deployment cargo-tracker-cluster > /dev/null 2>&1; then
kubectl rollout restart deployment/cargo-tracker-cluster
fi

0 comments on commit 793267a

Please sign in to comment.