From 2ab2a84fed8524e29fc9395e9eed0b925e151398 Mon Sep 17 00:00:00 2001
From: Thomas Menard <tmenard@pastreur.fr>
Date: Thu, 11 Apr 2024 17:10:09 +0200
Subject: [PATCH]

---
 chart/templates/deployment-celery-worker.yaml | 2 +-
 chart/templates/deployment-django.yaml        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/chart/templates/deployment-celery-worker.yaml b/chart/templates/deployment-celery-worker.yaml
index 7ea42130..b5ee3ea1 100644
--- a/chart/templates/deployment-celery-worker.yaml
+++ b/chart/templates/deployment-celery-worker.yaml
@@ -62,7 +62,7 @@ spec:
           - name: POSTGRES_PASSWORD
             valueFrom:
               secretKeyRef:
-                name: {{ .Values.postgresql.dbUser }}.{{ printf "%s-postgresql.credentials.postgresql.acid.zalan.do" .Release.Name }}
+                name: {{ .Values.postgresql.dbUser | replace "_" "-" }}.{{ printf "%s-postgresql.credentials.postgresql.acid.zalan.do" .Release.Name }}
                 key: password
           {{end}}
           - name: POSTGRES_USER
diff --git a/chart/templates/deployment-django.yaml b/chart/templates/deployment-django.yaml
index 6913d93c..2607626f 100644
--- a/chart/templates/deployment-django.yaml
+++ b/chart/templates/deployment-django.yaml
@@ -61,7 +61,7 @@ spec:
           - name: POSTGRES_PASSWORD
             valueFrom:
               secretKeyRef:
-                name: {{ .Values.postgresql.dbUser }}.{{ printf "%s-postgresql.credentials.postgresql.acid.zalan.do" .Release.Name }}
+                name: {{ .Values.postgresql.dbUser | replace "_" "-" }}.{{ printf "%s-postgresql.credentials.postgresql.acid.zalan.do" .Release.Name }}
                 key: password
           {{end}}
           - name: POSTGRES_USER
-- 
GitLab