diff --git a/chart/templates/deployment-celery-worker.yaml b/chart/templates/deployment-celery-worker.yaml
index 7ea4213040eeb0a25764eb7f44b4459e9e38647e..b5ee3ea1727ad139eb22736e45975b9909e19fe6 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 6913d93c82b26c6105840b9e15ec6e698ccf5b76..2607626fead25c882d2bbd7bc853f8acb40a1903 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