diff options
author | Bruno Sakoto <bruno.sakoto@bell.ca> | 2021-03-05 18:11:00 -0500 |
---|---|---|
committer | Bruno Sakoto <bruno.sakoto@bell.ca> | 2021-03-08 15:05:09 +0000 |
commit | 1ed3d2657e897aa4a3924ffe21b95437773af2c0 (patch) | |
tree | 38b22830a4533c4a9c2c6583d9d4dac8bbdccfce /kubernetes/aai/components/aai-sparky-be/resources/config | |
parent | f7f76dfb521917298fbaf320d6fa3d56e3ea462e (diff) |
[COMMON] Fix postgres data persistence
This changes fixes postgres data lost that occurs when postgres pods
are restarting.
When crunchy data postgres image starts, it runs /opt/cpm/bin/setenv.sh
script to set PGDATA folder. This script contains:
--
export PGDATA=/pgdata/$HOSTNAME
if [[ -v PGDATA_PATH_OVERRIDE ]]; then
export PGDATA=/pgdata/$PGDATA_PATH_OVERRIDE
fi
--
Since postgres is now a deployment (commit 0b243b600), its pod name is
different on each startup, hence HOSTNAME and PGDATA are also
different each time.
This change is leveraging crunchy data PGDATA_PATH_OVERRIDE environment
variable to set PGDATA to a fixed path. By default, this path is set to
/pgdata/data.
Issue-ID: CPS-271
Change-Id: Icc0f05d64230a98bc21d8f2a74c12c6661e05482
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Diffstat (limited to 'kubernetes/aai/components/aai-sparky-be/resources/config')
0 files changed, 0 insertions, 0 deletions