File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,10 @@ function wait_for_pvc_backup() {
5555 _info " Backup of $description PVC ready!"
5656 break
5757 else
58- (( i++ )) && (( i > WAIT_FOR_BACKUP_RETRIES )) && _error " Timed out waiting for backup of $description PVC"
58+ (( i++ )) && (( i > WAIT_FOR_BACKUP_RETRIES )) && {
59+ kubectl delete volumesnapshot -n " $namespace " " $backupName " ;
60+ _error " Timed out waiting for backup of $description PVC" ;
61+ }
5962 sleep 5
6063 _info " still waiting..."
6164 fi
@@ -149,7 +152,10 @@ function wait_for_cloudsql_backup() {
149152 _info " Backup of $description ready! Backup ID: $id "
150153 break
151154 else
152- (( i++ )) && (( i > WAIT_FOR_BACKUP_RETRIES )) && _error " Timed out waiting for backup of $description db"
155+ (( i++ )) && (( i > WAIT_FOR_BACKUP_RETRIES )) && {
156+ gcloud sql backups delete " $id " --instance " $db_id " --quiet;
157+ _error " Timed out waiting for backup of $description db" ;
158+ }
153159 sleep 5
154160 _info " still waiting..."
155161 fi
You can’t perform that action at this time.
0 commit comments