From 607a9668849168ccf4695b182d50a64fe1376ea8 Mon Sep 17 00:00:00 2001 From: Pierre Ozoux <pierre@ozoux.net> Date: Thu, 3 Feb 2022 11:07:28 +0100 Subject: [PATCH] Scales down before upgrade. --- libre | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libre b/libre index 085f57c..2cb6ff6 100755 --- a/libre +++ b/libre @@ -54,6 +54,7 @@ fi create_update_job_nc () { if [ "${APP}" = "nextcloud" ]; then + kubectl -n ${NS} scale --replicas=0 deployment/${APP}-web kubectl -n $NS delete job update-nc libre apply ../../common/nextcloud/other-manifests/update-job.yml fi @@ -87,8 +88,9 @@ case "$1" in cat /tmp/diff read -p "Ctrl-c to not apply the diff" fi - libre apply + kubectl -n ${NS} scale --replicas=0 deployment/${FQDN}-app create_update_job_nc + libre apply else echo "Nothing to update, good job!" fi;; -- GitLab