summaryrefslogtreecommitdiffstats
path: root/kubernetes/cps/components/cps-core/resources
diff options
context:
space:
mode:
authorAbdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>2021-09-23 21:11:44 +0000
committerAbdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>2021-10-12 16:48:05 +0000
commit988aeedf9344fefb417af0d8377666b711eb80ce (patch)
tree00c0aa0642e655d593a27268f46aba6effb306e7 /kubernetes/cps/components/cps-core/resources
parent05da03322b0a0539e85819bd84cffd2c7a9c3c1e (diff)
[CPS] Use common postgres for CPS
Add option for CPS to use common postgres Issue-ID: OOM-2839 Signed-off-by: Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com> Change-Id: Ida133999f26cf50d59103aa30a90c97fba3e66a0
Diffstat (limited to 'kubernetes/cps/components/cps-core/resources')
-rw-r--r--kubernetes/cps/components/cps-core/resources/config/application-helm.yml5
1 files changed, 5 insertions, 0 deletions
diff --git a/kubernetes/cps/components/cps-core/resources/config/application-helm.yml b/kubernetes/cps/components/cps-core/resources/config/application-helm.yml
index 0bc7d5bccb..8f904efeae 100644
--- a/kubernetes/cps/components/cps-core/resources/config/application-helm.yml
+++ b/kubernetes/cps/components/cps-core/resources/config/application-helm.yml
@@ -2,6 +2,7 @@
# Copyright (C) 2021 Pantheon.tech
# Modifications Copyright (C) 2020 Bell Canada.
# Modifications Copyright (C) 2021 Nordix Foundation.
+# Modifications Copyright (C) 2021 Orange
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,7 +19,11 @@
spring:
datasource:
+{{- if .Values.global.postgres.localCluster }}
url: jdbc:postgresql://{{ .Values.postgres.service.name2 }}:5432/{{ .Values.postgres.config.pgDatabase }}
+{{- else }}
+ url: jdbc:postgresql://{{ .Values.global.postgres.service.name2 }}:5432/{{ .Values.postgres.config.pgDatabase }}
+{{- end }}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
driverClassName: org.postgresql.Driver