diff --git a/migrate/3.0-restore.sh b/migrate/3.0-restore.sh index 9573b8d..e6a1d1e 100644 --- a/migrate/3.0-restore.sh +++ b/migrate/3.0-restore.sh @@ -110,6 +110,12 @@ function circleci_database_import() { then echo "...scaling application deployments to 0..." scale_deployments 0 + + # if postgres is internal, delete pod to clear any remaining connections + if [ ! "$SKIP_POSTGRES" = "true" ]; + then + kubectl delete pod -l app.kubernetes.io/name=postgresql -n "$NAMESPACE" + fi # wait one minute for pods to scale down sleep 60 diff --git a/migrate/migrate.sh b/migrate/migrate.sh index 1555cf3..e63a5df 100644 --- a/migrate/migrate.sh +++ b/migrate/migrate.sh @@ -89,7 +89,6 @@ init_options() { if [ ${#POSITIONAL[@]} -gt 0 ] then - echo ${POSITIONAL[@]} help_init_options exit 1 fi