From 66cfe6598773542a00254b640d75aef44830c82e Mon Sep 17 00:00:00 2001 From: Daniel Passos Date: Wed, 13 Mar 2019 10:47:24 -0300 Subject: [PATCH 1/2] Add recreate strategy to postgres --- roles/provision-keycloak-apb/tasks/provision-postgres.yml | 4 ++++ vars/main.yml | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/provision-keycloak-apb/tasks/provision-postgres.yml b/roles/provision-keycloak-apb/tasks/provision-postgres.yml index ef36091..54006ec 100644 --- a/roles/provision-keycloak-apb/tasks/provision-postgres.yml +++ b/roles/provision-keycloak-apb/tasks/provision-postgres.yml @@ -47,6 +47,10 @@ name: '{{ postgres_service_name }}' namespace: '{{ namespace }}' replicas: 1 + spec_strategy_type: '{{ postgres_strategy_type }}' + spec_strategy_active_deadline_seconds: '{{ postgres_strategy_active_deadline_seconds }}' + spec_strategy_recreate_params: + timeoutSeconds: '{{ postgres_strategy_recreate_timeout }}' labels: app: '{{ app_name }}' service: '{{ postgres_service_name }}' diff --git a/vars/main.yml b/vars/main.yml index 9908bee..5816926 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -15,4 +15,7 @@ postgres_secret_name: keycloak-postgres-secret keycloak_pv_claim_name: keycloak-metrics-pvc postgres_pv_claim_name: keycloak-postgres-pvc keycloak_admin_realm_name: master -encode_asb_binding: yes \ No newline at end of file +encode_asb_binding: yes +postgres_strategy_type: "Recreate" +postgres_strategy_active_deadline_seconds: "21600" +postgres_strategy_recreate_timeout: "600" From c4064896bdc3b79431dd733db47cd7b5a53e67a3 Mon Sep 17 00:00:00 2001 From: Wei Li Date: Thu, 14 Mar 2019 09:35:55 +0000 Subject: [PATCH 2/2] fix: syntax error --- roles/provision-keycloak-apb/tasks/provision-postgres.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/provision-keycloak-apb/tasks/provision-postgres.yml b/roles/provision-keycloak-apb/tasks/provision-postgres.yml index 54006ec..02784f9 100644 --- a/roles/provision-keycloak-apb/tasks/provision-postgres.yml +++ b/roles/provision-keycloak-apb/tasks/provision-postgres.yml @@ -48,9 +48,9 @@ namespace: '{{ namespace }}' replicas: 1 spec_strategy_type: '{{ postgres_strategy_type }}' - spec_strategy_active_deadline_seconds: '{{ postgres_strategy_active_deadline_seconds }}' - spec_strategy_recreate_params: - timeoutSeconds: '{{ postgres_strategy_recreate_timeout }}' + spec_strategy_active_deadline_seconds: '{{ postgres_strategy_active_deadline_seconds }}' + spec_strategy_recreate_params: + timeoutSeconds: '{{ postgres_strategy_recreate_timeout }}' labels: app: '{{ app_name }}' service: '{{ postgres_service_name }}'