From eaf70889a203b689977ab6e0a31edc4977185063 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Fri, 15 Oct 2021 13:42:20 +0200 Subject: [PATCH] feat(common): simplify postgresql url generator (#1146) --- charts/library/common/Chart.yaml | 2 +- .../common/templates/lib/dependencies/_postgresInjector.tpl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index a95901739fc..0e6efb1f2a9 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -15,4 +15,4 @@ maintainers: name: common sources: null type: library -version: 8.3.6 +version: 8.3.7 diff --git a/charts/library/common/templates/lib/dependencies/_postgresInjector.tpl b/charts/library/common/templates/lib/dependencies/_postgresInjector.tpl index 04f3a914d98..2a665088f57 100644 --- a/charts/library/common/templates/lib/dependencies/_postgresInjector.tpl +++ b/charts/library/common/templates/lib/dependencies/_postgresInjector.tpl @@ -23,7 +23,8 @@ data: postgresql-password: {{ $dbPass | b64enc | quote }} postgresql-postgres-password: {{ randAlphaNum 50 | b64enc | quote }} {{- end }} - url: {{ ( printf "%v%v:%v@%v-%v:%v/%v" "postgresql://" .Values.postgresql.postgresqlUsername $dbPass .Release.Name "postgresql" "5432" .Values.postgresql.postgresqlDatabase ) | b64enc | quote }} + url: {{ ( printf "postgresql://%v:%v@%v-postgresql:5432/%v" .Values.postgresql.postgresqlUsername $dbPass .Release.Name .Values.postgresql.postgresqlDatabase ) | b64enc | quote }} + urlnossl: {{ ( printf "postgresql://%v:%v@%v-postgresql:5432/%v?sslmode=disable" .Values.postgresql.postgresqlUsername $dbPass .Release.Name .Values.postgresql.postgresqlDatabase ) | b64enc | quote }} plainporthost: {{ ( printf "%v-%v" .Release.Name "postgresql" ) | b64enc | quote }} plainhost: {{ ( printf "%v-%v" .Release.Name "postgresql" ) | b64enc | quote }} type: Opaque