From fdbe607189e187b0ad6ce69d7f10b0bbbac93c0c Mon Sep 17 00:00:00 2001 From: "Christian M. Adams" Date: Tue, 4 Jan 2022 17:07:39 -0500 Subject: [PATCH] Scale down app pod when database is unavailable --- roles/installer/tasks/database_configuration.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/installer/tasks/database_configuration.yml b/roles/installer/tasks/database_configuration.yml index 2c3e2094..2e8ab62c 100644 --- a/roles/installer/tasks/database_configuration.yml +++ b/roles/installer/tasks/database_configuration.yml @@ -99,6 +99,10 @@ definition: "{{ lookup('template', 'postgres.yaml.j2') }}" register: create_statefulset_result + - name: Scale down Deployment for migration + include_tasks: scale_down_deployment.yml + when: create_statefulset_result.changed + rescue: - name: Scale down Deployment for migration include_tasks: scale_down_deployment.yml