[web/task split] fix scale down bug (#1295)

- rename scale_down vars to the new deployments since the old one no longer exists
- rename postgres.yml scale down vars as it references the old ones as well
This commit is contained in:
Jake Jackson
2023-03-23 14:53:14 -04:00
committed by Hao Liu
parent 25dfc97047
commit 7218e42771
2 changed files with 9 additions and 3 deletions

View File

@@ -12,8 +12,11 @@
kubernetes.core.k8s_scale:
api_version: apps/v1
kind: Deployment
name: "{{ ansible_operator_meta.name }}"
name: "{{ item }}"
namespace: "{{ ansible_operator_meta.namespace }}"
replicas: 0
wait: yes
loop:
- "{{ ansible_operator_meta.name }}-task"
- "{{ ansible_operator_meta.name }}-web"
when: this_deployment['resources'] | length

View File

@@ -50,7 +50,7 @@
k8s_info:
api_version: apps/v1
kind: Deployment
name: "{{ deployment_name }}"
name: "{{ ansible_operator_meta.namespace }}-task"
namespace: "{{ ansible_operator_meta.namespace }}"
register: this_deployment
@@ -58,10 +58,13 @@
k8s_scale:
api_version: apps/v1
kind: Deployment
name: "{{ deployment_name }}"
name: "{{ item }}"
namespace: "{{ ansible_operator_meta.namespace }}"
replicas: 0
wait: yes
loop:
- "{{ ansible_operator_meta.name }}-task"
- "{{ ansible_operator_meta.name }}-web"
when: this_deployment['resources'] | length
- name: Set full resolvable host name for postgres pod