Use separate DB env vars instead of DATABASE_URL
The password contains @ characters which break URL parsing. TeslaMate supports separate DATABASE_USER/PASS/NAME/HOST variables. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f49af8a292
commit
b26f89bfce
2 changed files with 10 additions and 4 deletions
|
|
@ -19,11 +19,17 @@ spec:
|
|||
ports:
|
||||
- containerPort: 4000
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
- name: DATABASE_USER
|
||||
value: "teslamate"
|
||||
- name: DATABASE_PASS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: teslamate-db
|
||||
key: url
|
||||
key: password
|
||||
- name: DATABASE_NAME
|
||||
value: "teslamate"
|
||||
- name: DATABASE_HOST
|
||||
value: "blumeops-pg-rw.databases.svc.cluster.local"
|
||||
- name: ENCRYPTION_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# TeslaMate database connection secret
|
||||
# TeslaMate database password secret
|
||||
#
|
||||
# Apply with: op inject -i argocd/manifests/teslamate/secret-db.yaml.tpl | kubectl apply -f -
|
||||
apiVersion: v1
|
||||
|
|
@ -8,4 +8,4 @@ metadata:
|
|||
namespace: teslamate
|
||||
type: Opaque
|
||||
stringData:
|
||||
url: "ecto://teslamate:{{ op://blumeops/TeslaMate/db_password }}@blumeops-pg-rw.databases.svc.cluster.local:5432/teslamate"
|
||||
password: {{ op://blumeops/TeslaMate/db_password }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue