From a967a492f202efa303226bd80129c3ec5bfa66e7 Mon Sep 17 00:00:00 2001 From: Bogdan Szabo Date: Wed, 18 Nov 2026 14:24:13 +0100 Subject: [PATCH] Chart: a fresh database initialises on current CloudNativePG, and the Ingress can omit TLS --- deploy/chart/templates/database.yaml | 2 +- deploy/chart/templates/ingress.yaml | 2 ++ deploy/chart/values.yaml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy/chart/templates/database.yaml b/deploy/chart/templates/database.yaml index 3962ff58b..cfe72e2b7 100644 --- a/deploy/chart/templates/database.yaml +++ b/deploy/chart/templates/database.yaml @@ -36,7 +36,7 @@ spec: secret: { name: utopia-db-credentials } postInitApplicationSQL: - CREATE EXTENSION IF NOT EXISTS vector - - DO $$ BEGIN IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'utopia_app') THEN CREATE ROLE utopia_app LOGIN; END IF; END $$ + - CREATE ROLE utopia_app LOGIN - GRANT CONNECT ON DATABASE utopia TO utopia_app {{- end }} {{- if .Values.database.restore.host }} diff --git a/deploy/chart/templates/ingress.yaml b/deploy/chart/templates/ingress.yaml index 72766e0a9..c81e59451 100644 --- a/deploy/chart/templates/ingress.yaml +++ b/deploy/chart/templates/ingress.yaml @@ -18,9 +18,11 @@ spec: {{- with .Values.ingress.className }} ingressClassName: {{ . }} {{- end }} + {{- if .Values.ingress.tls }} tls: - hosts: [{{ .Values.hostname }}] secretName: utopia-tls + {{- end }} rules: - host: {{ .Values.hostname }} http: diff --git a/deploy/chart/values.yaml b/deploy/chart/values.yaml index 1303001fd..e89e78be1 100644 --- a/deploy/chart/values.yaml +++ b/deploy/chart/values.yaml @@ -103,6 +103,8 @@ ingress: clusterIssuer: "" # true: annotate the host for external-dns. externalDns: false + # false: no tls section, for a host served over plain HTTP. + tls: true # Controller-specific settings, e.g. body size and read timeout. annotations: {}