Scale down the new deployment before restoring

This commit is contained in:
Christian M. Adams
2021-05-07 11:18:40 -04:00
parent e082180cf9
commit ca8127448e
2 changed files with 4 additions and 2 deletions

View File

@@ -30,6 +30,7 @@ spec:
spec:
containers:
- image: '{{ tower_postgres_image }}:{{ tower_postgres_image_version }}'
imagePullPolicy: '{{ tower_image_pull_policy }}'
name: postgres
env:
# For tower_postgres_image based on rhel8/postgresql-12

View File

@@ -42,7 +42,7 @@
k8s_info:
api_version: v1
kind: Deployment
name: "{{ meta.name }}"
name: "{{ deployment_name }}"
namespace: "{{ meta.namespace }}"
register: this_deployment
@@ -50,9 +50,10 @@
k8s_scale:
api_version: v1
kind: Deployment
name: "{{ meta.name }}"
name: "{{ deployment_name }}"
namespace: "{{ meta.namespace }}"
replicas: 0
wait: yes
when: this_deployment['resources'] | length
- name: Set full resolvable host name for postgres pod