Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
MUL-3355: feat(helm): support external PostgreSQL via postgres.external.enabled
feifeigood30e1e546cf75
diff --git a/deploy/helm/multica/templates/backend.yaml b/deploy/helm/multica/templates/backend.yamlindex a34ad330f1..44d5c79da7 100644--- a/deploy/helm/multica/templates/backend.yaml+++ b/deploy/helm/multica/templates/backend.yaml@@ -68,9 +68,11 @@ spec:name: {{ .Release.Name }}-config- secretRef:name: {{ .Values.existingSecret }}+ {{- if not .Values.postgres.external.enabled }}env:- name: DATABASE_URLvalue: {{ include "multica.databaseUrl" . | quote }}+ {{- end }}{{- if .Values.backend.uploads.persistence.enabled }}volumeMounts:- name: uploadsdiff --git a/deploy/helm/multica/templates/configmap.yaml b/deploy/helm/multica/templates/configmap.yamlindex af418e14dc..843f5209f1 100644--- a/deploy/helm/multica/templates/configmap.yaml+++ b/deploy/helm/multica/templates/configmap.yaml@@ -25,6 +25,8 @@ data:CLOUDFRONT_KEY_PAIR_ID: {{ .Values.backend.config.cloudfrontKeyPairId | quote }}LOCAL_UPLOAD_BASE_URL: {{ .Values.backend.config.localUploadBaseUrl | quote }}- # --- PostgreSQL (also consumed by the backend to build DATABASE_URL) ---+ {{- if not .Values.postgres.external.enabled }}+ # --- PostgreSQL (consumed by the backend to build DATABASE_URL) ---POSTGRES_DB: {{ .Values.postgres.database | quote }}POSTGRES_USER: {{ .Values.postgres.user | quote }}+ {{- end }}diff --git a/deploy/helm/multica/templates/postgres.yaml b/deploy/helm/multica/templates/postgres.yamlindex c68def4ac5..bde822da9c 100644--- a/deploy/helm/multica/templates/postgres.yaml+++ b/deploy/helm/multica/templates/postgres.yaml@@ -1,3 +1,4 @@+{{- if not .Values.postgres.external.enabled -}}apiVersion: v1kind: PersistentVolumeClaimmetadata:@@ -97,3 +98,5 @@ spec:ports:- port: 5432targetPort: 5432++{{- end }}diff --git a/deploy/helm/multica/values.yaml b/deploy/helm/multica/values.yamlindex 5e3fa5fb93..795a00a607 100644--- a/deploy/helm/multica/values.yaml+++ b/deploy/helm/multica/values.yaml@@ -21,6 +21,7 @@ images:# -----------------------------------------------------------------------------# Pre-created Secret with sensitive values. Create it before `helm install`:#+# Built-in postgres (default):# kubectl -n <namespace> create secret generic multica-secrets \# --from-literal=JWT_SECRET="$(openssl rand -hex 32)" \# --from-literal=POSTGRES_PASSWORD="$(openssl rand -hex 16)" \@@ -29,6 +30,16 @@ images:# --from-literal=CLOUDFRONT_PRIVATE_KEY="" \# --from-literal=MULTICA_DEV_VERIFICATION_CODE=""#+# External postgres (postgres.external.enabled=true):+# Replace POSTGRES_PASSWORD with DATABASE_URL pointing at your external cluster.+# kubectl -n <namespace> create secret generic multica-secrets \+# --from-literal=JWT_SECRET="$(openssl rand -hex 32)" \+# --from-literal=DATABASE_URL="postgres://user:pass@host:5432/multica?sslmode=require" \+# --from-literal=RESEND_API_KEY="" \+# --from-literal=GOOGLE_CLIENT_SECRET="" \+# --from-literal=CLOUDFRONT_PRIVATE_KEY="" \+# --from-literal=MULTICA_DEV_VERIFICATION_CODE=""+## The chart references this Secret by name; it does not template it, so real# values never need to land in git.# -----------------------------------------------------------------------------@@ -38,6 +49,12 @@ existingSecret: multica-secrets# PostgreSQL (pgvector)# -----------------------------------------------------------------------------postgres:+ # Set external.enabled=true to skip the built-in postgres Deployment/PVC and+ # supply DATABASE_URL directly via the existingSecret instead. When true,+ # the postgres Deployment, PVC, and Service are not created.+ # Add DATABASE_URL to your existingSecret pointing at the external cluster.+ external:+ enabled: falsedatabase: multicauser: multicapersistence: