aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorputhuparambil.aditya <aditya.puthuparambil@bell.ca>2022-02-01 09:30:03 +0000
committeraditya puthuparambil <aditya.puthuparambil@bell.ca>2022-02-01 10:17:34 +0000
commit9b91aef5f2150c21b55fbeead8c3005576214f4f (patch)
tree54d494fa7d3a7d91519c805f7c88ff8dd92a677a
parent0eec968ce240c0f029de5c3d3f8b3e8037ee74ce (diff)
[CPS] Database port made configurable
port configured in values.yaml and used in application_helm.yaml Issue-ID: CPS-867 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: I73c77c0b95c64e51a3b5107b3e0802c9eb4cabe9
-rw-r--r--kubernetes/cps/components/cps-core/resources/config/application-helm.yml4
-rw-r--r--kubernetes/cps/components/cps-core/values.yaml6
2 files changed, 8 insertions, 2 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 8f904efeae..e9958f1114 100644
--- a/kubernetes/cps/components/cps-core/resources/config/application-helm.yml
+++ b/kubernetes/cps/components/cps-core/resources/config/application-helm.yml
@@ -20,9 +20,9 @@
spring:
datasource:
{{- if .Values.global.postgres.localCluster }}
- url: jdbc:postgresql://{{ .Values.postgres.service.name2 }}:5432/{{ .Values.postgres.config.pgDatabase }}
+ url: jdbc:postgresql://{{ .Values.postgres.service.name2 }}:{{ .Values.postgres.service.externalPort2 }}/{{ .Values.postgres.config.pgDatabase }}
{{- else }}
- url: jdbc:postgresql://{{ .Values.global.postgres.service.name2 }}:5432/{{ .Values.postgres.config.pgDatabase }}
+ url: jdbc:postgresql://{{ .Values.global.postgres.service.name2 }}:{{ .Values.global.postgres.service.externalPort2 }}/{{ .Values.postgres.config.pgDatabase }}
{{- end }}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
diff --git a/kubernetes/cps/components/cps-core/values.yaml b/kubernetes/cps/components/cps-core/values.yaml
index a482152582..e67cfb250a 100644
--- a/kubernetes/cps/components/cps-core/values.yaml
+++ b/kubernetes/cps/components/cps-core/values.yaml
@@ -58,8 +58,11 @@ global:
localCluster: false
service:
name: pgset
+ externalPort: 5432
name2: tcp-pgset-primary
+ externalPort2: 5432
name3: tcp-pgset-replica
+ externalPort3: 5432
container:
name: postgres
@@ -200,8 +203,11 @@ postgres:
nameOverride: &postgresName cps-core-postgres
service:
name: *postgresName
+ externalPort: 5432
name2: cps-core-pg-primary
+ externalPort2: 5432
name3: cps-core-pg-replica
+ externalPort3: 5432
container:
name:
primary: cps-core-pg-primary