mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-11-27 03:40:54 +00:00
Fix postgres-mcp: mount config as file, not DB_CONFIG env var
The freepeak/db-mcp-server image ships a baked-in CONFIG_PATH pointing at its own bundled sample config; a same-named env var does not take priority over an existing file at that path, so DB_CONFIG was silently ignored and the server came up serving the sample databases instead of ours. Mount the real config as a file at /app/config.json instead.
This commit is contained in:
1 parent
58671bda88
commit
06b179a9fa
2 files changed
+25
-15
No files matched your search
@@ -48,27 +48,31 @@ spec:
|
||||
- name: {{ $key }}
|
||||
value: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.existingSecret }}
|
||||
- name: DB_CONFIG
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.existingSecret }}
|
||||
key: {{ .Values.secretConfigKey }}
|
||||
{{- end }}
|
||||
{{- if .Values.auditLog.enabled }}
|
||||
- name: DB_MCP_AUDIT_LOG
|
||||
value: {{ .Values.auditLog.path | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.auditLog.enabled }}
|
||||
volumeMounts:
|
||||
{{- if .Values.existingSecret }}
|
||||
- name: db-config
|
||||
mountPath: /app/config.json
|
||||
subPath: {{ .Values.secretConfigKey }}
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- if .Values.auditLog.enabled }}
|
||||
- name: audit-log
|
||||
mountPath: {{ .Values.auditLog.dir }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- if .Values.auditLog.enabled }}
|
||||
volumes:
|
||||
{{- if .Values.existingSecret }}
|
||||
- name: db-config
|
||||
secret:
|
||||
secretName: {{ .Values.existingSecret }}
|
||||
{{- end }}
|
||||
{{- if .Values.auditLog.enabled }}
|
||||
- name: audit-log
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Release.Name }}-audit-log
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in new issue
Block a user