aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2021-03-09 13:52:30 +0000
committerGerrit Code Review <gerrit@onap.org>2021-03-09 13:52:30 +0000
commite15204252b7bf15dd6deae291cf37c5e73cd0828 (patch)
treec9a1ee9e832e12dcd0a3e0cebd5afed845ea38f4
parentf53c65c89b08f4bcd8c49e5aa0c284a6b5f00b8c (diff)
parent1ed3d2657e897aa4a3924ffe21b95437773af2c0 (diff)
Merge "[COMMON] Fix postgres data persistence"
-rw-r--r--kubernetes/common/postgres/templates/_deployment.tpl3
-rw-r--r--kubernetes/common/postgres/values.yaml2
2 files changed, 5 insertions, 0 deletions
diff --git a/kubernetes/common/postgres/templates/_deployment.tpl b/kubernetes/common/postgres/templates/_deployment.tpl
index 6142baa63f..38a7ce1f63 100644
--- a/kubernetes/common/postgres/templates/_deployment.tpl
+++ b/kubernetes/common/postgres/templates/_deployment.tpl
@@ -1,6 +1,7 @@
{{/*
# Copyright © 2018 Amdocs, AT&T, Bell Canada
# Copyright © 2020 Samsung Electronics
+# Modifications Copyright (C) 2021 Bell Canada.
# #
# # Licensed under the Apache License, Version 2.0 (the "License");
# # you may not use this file except in compliance with the License.
@@ -134,6 +135,8 @@ spec:
value: "{{ $dot.Values.config.pgDatabase }}"
- name: PG_ROOT_PASSWORD
{{- include "common.secret.envFromSecretFast" (dict "global" $dot "uid" (include "common.postgres.secret.rootPassUID" .) "key" "password") | indent 10 }}
+ - name: PGDATA_PATH_OVERRIDE
+ value: "{{ $dot.Values.config.pgDataPath }}"
volumeMounts:
- name: config
mountPath: /pgconf/pool_hba.conf
diff --git a/kubernetes/common/postgres/values.yaml b/kubernetes/common/postgres/values.yaml
index 07bb5c4eac..93f6d66385 100644
--- a/kubernetes/common/postgres/values.yaml
+++ b/kubernetes/common/postgres/values.yaml
@@ -1,4 +1,5 @@
# Copyright © 2018 Amdocs, AT&T, Bell Canada
+# Modifications Copyright (C) 2021 Bell Canada.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -50,6 +51,7 @@ pullPolicy: Always
config:
pgUserName: testuser
pgDatabase: userdb
+ pgDataPath: data
# pgPrimaryPassword: password
# pgUserPassword: password
# pgRootPassword: password