make schema and sslmode configurable

This commit is contained in:
nicktrn
2025-06-25 15:24:07 +01:00
parent 50c4f59a13
commit a9c91c5f9a
3 changed files with 11 additions and 3 deletions
+3 -3
View File
@@ -96,13 +96,13 @@ Get the full image name for supervisor
{{- end }}
{{/*
PostgreSQL connection string for internal PostgreSQL
PostgreSQL connection string
*/}}
{{- define "trigger-v4.postgres.connectionString" -}}
{{- if .Values.postgres.external -}}
postgresql://{{ .Values.postgres.externalConnection.username }}:{{ .Values.postgres.externalConnection.password }}@{{ .Values.postgres.externalConnection.host }}:{{ .Values.postgres.externalConnection.port }}/{{ .Values.postgres.externalConnection.database }}?schema=public&sslmode=disable
postgresql://{{ .Values.postgres.externalConnection.username }}:{{ .Values.postgres.externalConnection.password }}@{{ .Values.postgres.externalConnection.host }}:{{ .Values.postgres.externalConnection.port }}/{{ .Values.postgres.externalConnection.database }}?schema={{ .Values.postgres.externalConnection.schema | default "public" }}&sslmode={{ .Values.postgres.externalConnection.sslMode | default "prefer" }}
{{- else -}}
postgresql://{{ .Values.postgres.auth.username }}:{{ .Values.postgres.auth.password }}@{{ include "trigger-v4.fullname" . }}-postgres:{{ .Values.postgres.primary.service.ports.postgres }}/{{ .Values.postgres.auth.database }}?schema=public&sslmode=disable
postgresql://{{ .Values.postgres.auth.username }}:{{ .Values.postgres.auth.password }}@{{ include "trigger-v4.fullname" . }}-postgres:{{ .Values.postgres.primary.service.ports.postgres }}/{{ .Values.postgres.auth.database }}?schema={{ .Values.postgres.connection.schema | default "public" }}&sslmode={{ .Values.postgres.connection.sslMode | default "prefer" }}
{{- end -}}
{{- end }}
@@ -131,6 +131,8 @@ supervisor:
# database: "trigger"
# username: "trigger_user"
# password: "your-db-password"
# schema: "public"
# sslMode: "require" # Use 'require' or 'verify-full' for production
# Example: Use external Redis instead
# redis:
+6
View File
@@ -269,6 +269,9 @@ postgres:
username: "postgres"
password: "postgres"
database: "main"
connection:
schema: "public"
sslMode: "disable" # Use "require" or "verify-full" for production
podAnnotations: {}
@@ -296,6 +299,9 @@ postgres:
database: ""
username: ""
password: ""
# Connection options
schema: "public"
sslMode: "require" # Options: disable, allow, prefer, require, verify-ca, verify-full
# Extra environment variables for PostgreSQL
extraEnv:
[]