Merge "[COMMON] Fix postgres data persistence"
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 9 Mar 2021 13:52:30 +0000 (13:52 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 9 Mar 2021 13:52:30 +0000 (13:52 +0000)
kubernetes/common/postgres/templates/_deployment.tpl
kubernetes/common/postgres/values.yaml

index 6142baa..38a7ce1 100644 (file)
@@ -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
index 07bb5c4..93f6d66 100644 (file)
@@ -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