Skip to content

Commit

Permalink
Update velero-deploy.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
yongkanghe committed May 12, 2023
1 parent c69bfb4 commit 235eef6
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions velero-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,28 @@ velero install \

echo "-------One time On-Demand Backup of yong-postgresql namespace"
kubectl wait --for=condition=ready --timeout=180s -n velero pod -l component=velero
sleep 10
kubectl get bsl -n velero
sleep 5
kubectl get bsl -n velero

kubectl get bsl -n velero | grep Unavailable
if [ `echo $?` -eq 1 ]
then
echo '-------Waiting for BSL becomes available'
sleep 5
fi

kubectl get bsl -n velero | grep Unavailable
if [ `echo $?` -eq 1 ]
then
echo '-------Waiting for BSL becomes available'
sleep 5
fi

kubectl get bsl -n velero | grep Unavailable
if [ `echo $?` -eq 1 ]
then
echo '-------Waiting for BSL becomes available'
sleep 5
fi

velero backup create yong-postgresql-backup --include-namespaces yong-postgresql

echo "-------Hourly scheduled backup of yong-postgresql namespace"
Expand Down

0 comments on commit 235eef6

Please sign in to comment.