From 22bc720d27c83df315ed3e2930422599bfc6cf75 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Mon, 10 Jul 2023 15:01:01 +0200 Subject: [PATCH] sliding-sync-proxy: Fix built-in database URL Will now use sslmode prefer by default, while allowing the user of the Chart to override said value if wanted. Fixes #43 --- charts/sliding-sync-proxy/Chart.yaml | 2 +- charts/sliding-sync-proxy/templates/secrets.yaml | 3 ++- charts/sliding-sync-proxy/values.yaml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/sliding-sync-proxy/Chart.yaml b/charts/sliding-sync-proxy/Chart.yaml index 9ed28cd..9d0d3f2 100644 --- a/charts/sliding-sync-proxy/Chart.yaml +++ b/charts/sliding-sync-proxy/Chart.yaml @@ -5,7 +5,7 @@ description: An implementation of MSC3575 appVersion: "0.99.3" type: application -version: 0.1.1 +version: 0.1.2 maintainers: - name: Alexander Olofsson email: ace@haxalot.com diff --git a/charts/sliding-sync-proxy/templates/secrets.yaml b/charts/sliding-sync-proxy/templates/secrets.yaml index c3cfb61..d37f0b8 100644 --- a/charts/sliding-sync-proxy/templates/secrets.yaml +++ b/charts/sliding-sync-proxy/templates/secrets.yaml @@ -9,12 +9,13 @@ metadata: data: SYNCV3_BINDADDR: {{ ":8008" | b64enc }} {{- if .Values.postgresql.enabled }} - SYNCV3_DB: {{ (printf "postgresql://%s:%s@%s:%d/%s" + SYNCV3_DB: {{ (printf "postgresql://%s:%s@%s:%d/%s?sslmode=%s" .Values.postgresql.auth.username .Values.postgresql.auth.password (include "sliding-sync-proxy.postgresql.fullname" .) 5432 .Values.postgresql.auth.database + (.Values.postgresql.sslmode | default "prefer") ) | b64enc }} {{- else }} SYNCV3_DB: {{ (printf "postgresql://%s:%s@%s:%d/%s?sslmode=%s" diff --git a/charts/sliding-sync-proxy/values.yaml b/charts/sliding-sync-proxy/values.yaml index b3601f1..264998a 100644 --- a/charts/sliding-sync-proxy/values.yaml +++ b/charts/sliding-sync-proxy/values.yaml @@ -76,6 +76,7 @@ affinity: {} postgresql: enabled: true + # sslmode: prefer auth: ## Change me