fix: Pass env vars to user-sync init container

The init container was only getting RUST_LOG, not the main env block.
This caused it to connect to the config file's database URL (SQLite)
instead of the BARYCENTER__DATABASE__URL env var (PostgreSQL),
resulting in migrations and user-sync running against the wrong
database.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Till Wegmueller 2026-02-22 18:15:23 +01:00
parent dd3dd4ef31
commit f6262b2128
No known key found for this signature in database

View file

@ -47,11 +47,9 @@ spec:
- sync-users
- --file
- /secrets/{{ .Values.userSync.secretKey }}
{{- if .Values.env }}
env:
- name: RUST_LOG
value: "info"
{{- if .Values.userSync.env }}
{{- toYaml .Values.userSync.env | nindent 8 }}
{{- toYaml .Values.env | nindent 8 }}
{{- end }}
volumeMounts:
- name: config