Merge pull request #295 from rooftopcellist/scale_down_restore

Scale down the new deployment before restoring
This commit is contained in:
Christian Adams
2021-05-07 15:03:48 -04:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

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

View File

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