Skip to content

Commit 62725fb

Browse files
committed
Update database configuration in Helm chart
- Modify values.yaml to allow direct database configuration with user, password, host, and name fields. - Update configmap.yaml to construct the DATABASE_URL using the new database configuration values.
1 parent 0a0168b commit 62725fb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

helm/charts/backend/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ data:
99
{{- if .Values.database.url }}
1010
DATABASE_URL: {{ .Values.database.url | quote }}
1111
{{- else }}
12-
DATABASE_URL: "postgresql://postgres:{{ .Values.postgresql.auth.postgresPassword }}@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.auth.database }}"
12+
DATABASE_URL: "postgresql://{{ .Values.database.user }}:{{ .Values.database.password }}@{{ .Values.database.host }}:5432/{{ .Values.database.name }}"
1313
{{- end }}
1414
ENABLE_METRICS: "{{ .Values.enableMetrics }}"
1515
DYNAMODB_REGION: "{{ .Values.dynamodbRegion }}"

helm/charts/backend/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ image:
99

1010
# Database configuration
1111
database:
12-
url: "" # Will be auto-generated using release name and PostgreSQL config
12+
url: "" # If set, used directly
13+
user: "postgres"
14+
password: "postgres"
15+
host: "localhost"
16+
name: "postgres_service"
1317

1418
# Application configuration
1519
secretKey: "my-secret-key" # Key used to hash passwords stored in the database

0 commit comments

Comments
 (0)