Skip to content

Commit

Permalink
Don't delete old postgres 13 volume automatically (#1767)
Browse files Browse the repository at this point in the history
Leave old postgres-13 volume alone in case of unforseen upgrade failure for restore purposes

User can manually delete old PVC after verifying upgrade is completed
  • Loading branch information
TheRealHaoLiu authored Mar 13, 2024
1 parent 6e31fea commit a8acae4
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions roles/installer/tasks/upgrade_postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,3 @@
loop:
- "{{ ansible_operator_meta.name }}-postgres"
- "{{ ansible_operator_meta.name }}-postgres-13"

- name: Remove old persistent volume claim
k8s:
kind: PersistentVolumeClaim
api_version: v1
namespace: "{{ ansible_operator_meta.namespace }}"
name: "{{ item }}"
state: absent
loop:
- "postgres-{{ ansible_operator_meta.name }}-postgres-0"
- "postgres-{{ ansible_operator_meta.name }}-postgres-13-0"
- "postgres-13-{{ ansible_operator_meta.name }}-postgres-13-0"
when: postgres_keep_pvc_after_upgrade

0 comments on commit a8acae4

Please sign in to comment.