mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-07 13:52:58 +00:00
* Bump Postgresql, Nginx and Redis versions * pg12 --> pg13 upgrade path * Set supported pg version as a variable to remain DRY * Make deleting the old db data pvc after upgrade configurable * Use labels to find the postgres pod * backup/restore: fix postgres label selector value We need to use the deployment_name variable for the postgres instance name. Signed-off-by: Dimitri Savineau <dsavinea@redhat.com> * backup/restore: add missing default supported_pg_version variable Signed-off-by: Dimitri Savineau <dsavinea@redhat.com> * restore: update database_host fact with pg suffix Signed-off-by: Dimitri Savineau <dsavinea@redhat.com> Co-authored-by: Dimitri Savineau <dsavinea@redhat.com>
20 lines
518 B
YAML
20 lines
518 B
YAML
---
|
|
|
|
- name: Check for presence of Deployment
|
|
k8s_info:
|
|
api_version: v1
|
|
kind: Deployment
|
|
name: "{{ ansible_operator_meta.name }}"
|
|
namespace: "{{ ansible_operator_meta.namespace }}"
|
|
register: this_deployment
|
|
|
|
- name: Scale down Deployment for migration
|
|
kubernetes.core.k8s_scale:
|
|
api_version: v1
|
|
kind: Deployment
|
|
name: "{{ ansible_operator_meta.name }}"
|
|
namespace: "{{ ansible_operator_meta.namespace }}"
|
|
replicas: 0
|
|
wait: yes
|
|
when: this_deployment['resources'] | length
|