Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default value for postgres_data_path #1766

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roles/installer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ postgres_init_container_resource_requirements:
memory: 64Mi
# Assign a preexisting priority class to the postgres pod
postgres_priority_class: ''
postgres_data_path: '/var/lib/postgresql/data/pgdata'
postgres_data_path: '/var/lib/pgsql/data/pgdata'

# Persistence to the AWX project data folder
# Whether or not the /var/lib/projects directory will be persistent
Expand Down
10 changes: 5 additions & 5 deletions roles/installer/tasks/database_configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,17 @@

- name: Check if postgres pod is running an older version
block:
- name: Set path to PG_VERSION file for given container image
set_fact:
path_to_pg_version: '{{ postgres_data_path }}/PG_VERSION'

- name: Get old PostgreSQL version
k8s_exec:
namespace: "{{ ansible_operator_meta.namespace }}"
pod: "{{ old_postgres_pod['metadata']['name'] }}"
command: |
bash -c """
cat {{ path_to_pg_version }}
if [ -f "{{ postgres_data_path }}/PG_VERSION" ]; then
cat "{{ postgres_data_path }}/PG_VERSION"
elif [ -f '/var/lib/postgresql/data/pgdata/PG_VERSION' ]; then
cat '/var/lib/postgresql/data/pgdata/PG_VERSION'
fi
"""
register: _old_pg_version

Expand Down
Loading