mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +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
|
||||
echo keepalive_pid: $keepalive_pid
|
||||
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
|
||||
echo 'Successful'
|
||||
"
|
||||
|
||||
@@ -94,6 +94,13 @@ spec:
|
||||
value: '{{ postgres_initdb_args }}'
|
||||
- name: 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:
|
||||
- containerPort: {{ awx_postgres_port | default('5432')}}
|
||||
name: postgres-{{ supported_pg_version }}
|
||||
|
||||
Reference in New Issue
Block a user