mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-08 14:22:49 +00:00
Modify how pg password is set in postgres pod (#1540)
Signed-off-by: Christian M. Adams <chadams@redhat.com>
This commit is contained in:
@@ -76,7 +76,7 @@
|
|||||||
trap 'end_keepalive \"$keepalive_file\" \"$keepalive_pid\"' EXIT SIGINT SIGTERM
|
trap 'end_keepalive \"$keepalive_file\" \"$keepalive_pid\"' EXIT SIGINT SIGTERM
|
||||||
echo keepalive_pid: $keepalive_pid
|
echo keepalive_pid: $keepalive_pid
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
PGPASSWORD='{{ awx_old_postgres_pass }}' {{ pgdump }} | PGPASSWORD='{{ awx_postgres_pass }}' {{ pg_restore }}
|
PGPASSWORD=\"$PGPASSWORD_OLD\" {{ pgdump }} | PGPASSWORD=\"$POSTGRES_PASSWORD\" {{ pg_restore }}
|
||||||
set +e +o pipefail
|
set +e +o pipefail
|
||||||
echo 'Successful'
|
echo 'Successful'
|
||||||
"
|
"
|
||||||
|
|||||||
@@ -94,6 +94,13 @@ spec:
|
|||||||
value: '{{ postgres_initdb_args }}'
|
value: '{{ postgres_initdb_args }}'
|
||||||
- name: POSTGRES_HOST_AUTH_METHOD
|
- name: POSTGRES_HOST_AUTH_METHOD
|
||||||
value: '{{ postgres_host_auth_method }}'
|
value: '{{ postgres_host_auth_method }}'
|
||||||
|
{% if 'resources' in old_pg_config and old_pg_config['resources'] and 'password' in old_pg_config['resources'][0]['data'] %}
|
||||||
|
- name: PGPASSWORD_OLD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ old_pg_config['resources'][0]['metadata']['name'] }}'
|
||||||
|
key: password
|
||||||
|
{% endif %}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: {{ awx_postgres_port | default('5432')}}
|
- containerPort: {{ awx_postgres_port | default('5432')}}
|
||||||
name: postgres-{{ supported_pg_version }}
|
name: postgres-{{ supported_pg_version }}
|
||||||
|
|||||||
Reference in New Issue
Block a user